mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
selftest: Kerberos auth with netbios alias SPNs
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
This commit is contained in:
parent
9379a86943
commit
ea3ca6be64
@ -380,6 +380,7 @@ sub setup_admember($$$$)
|
||||
security = ads
|
||||
workgroup = $dcvars->{DOMAIN}
|
||||
realm = $dcvars->{REALM}
|
||||
netbios aliases = foo bar
|
||||
";
|
||||
|
||||
my $ret = $self->provision($prefix,
|
||||
|
40
source3/script/tests/test_smbclient_netbios_aliases.sh
Executable file
40
source3/script/tests/test_smbclient_netbios_aliases.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/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
|
@ -496,6 +496,11 @@ for options in options_list:
|
||||
"none",
|
||||
smbclient3, "$SERVER", "$PREFIX", options, "-U$USERNAME%$PASSWORD " + configuration])
|
||||
|
||||
for alias in ["foo", "bar"]:
|
||||
plantestsuite("samba3.blackbox.smbclient_netbios_aliases [%s]" % alias, "ad_member:local",
|
||||
[os.path.join(samba3srcdir, "script/tests/test_smbclient_netbios_aliases.sh"),
|
||||
smbclient3, alias, "$DC_USERNAME", "$DC_PASSWORD", "$PREFIX", options, configuration])
|
||||
|
||||
for e in endianness_options:
|
||||
for a in auth_options:
|
||||
for s in signseal_options:
|
||||
|
Loading…
Reference in New Issue
Block a user