]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
basic_smb_auth: nmblookup fails when smb.conf contaisn WINS servers
authorJohn M Cooper <john.cooper@yourcommunications.co.uk>
Fri, 31 Jul 2015 06:16:51 +0000 (23:16 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 31 Jul 2015 06:16:51 +0000 (23:16 -0700)
 From; John M Cooper
 To; Debian Bug Tracking System
 Subject; squid: smb_auth does not work with a wins server defined in smb.conf
 Date; 28 Jan 2002 17:46:13 +0000

If you define a wins server in the file /etc/samba/smb.conf then the
smb_auth script gets the wrong Domain Controller IP address.

There should be a change to mb_auth.sh at line 50

basically adding in the extra "\..+" stops the number of Wins servers
from being returned from the nmblookup command.

helpers/basic_auth/SMB/basic_smb_auth.sh

index f2d6a7d6588ff88a3ffd8173717d1844f0e17b35..a3d035303b6dde83db38937e293660a0cb9675a3 100755 (executable)
@@ -53,7 +53,7 @@ else
   addropt=""
 fi
 echo "Query address options: $addropt"
-dcip=`nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+ / { print $1 ; exit }'`
+dcip=`nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+\..+ / { print $1 ; exit }'`
 echo "Domain controller IP address: $dcip"
 [ -n "$dcip" ] || exit 1