summaryrefslogtreecommitdiff
path: root/source3/sam
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-09-12 11:56:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:03:35 -0500
commit1fe2c5f9f0df811d800bebd8a3e174ed9b0e50fa (patch)
tree66ebf2a2e8c5345096ed01efd693cbedd96eced5 /source3/sam
parent8779f74eef46d795c5e086eec5bedda57f3520e6 (diff)
downloadsamba-1fe2c5f9f0df811d800bebd8a3e174ed9b0e50fa.tar.gz
samba-1fe2c5f9f0df811d800bebd8a3e174ed9b0e50fa.tar.bz2
samba-1fe2c5f9f0df811d800bebd8a3e174ed9b0e50fa.zip
r10170: Fix for #3056:
Allow to include BUILTIN to the mapping table also when "allow trusted domains" is disabled. Guenther (This used to be commit 3ccb1913a771a187ee61a87869966beb7645f2f9)
Diffstat (limited to 'source3/sam')
-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())) {