Sophie

Sophie

distrib > Mandriva > 2008.0 > i586 > by-pkgid > 04e1f3b7aa3e231dfc10b8247f2daf5d > files > 9

squid-2.6.STABLE16-1mdv2008.0.src.rpm

#! /bin/sh -e
## 04-smb-auth.dpatch by Luigi Gangitano <luigi@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Read password with '-r' so backslashes work
## DP: Patch awk regexp to read correct field from nmblookup

--- helpers/basic_auth/SMB/smb_auth.sh	2001-01-07 18:36:46.000000000 -0500
+++ helpers/basic_auth/SMB/smb_auth.sh.oden	2006-07-19 18:41:47.000000000 -0400
@@ -24,7 +24,7 @@
 read AUTHSHARE
 read AUTHFILE
 read SMBUSER
-read SMBPASS
+read -r SMBPASS
 
 # Find domain controller
 echo "Domain name: $DOMAINNAME"
@@ -47,7 +47,7 @@
   addropt=""
 fi
 echo "Query address options: $addropt"
-dcip=`$SAMBAPREFIX/bin/nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+ / { print $1 ; exit }'`
+dcip=`$SAMBAPREFIX/bin/nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+\..+ / { print $1 ; exit }'`
 echo "Domain controller IP address: $dcip"
 [ -n "$dcip" ] || exit 1