summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/winbindd/winbindd_util.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index 0175990f0c..0e6ba1c043 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/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;
}