summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-11-06 19:46:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:42 -0500
commitcd41945acc4f7a5b939ed768f58ca76068846114 (patch)
tree346b36dc60b2717560dcb9ec9e55696ca57abe44 /source3/passdb
parentf8fc3f9158aa7560fb81ff450327db1fb7c69cc0 (diff)
downloadsamba-cd41945acc4f7a5b939ed768f58ca76068846114.tar.gz
samba-cd41945acc4f7a5b939ed768f58ca76068846114.tar.bz2
samba-cd41945acc4f7a5b939ed768f58ca76068846114.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' (This used to be commit 5b3ac400a7d51dfc818563189bdf6649b2dc3a52)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/lookup_sid.c6
1 files 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",