summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-03-22 16:35:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:11 -0500
commitd44a7379323cc44f49ac1f5e57ce1b8a9d6c3f31 (patch)
tree3f78cd02ce518778b3199b693e0b6204e64be29a /source3/utils
parent7c198517dab63158cd4035e879a6b75db0b54b14 (diff)
downloadsamba-d44a7379323cc44f49ac1f5e57ce1b8a9d6c3f31.tar.gz
samba-d44a7379323cc44f49ac1f5e57ce1b8a9d6c3f31.tar.bz2
samba-d44a7379323cc44f49ac1f5e57ce1b8a9d6c3f31.zip
r5955: BUG 2517: use the realm from smb.conf for 'net ads info' when 'disable netbios = yes'
(This used to be commit 77734120d30c64941e2046574c81653c5bca4220)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 72e8f70a7d..9c00f05bfb 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -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;