diff options
Diffstat (limited to 'source3/passdb/lookup_sid.c')
-rw-r--r-- | source3/passdb/lookup_sid.c | 6 |
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", |