From cd41945acc4f7a5b939ed768f58ca76068846114 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 6 Nov 2006 19:46:50 +0000 Subject: r19579: BUG 4075: patch from Dmitry Butskoy . Allow smbd to use winbindd to lookup uids/gids outside the idmap range if 'winbind trusted domains only = yes' (This used to be commit 5b3ac400a7d51dfc818563189bdf6649b2dc3a52) --- source3/passdb/lookup_sid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index 85a3187906..45a72057b6 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/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", -- cgit