summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_group.c7
-rw-r--r--source3/nsswitch/winbindd_util.c8
2 files changed, 3 insertions, 12 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 9c81aef447..f0d3bc43ea 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -924,7 +924,6 @@ static BOOL enum_alias_memberships(const DOM_SID *member_sid,
DOM_SID **aliases, int *num_aliases)
{
TALLOC_CTX *mem_ctx = talloc_init("enum_alias_memberships");
- DOM_SID builtin_sid;
uint32 *rids = NULL;
int i, num_rids = 0;
@@ -948,15 +947,13 @@ static BOOL enum_alias_memberships(const DOM_SID *member_sid,
add_sid_to_array(NULL, &alias_sid, aliases, num_aliases);
}
- string_to_sid(&builtin_sid, "S-1-5-32");
-
- if (!pdb_enum_alias_memberships(mem_ctx, &builtin_sid,
+ if (!pdb_enum_alias_memberships(mem_ctx, &global_sid_Builtin,
member_sid, 1, &rids, &num_rids))
goto done;
for (i=0; i<num_rids; i++) {
DOM_SID alias_sid;
- sid_copy(&alias_sid, &builtin_sid);
+ sid_copy(&alias_sid, &global_sid_Builtin);
sid_append_rid(&alias_sid, rids[i]);
add_sid_to_array(NULL, &alias_sid, aliases, num_aliases);
}
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index 686caf19f3..68560c040e 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -91,13 +91,7 @@ static BOOL is_internal_domain(const DOM_SID *sid)
if (sid == NULL)
return False;
- if (sid_compare_domain(sid, get_global_sam_sid()) == 0)
- return True;
-
- if (sid_compare_domain(sid, &global_sid_Builtin) == 0)
- return True;
-
- return False;
+ return (sid_check_is_domain(sid) || sid_check_is_builtin(sid));
}