[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Sun Jun 19 17:08:03 UTC 2016
The branch, master has been updated
via ea3ca6b selftest: Kerberos auth with netbios alias SPNs
from 9379a86 s3/net: print returned addresses in dns gethostbyname
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ea3ca6be6425ffd8dffa22a122afabd47b7bb510
Author: Ralph Boehme <slow at samba.org>
Date: Sat Jun 18 19:30:46 2016 +0200
selftest: Kerberos auth with netbios alias SPNs
Since commit 0f6d51f34baa816b6ec422c8bc28687f0a3073de 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 at samba.org>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Sun Jun 19 19:07:46 CEST 2016 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
selftest/target/Samba3.pm | 1 +
.../script/tests/test_smbclient_netbios_aliases.sh | 40 ++++++++++++++++++++++
source3/selftest/tests.py | 5 +++
3 files changed, 46 insertions(+)
create mode 100755 source3/script/tests/test_smbclient_netbios_aliases.sh
Changeset truncated at 500 lines:
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 7a67e77..3f6fd1e 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -380,6 +380,7 @@ sub setup_admember($$$$)
security = ads
workgroup = $dcvars->{DOMAIN}
realm = $dcvars->{REALM}
+ netbios aliases = foo bar
";
my $ret = $self->provision($prefix,
diff --git a/source3/script/tests/test_smbclient_netbios_aliases.sh b/source3/script/tests/test_smbclient_netbios_aliases.sh
new file mode 100755
index 0000000..cb0d967
--- /dev/null
+++ b/source3/script/tests/test_smbclient_netbios_aliases.sh
@@ -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
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 45a7787..cc635cd 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -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:
--
Samba Shared Repository
More information about the samba-cvs
mailing list