mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
ea3ca6be64
Since commit 0f6d51f34b
libnet_join
automatically adds netbios aliases as SPNs to the machine account.
This commit adds a simple test with smbclient -k against the aliases.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sun Jun 19 19:07:46 CEST 2016 on sn-devel-144
41 lines
868 B
Bash
Executable File
41 lines
868 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ $# -lt 1 ]; then
|
|
cat <<EOF
|
|
Usage: test_smbclient.sh smbclient3 SERVER USERNAME PASSWORD PREFIX <smbclient args>
|
|
EOF
|
|
exit 1;
|
|
fi
|
|
|
|
SMBCLIENT3=$1
|
|
SERVER=$2
|
|
USERNAME=$3
|
|
PASSWORD=$4
|
|
PREFIX=$5
|
|
shift 5
|
|
ADDARGS="$*"
|
|
|
|
samba4bindir="$BINDIR"
|
|
samba4srcdir="$SRCDIR/source4"
|
|
samba4kinit=kinit
|
|
if test -x $BINDIR/samba4kinit; then
|
|
samba4kinit=$BINDIR/samba4kinit
|
|
fi
|
|
|
|
KRB5CCNAME_PATH="$PREFIX/tmpccache"
|
|
KRB5CCNAME="FILE:$KRB5CCNAME_PATH"
|
|
export KRB5CCNAME
|
|
rm -rf $KRB5CCNAME_PATH
|
|
|
|
incdir=`dirname $0`/../../../testprogs/blackbox
|
|
. $incdir/subunit.sh
|
|
|
|
echo $PASSWORD > $PREFIX/tmppassfile
|
|
testit "kinit" $samba4kinit --password-file=$PREFIX/tmppassfile $USERNAME || failed=`expr $failed + 1`
|
|
rm -f $PREFIX/tmppassfile
|
|
testit "smbclient" $VALGRIND $SMBCLIENT3 -k //$SERVER/tmp -c 'ls' $ADDARGS || failed=`expr $failed + 1`
|
|
|
|
rm -rf $KRB5CCNAME_PATH
|
|
|
|
testok $0 $failed
|