1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
#! /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
if [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch) patch -f --no-backup-if-mismatch -p0 < $0;;
-unpatch) patch -f --no-backup-if-mismatch -R -p0 < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac
exit 0
--- helpers/basic_auth/SMB/smb_auth.sh 2001-01-08 00:36:46.000000000 +0100
+++ helpers/basic_auth/SMB/smb_auth.sh 2002-10-10 19:45:33.000000000 +0200
@@ -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
|