diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-01-08 02:15:46 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2004-01-08 02:15:46 +0000 |
commit | 88d8644ef7f588f585530cbefc1dc5a2133c1114 (patch) | |
tree | c61289d92abfd995012ebfd550d23bf33817e599 /source3/nsswitch/winbindd_misc.c | |
parent | 0e12b8827402155095b1d8d5be23aa26d26b200a (diff) | |
download | samba-88d8644ef7f588f585530cbefc1dc5a2133c1114.tar.gz samba-88d8644ef7f588f585530cbefc1dc5a2133c1114.tar.bz2 samba-88d8644ef7f588f585530cbefc1dc5a2133c1114.zip |
Move more of winbind to use 'find_our_domain()' rather than the dangerous
find_domain_from_name(lp_workgroup()).
(as find_domain_from_name() can change the data in lp_workgroup())
Andrew Bartlett
(This used to be commit 2e6eaad9ce6a0ad6923b5952ef6cf1c3688b7cfa)
Diffstat (limited to 'source3/nsswitch/winbindd_misc.c')
-rw-r--r-- | source3/nsswitch/winbindd_misc.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/source3/nsswitch/winbindd_misc.c b/source3/nsswitch/winbindd_misc.c index d1e5c8cb49..95ca57a5e3 100644 --- a/source3/nsswitch/winbindd_misc.c +++ b/source3/nsswitch/winbindd_misc.c @@ -36,7 +36,6 @@ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *stat int num_retries = 0; struct cli_state *cli; uint32 sec_channel_type; - const char *contact_domain_name = NULL; struct winbindd_domain *contact_domain; DEBUG(3, ("[%5lu]: check machine account\n", (unsigned long)state->pid)); @@ -51,18 +50,10 @@ enum winbindd_result winbindd_check_machine_acct(struct winbindd_cli_state *stat } - /* use the realm name if appropriate and possible */ - - if ( lp_security() == SEC_ADS ) - contact_domain_name = lp_realm(); - - if ( !contact_domain_name || !*contact_domain_name ) - contact_domain_name = lp_workgroup(); - - contact_domain = find_domain_from_name(contact_domain_name); + contact_domain = find_our_domain(); if (!contact_domain) { result = NT_STATUS_CANT_ACCESS_DOMAIN_INFO; - DEBUG(1, ("%s is not a trusted domain\n", contact_domain_name)); + DEBUG(1, ("Cannot find our own domain!\n")); goto done; } |