diff options
author | Gerald Carter <jerry@samba.org> | 2006-11-06 19:46:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:42 -0500 |
commit | 5b3ac400a7d51dfc818563189bdf6649b2dc3a52 (patch) | |
tree | b5212fc50bbe2cf6f7e64b7ae63dfabcccf77974 /source/passdb | |
parent | 3b5ab8ab8296339ad0e62d8564d706b5a446dcf3 (diff) | |
download | samba-5b3ac400a7d51dfc818563189bdf6649b2dc3a52.tar.gz samba-5b3ac400a7d51dfc818563189bdf6649b2dc3a52.tar.xz samba-5b3ac400a7d51dfc818563189bdf6649b2dc3a52.zip |
r19579: BUG 4075: patch from Dmitry Butskoy <dmitry@butskoy.name>.
Allow smbd to use winbindd to lookup uids/gids outside the
idmap range if 'winbind trusted domains only = yes'
Diffstat (limited to 'source/passdb')
-rw-r--r-- | source/passdb/lookup_sid.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/passdb/lookup_sid.c b/source/passdb/lookup_sid.c index 85a31879064..45a72057b66 100644 --- a/source/passdb/lookup_sid.c +++ b/source/passdb/lookup_sid.c @@ -1124,7 +1124,8 @@ void uid_to_sid(DOM_SID *psid, uid_t uid) if (fetch_sid_from_uid_cache(psid, uid)) return; - if (lp_idmap_uid(&low, &high) && (uid >= low) && (uid <= high) && + if ((lp_winbind_trusted_domains_only() || + (lp_idmap_uid(&low, &high) && (uid >= low) && (uid <= high))) && winbind_uid_to_sid(psid, uid)) { DEBUG(10,("uid_to_sid: winbindd %u -> %s\n", @@ -1169,7 +1170,8 @@ void gid_to_sid(DOM_SID *psid, gid_t gid) if (fetch_sid_from_gid_cache(psid, gid)) return; - if (lp_idmap_gid(&low, &high) && (gid >= low) && (gid <= high) && + if ((lp_winbind_trusted_domains_only() || + (lp_idmap_gid(&low, &high) && (gid >= low) && (gid <= high))) && winbind_gid_to_sid(psid, gid)) { DEBUG(10,("gid_to_sid: winbindd %u -> %s\n", |