diff options
author | Jeremy Allison <jra@samba.org> | 2003-09-18 01:17:22 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-09-18 01:17:22 +0000 |
commit | 9f50a90db174afe594cf6e3d1fb443ee8f9abe16 (patch) | |
tree | aa189c95089169b2989120a0bd750afbe32b106f | |
parent | 408ecbdd005b1833fde90752d6eeb1fff962af55 (diff) | |
download | samba-9f50a90db174afe594cf6e3d1fb443ee8f9abe16.tar.gz samba-9f50a90db174afe594cf6e3d1fb443ee8f9abe16.tar.bz2 samba-9f50a90db174afe594cf6e3d1fb443ee8f9abe16.zip |
Fix for #470 - unable to display SIDs in ACLs.
Jeremy.
(This used to be commit 56df89eff38e4c89defa5fd56bbb6c9d2012f82d)
-rw-r--r-- | source3/passdb/passdb.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 1dadee8a49..743ea823bf 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -1073,8 +1073,16 @@ DOM_SID *local_uid_to_sid(DOM_SID *psid, uid_t uid) unix_pw = sys_getpwuid( uid ); if ( !unix_pw ) { - DEBUG(4,("local_uid_to_sid: host has know idea of uid %lu\n", (unsigned long)uid)); - return NULL; + DEBUG(4,("local_uid_to_sid: host has no idea of uid %lu\n", (unsigned long)uid)); + + if ( !lp_enable_rid_algorithm() ) + return NULL; + + DEBUG(8,("local_uid_to_sid: falling back to RID algorithm\n")); + + sid_copy( psid, get_global_sam_sid() ); + sid_append_rid( psid, fallback_pdb_uid_to_user_rid(uid) ); + goto out; } if ( !NT_STATUS_IS_OK(pdb_init_sam(&sampw)) ) { @@ -1101,6 +1109,7 @@ DOM_SID *local_uid_to_sid(DOM_SID *psid, uid_t uid) sid_append_rid( psid, fallback_pdb_uid_to_user_rid(uid) ); } +out: DEBUG(10,("local_uid_to_sid: uid (%d) -> SID %s (%s).\n", (unsigned int)uid, sid_string_static(psid), unix_pw->pw_name)); |