summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/token_util.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index 33b5507744..d86d589cc3 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -565,6 +565,8 @@ static NTSTATUS create_token_from_sid(TALLOC_CTX *mem_ctx,
uint32_t num_group_sids;
uint32_t num_gids;
uint32_t i;
+ uint32_t high, low;
+ bool range_ok;
if (sid_check_is_in_our_sam(user_sid)) {
bool ret;
@@ -757,13 +759,13 @@ static NTSTATUS create_token_from_sid(TALLOC_CTX *mem_ctx,
to 'valid user = "Domain Admins"'. --jerry */
num_gids = num_group_sids;
+ range_ok = lp_idmap_default_range(&low, &high);
for ( i=0; i<num_gids; i++ ) {
- uint32_t high, low;
/* don't pickup anything managed by Winbind */
-
- if ( lp_idmap_default_range(&low, &high) && (gids[i] >= low) && (gids[i] <= high) )
+ if (range_ok && (gids[i] >= low) && (gids[i] <= high)) {
continue;
+ }
gid_to_unix_groups_sid(gids[i], &unix_group_sid);