diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-09-20 18:37:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:56 -0500 |
commit | 8ad224663576b32a4bcd43f808851d2cdde34656 (patch) | |
tree | 8389e30af18bdd507ea1671f908bdad611b5fdb6 /source3/winbindd | |
parent | 2bb7ebdcb737fa621f8935680d28504f1ea38252 (diff) | |
download | samba-8ad224663576b32a4bcd43f808851d2cdde34656.tar.gz samba-8ad224663576b32a4bcd43f808851d2cdde34656.tar.bz2 samba-8ad224663576b32a4bcd43f808851d2cdde34656.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
(This used to be commit b8d67b78aa1c35e4e7e61050c1fccbb6d76d9fd7)
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_util.c | 40 |
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; } |