summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2004-12-15 14:16:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:38 -0500
commit5f731a20f7f3dab9999bc87a6f818856f08a9fb1 (patch)
treedebc01d0e936b59de648c9096312ee014db484ef /source3
parent4027c4088b0e5e4d6f87781a44f8703c62f24027 (diff)
downloadsamba-5f731a20f7f3dab9999bc87a6f818856f08a9fb1.tar.gz
samba-5f731a20f7f3dab9999bc87a6f818856f08a9fb1.tar.bz2
samba-5f731a20f7f3dab9999bc87a6f818856f08a9fb1.zip
r4221: when in the multi-mapping mode of idmap_rid:
allow BUILTIN domain-mapping. Guenther (This used to be commit e3b067ee99e304aa9e165dae5fcb0546cec711e2)
Diffstat (limited to 'source3')
-rw-r--r--source3/sam/idmap_rid.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/sam/idmap_rid.c b/source3/sam/idmap_rid.c
index 8a50839c7e..e1e4551443 100644
--- a/source3/sam/idmap_rid.c
+++ b/source3/sam/idmap_rid.c
@@ -159,6 +159,7 @@ 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;
/* put the results together */
*num_domains = 1;
@@ -271,18 +272,23 @@ static NTSTATUS rid_idmap_get_domains(uint32 *num_domains, fstring **domain_name
}
/* put the results together */
- *num_domains = trusted_num_domains + 1;
+ *num_domains = trusted_num_domains + 2;
*domain_names = (fstring *) realloc(*domain_names, sizeof(fstring) * *num_domains);
*domain_sids = (DOM_SID *) realloc(*domain_sids, sizeof(DOM_SID) * *num_domains);
- /* first add myself at the end*/
+ /* first add myself */
fstrcpy((*domain_names)[0], 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);
+
/* add trusted domains */
for (i=0; i<trusted_num_domains; i++) {
- fstrcpy((*domain_names)[i+1], trusted_domain_names[i]);
- sid_copy(&((*domain_sids)[i+1]), &(trusted_domain_sids[i]));
+ fstrcpy((*domain_names)[i+2], trusted_domain_names[i]);
+ sid_copy(&((*domain_sids)[i+2]), &(trusted_domain_sids[i]));
}
/* show complete domain list */