svn commit: samba r4221 - branches/SAMBA_3_0/source/sam
trunk/source/sam
gd at samba.org
gd at samba.org
Wed Dec 15 14:16:12 GMT 2004
Author: gd
Date: 2004-12-15 14:16:12 +0000 (Wed, 15 Dec 2004)
New Revision: 4221
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4221
Log:
when in the multi-mapping mode of idmap_rid:
allow BUILTIN domain-mapping.
Guenther
Modified:
branches/SAMBA_3_0/source/sam/idmap_rid.c
trunk/source/sam/idmap_rid.c
Changeset:
Modified: branches/SAMBA_3_0/source/sam/idmap_rid.c
===================================================================
--- branches/SAMBA_3_0/source/sam/idmap_rid.c 2004-12-15 13:13:31 UTC (rev 4220)
+++ branches/SAMBA_3_0/source/sam/idmap_rid.c 2004-12-15 14:16:12 UTC (rev 4221)
@@ -159,6 +159,7 @@
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 @@
}
/* 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 */
Modified: trunk/source/sam/idmap_rid.c
===================================================================
--- trunk/source/sam/idmap_rid.c 2004-12-15 13:13:31 UTC (rev 4220)
+++ trunk/source/sam/idmap_rid.c 2004-12-15 14:16:12 UTC (rev 4221)
@@ -159,6 +159,7 @@
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 @@
}
/* 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 */
More information about the samba-cvs
mailing list