summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/sam/idmap_rid.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/sam/idmap_rid.c b/source3/sam/idmap_rid.c
index a23da3e578..0ba9794696 100644
--- a/source3/sam/idmap_rid.c
+++ b/source3/sam/idmap_rid.c
@@ -159,11 +159,10 @@ static NTSTATUS rid_idmap_get_domains(uint32 *num_domains, fstring **domain_name
char **trusted_domain_names;
DOM_SID *trusted_domain_sids;
uint32 enum_ctx = 0;
- DOM_SID builtin_sid;
int own_domains = 2;
/* put the results together */
- *num_domains = 1;
+ *num_domains = 2;
*domain_names = SMB_MALLOC_ARRAY(fstring, *num_domains);
*domain_sids = SMB_MALLOC_ARRAY(DOM_SID, *num_domains);
@@ -177,6 +176,10 @@ static NTSTATUS rid_idmap_get_domains(uint32 *num_domains, fstring **domain_name
}
sid_copy(&(*domain_sids)[0], &sid);
+ /* add BUILTIN */
+ fstrcpy((*domain_names)[1], "BUILTIN");
+ sid_copy(&(*domain_sids)[1], &global_sid_Builtin);
+
return NT_STATUS_OK;
}
@@ -286,9 +289,8 @@ static NTSTATUS rid_idmap_get_domains(uint32 *num_domains, fstring **domain_name
sid_copy(&(*domain_sids)[0], domain_sid);
/* then add BUILTIN */
- string_to_sid(&builtin_sid, "S-1-5-32");
fstrcpy((*domain_names)[1], "BUILTIN");
- sid_copy(&(*domain_sids)[1], &builtin_sid);
+ sid_copy(&(*domain_sids)[1], &global_sid_Builtin);
/* then add my local sid */
if (!sid_equal(domain_sid, get_global_sam_sid())) {