namjaejeon / ksmbd-tools

ksmbd kernel server userspace utilities
GNU General Public License v2.0
55 stars 43 forks source link

uid to windows SID mapping support #189

Open wangyugui-e16 opened 1 year ago

wangyugui-e16 commented 1 year ago

Hi,

uid to windows SID mapping is used when

test result show that there are same issues about this feature.

wangyugui-e16 commented 1 year ago

seperated from https://github.com/namjaejeon/ksmbd-tools/issues/187

from [hcbwiz] About id mapping API, there are two libraries: libsss-idmap and libsss-nss-idmap I try libsss-nss-idmap:

#include <sss_nss_idmap.h>
#include <stdio.h>
#include <stdlib.h>

int main()
{
        char *sid = NULL;
        enum sss_id_type type;
        int ret;

        ret = sss_nss_getsidbyname("administrator", &sid, &type);
        printf("ret: %d, sid: %s, type: %d\n", ret, sid, type);
        free(sid);
}

output:

ret: 0, sid: S-1-5-21-3675874838-1964521148-1538075311-500, type: 1
wangyugui-e16 commented 1 year ago
[ksmbd-worker/3113]: ERROR: LSARPC: unsupported INVOKE method 130, alloc_hint : 96
[ksmbd-worker/3113]: ERROR: LSARPC: unsupported INVOKE method 130, alloc_hint : 96
[ksmbd-worker/3113]: ERROR: LSARPC: unsupported INVOKE method 130, alloc_hint : 96
namjaejeon commented 1 year ago

@wangyugui-e16 Okay, how can I reproduce it ? And Is there any issue when these error message are coming ?

wangyugui-e16 commented 1 year ago

reproduce steps: 1) linux server /usr/sbin/ksmbd.mountd -v -n 2) windows client select a file of remote server from windows explorer, then right click, 'properties', then 'security' tab.

then error ' ERROR: LSARPC: unsupported INVOKE method 130, alloc_hint : 96' happen on linux server.

namjaejeon commented 1 year ago

Thanks:) I will try.