diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-03-13 17:35:47 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2004-03-13 17:35:47 +0000 |
commit | 9522e181d1537bb4ec5e1d39ee4fb5034d07be20 (patch) | |
tree | 5fc639e35ea6e969b0777022f5db4cb1ac33763a /source3/nsswitch/winbindd_util.c | |
parent | ebd5fe9d02433c5bfe480ae09385ddd3f7e2364c (diff) | |
download | samba-9522e181d1537bb4ec5e1d39ee4fb5034d07be20.tar.gz samba-9522e181d1537bb4ec5e1d39ee4fb5034d07be20.tar.bz2 samba-9522e181d1537bb4ec5e1d39ee4fb5034d07be20.zip |
Add alias support to winbindd_passdb. Sorry, Simo, this does not leave too
much of your winbindd_passdb, users are currently not provided by that, only
aliases. Currently the code to maintain that stuff is not yet in, this will be
next, see my next posting to samba-technical.
Volker
(This used to be commit 9e0fb457ba77a55f8271b6acc91a07f0a8df3760)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 403ba399c8..6ac5c48285 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -150,8 +150,9 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const } /* set flags about native_mode, active_directory */ - - set_dc_type_and_flags( domain ); + + if (!domain->internal) + set_dc_type_and_flags( domain ); DEBUG(3,("add_trusted_domain: %s is an %s %s domain\n", domain->name, domain->active_directory ? "ADS" : "NT4", @@ -303,6 +304,24 @@ BOOL init_domain_list(void) /* do an initial scan for trusted domains */ add_trusted_domains(domain); + + /* Add our local SAM domains */ + { + DOM_SID sid; + extern struct winbindd_methods passdb_methods; + struct winbindd_domain *dom; + + string_to_sid(&sid, "S-1-5-32"); + + dom = add_trusted_domain("BUILTIN", NULL, &passdb_methods, + &sid); + dom->internal = True; + + dom = add_trusted_domain(get_global_sam_name(), NULL, + &passdb_methods, + get_global_sam_sid()); + dom->internal = True; + } /* avoid rescanning this right away */ last_trustdom_scan = time(NULL); |