diff options
author | Jeremy Allison <jra@samba.org> | 2001-01-15 22:46:22 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-01-15 22:46:22 +0000 |
commit | 7786e07735af78b8207485e3a9fae4dc09080849 (patch) | |
tree | 93319cce92607d8194e54336b84635cf0059f2d3 /source3/passdb | |
parent | e870dd298881a1390e9f9559232bf23984f34943 (diff) | |
download | samba-7786e07735af78b8207485e3a9fae4dc09080849.tar.gz samba-7786e07735af78b8207485e3a9fae4dc09080849.tar.bz2 samba-7786e07735af78b8207485e3a9fae4dc09080849.zip |
Fixes for POSIX ACLS. ACL merge code.
Jeremy.
(This used to be commit 180e4a9cd05bcadb2f7c4c23d653724e867196f0)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/passdb.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 42c0176fc5..0e4948a322 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -575,6 +575,8 @@ BOOL local_sid_to_uid(uid_t *puid, DOM_SID *psid, enum SID_NAME_USE *name_type) DOM_SID dom_sid; uint32 rid; + fstring str; + struct passwd *pass; *name_type = SID_NAME_UNKNOWN; @@ -593,9 +595,12 @@ BOOL local_sid_to_uid(uid_t *puid, DOM_SID *psid, enum SID_NAME_USE *name_type) /* * Ensure this uid really does exist. */ - if(!sys_getpwuid(*puid)) + if(!(pass = sys_getpwuid(*puid))) return False; + DEBUG(10,("local_sid_to_uid: SID %s -> uid (%u) (%s).\n", sid_to_string( str, psid), + (unsigned int)*puid, pass->pw_name )); + return True; } @@ -620,6 +625,8 @@ BOOL local_sid_to_gid(gid_t *pgid, DOM_SID *psid, enum SID_NAME_USE *name_type) extern DOM_SID global_sam_sid; DOM_SID dom_sid; uint32 rid; + fstring str; + struct group *grp; *name_type = SID_NAME_UNKNOWN; @@ -640,9 +647,12 @@ BOOL local_sid_to_gid(gid_t *pgid, DOM_SID *psid, enum SID_NAME_USE *name_type) * Ensure this gid really does exist. */ - if(!getgrgid(*pgid)) + if(!(grp = getgrgid(*pgid))) return False; + DEBUG(10,("local_sid_to_gid: SID %s -> gid (%u) (%s).\n", sid_to_string( str, psid), + (unsigned int)*pgid, grp->gr_name )); + return True; } |