diff options
author | Gerald Carter <jerry@samba.org> | 2003-09-04 19:45:04 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-09-04 19:45:04 +0000 |
commit | bf0f3be29dc04f51ebf18425abb41979fdb7897a (patch) | |
tree | a4d7df8591064c28f541edc9330f3edba3822f74 /source3/utils | |
parent | 22831019dcf9dad93256e7104e41bebcbc666c02 (diff) | |
download | samba-bf0f3be29dc04f51ebf18425abb41979fdb7897a.tar.gz samba-bf0f3be29dc04f51ebf18425abb41979fdb7897a.tar.bz2 samba-bf0f3be29dc04f51ebf18425abb41979fdb7897a.zip |
Check in Andrew's fix for bug #305 (always use lp_realm() )
Also make sure thet ads_startup uses lp_realm instead of
just relying on the workgroup name. Fixes bug in net ads join
when the workgroup defaults to "WORKGROUP" and we ignore the
realm name.
(This used to be commit b1763ace4e85f41574894e3807cabb5196fec661)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_ads.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 352431a938..0e909a6087 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -127,9 +127,14 @@ static ADS_STRUCT *ads_startup(void) ADS_STATUS status; BOOL need_password = False; BOOL second_time = False; - char *cp; + char *cp; - ads = ads_init(NULL, opt_target_workgroup, opt_host); + /* lp_realm() should be handled by a command line param, + However, the join requires that realm be set in smb.conf + and compares our realm with the remote server's so this is + ok until someone needs more flexibility */ + + ads = ads_init(lp_realm(), opt_target_workgroup, opt_host); if (!opt_user_name) { opt_user_name = "administrator"; |