]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r5955: BUG 2517: use the realm from smb.conf for 'net ads info' when 'disable netbios...
authorGerald Carter <jerry@samba.org>
Tue, 22 Mar 2005 16:35:15 +0000 (16:35 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:11 +0000 (10:56 -0500)
source/utils/net_ads.c

index 72e8f70a7d86e4e7639550f48d26072df911d7ca..9c00f05bfbb7441e7ef7d372668f593d055c1958 100644 (file)
@@ -94,7 +94,12 @@ static int net_ads_info(int argc, const char **argv)
 {
        ADS_STRUCT *ads;
 
-       ads = ads_init(NULL, opt_target_workgroup, opt_host);
+       /* if netbios is disabled we have to default to the realm from smb.conf */
+
+       if ( lp_disable_netbios() && *lp_realm() )
+               ads = ads_init(lp_realm(), opt_target_workgroup, opt_host);
+       else
+               ads = ads_init(NULL, opt_target_workgroup, opt_host);
 
        if (ads) {
                ads->auth.flags |= ADS_AUTH_NO_BIND;