diff options
author | Simo Sorce <idra@samba.org> | 2003-04-05 08:53:23 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2003-04-05 08:53:23 +0000 |
commit | 2c1f725820584f279607db48e0003d6e7f67321e (patch) | |
tree | 9fbab724f2afabdeff1448cc9d8bfc63141d45e4 /source3/auth/auth_util.c | |
parent | 2a9e71aa9bd171af47e4ed73c932e75160b32d88 (diff) | |
download | samba-2c1f725820584f279607db48e0003d6e7f67321e.tar.gz samba-2c1f725820584f279607db48e0003d6e7f67321e.tar.xz samba-2c1f725820584f279607db48e0003d6e7f67321e.zip |
some more idmapping :)
(This used to be commit 5ac94535d7b7ce0cc0d44b9a77d6e42ddfd0cd26)
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r-- | source3/auth/auth_util.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index a3ca0b226f2..ddb833a0e56 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -869,8 +869,8 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, struct passwd *passwd; - uid_t uid; - gid_t gid; + unid_t u_id, g_id; + int u_type, g_type; int n_lgroupSIDs; DOM_SID *lgroupSIDs = NULL; @@ -907,9 +907,11 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx, domain = domain; } - if (winbind_sid_to_uid(&uid, &user_sid) - && winbind_sid_to_gid(&gid, &group_sid) - && ((passwd = getpwuid_alloc(uid)))) { + u_type = ID_USERID; + g_type = ID_GROUPID; + if (NT_STATUS_IS_OK(idmap_get_id_from_sid(&u_id, &u_type, &user_sid)) + && NT_STATUS_IS_OK(idmap_get_id_from_sid(&g_id, &g_type, &group_sid)) + && ((passwd = getpwuid_alloc(u_id.uid)))) { nt_status = pdb_init_sam_pw(&sam_account, passwd); passwd_free(&passwd); } else { |