summaryrefslogtreecommitdiffstats
path: root/source/winbindd/winbindd_util.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-09-20 18:37:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:56 -0500
commitb8d67b78aa1c35e4e7e61050c1fccbb6d76d9fd7 (patch)
tree92856260b8b28fc5107eded290a91483d856e99e /source/winbindd/winbindd_util.c
parent8b5c34b7d141c44d65622f44f9432723230cea47 (diff)
downloadsamba-b8d67b78aa1c35e4e7e61050c1fccbb6d76d9fd7.tar.gz
samba-b8d67b78aa1c35e4e7e61050c1fccbb6d76d9fd7.tar.xz
samba-b8d67b78aa1c35e4e7e61050c1fccbb6d76d9fd7.zip
r25260: add trusted domains always to the end of the list.
Now BUILTIN is always the first domain followed by the domain of our own SAM DB and the primary domain (in member server mode). metze
Diffstat (limited to 'source/winbindd/winbindd_util.c')
-rw-r--r--source/winbindd/winbindd_util.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source/winbindd/winbindd_util.c b/source/winbindd/winbindd_util.c
index 0175990f0cc..0e6ba1c0438 100644
--- a/source/winbindd/winbindd_util.c
+++ b/source/winbindd/winbindd_util.c
@@ -186,7 +186,7 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
}
/* Link to domain list */
- DLIST_ADD(_domain_list, domain);
+ DLIST_ADD_END(_domain_list, domain, struct winbindd_domain *);
wcache_tdc_add_domain( domain );
@@ -688,6 +688,25 @@ BOOL init_domain_list(void)
/* Free existing list */
free_domain_list();
+ /* BUILTIN domain */
+
+ domain = add_trusted_domain("BUILTIN", NULL, &passdb_methods,
+ &global_sid_Builtin);
+ if (domain) {
+ setup_domain_child(domain, &domain->child, NULL);
+ }
+
+ /* Local SAM */
+
+ domain = add_trusted_domain(get_global_sam_name(), NULL,
+ &passdb_methods, get_global_sam_sid());
+ if (domain) {
+ if ( role != ROLE_DOMAIN_MEMBER ) {
+ domain->primary = True;
+ }
+ setup_domain_child(domain, &domain->child, NULL);
+ }
+
/* Add ourselves as the first entry. */
if ( role == ROLE_DOMAIN_MEMBER ) {
@@ -714,25 +733,6 @@ BOOL init_domain_list(void)
}
}
- /* Local SAM */
-
- domain = add_trusted_domain(get_global_sam_name(), NULL,
- &passdb_methods, get_global_sam_sid());
- if (domain) {
- if ( role != ROLE_DOMAIN_MEMBER ) {
- domain->primary = True;
- }
- setup_domain_child(domain, &domain->child, NULL);
- }
-
- /* BUILTIN domain */
-
- domain = add_trusted_domain("BUILTIN", NULL, &passdb_methods,
- &global_sid_Builtin);
- if (domain) {
- setup_domain_child(domain, &domain->child, NULL);
- }
-
return True;
}