[SCM] Samba Shared Repository - branch v4-3-test updated
Karolin Seeger
kseeger at samba.org
Tue May 31 14:35:06 UTC 2016
The branch, v4-3-test has been updated
via a304725 s3:selftest add a test for rpcclient --pw-nt-hash option
via e469ad2 s3:rpcclient make --pw-nt-hash option work
from 5f3cfc8 s3-smbd: Support systemd 230
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-3-test
- Log -----------------------------------------------------------------
commit a3047255803d96452a1db636ba1c9ea0065138f8
Author: Christian Ambach <ambi at samba.org>
Date: Wed May 11 19:21:20 2016 +0200
s3:selftest add a test for rpcclient --pw-nt-hash option
Signed-off-by: Christian Ambach <ambi at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit d0cdf02dc9733dae960021ff1ca07587d8155e58)
Autobuild-User(v4-3-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-3-test): Tue May 31 16:34:38 CEST 2016 on sn-devel-104
commit e469ad278b0a5e9466e128c546680a9ccbb57361
Author: Christian Ambach <ambi at samba.org>
Date: Wed May 11 17:41:24 2016 +0200
s3:rpcclient make --pw-nt-hash option work
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10796
Signed-off-by: Christian Ambach <ambi at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 4fe59879cc2a608194578e33e27e0dc1e2f0fc58)
-----------------------------------------------------------------------
Summary of changes:
source3/rpcclient/rpcclient.c | 3 +++
source3/script/tests/test_rpcclient_pw_nt_hash.sh | 27 +++++++++++++++++++++++
source3/selftest/tests.py | 5 +++++
3 files changed, 35 insertions(+)
create mode 100755 source3/script/tests/test_rpcclient_pw_nt_hash.sh
Changeset truncated at 500 lines:
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index a4edbe8..74ae708 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -1095,6 +1095,9 @@ out_free:
if (get_cmdline_auth_info_use_ccache(rpcclient_auth_info)) {
flags |= CLI_FULL_CONNECTION_USE_CCACHE;
}
+ if (get_cmdline_auth_info_use_pw_nt_hash(rpcclient_auth_info)) {
+ flags |= CLI_FULL_CONNECTION_USE_NT_HASH;
+ }
user = talloc_strdup(frame, get_cmdline_auth_info_username(rpcclient_auth_info));
SMB_ASSERT(user != NULL);
diff --git a/source3/script/tests/test_rpcclient_pw_nt_hash.sh b/source3/script/tests/test_rpcclient_pw_nt_hash.sh
new file mode 100755
index 0000000..c03d22f
--- /dev/null
+++ b/source3/script/tests/test_rpcclient_pw_nt_hash.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Blackbox tests for the rpcclient --pw-nt-hash option
+#
+
+if [ $# -lt 4 ]; then
+cat <<EOF
+Usage: test_rpcclient_pw_nt_hash.sh USERNAME PASSWORD SERVER RPCCLIENT
+EOF
+exit 1;
+fi
+
+USERNAME="$1"
+PASSWORD="$2"
+SERVER="$3"
+RPCCLIENT="$4"
+
+HASH=`echo -n $PASSWORD | iconv -t utf16le | openssl md4 |cut -d ' ' -f2`
+
+RPCCLIENTCMD="$RPCCLIENT $SERVER --pw-nt-hash -U$USERNAME%$HASH -c queryuser"
+
+incdir=$(dirname $0)/../../../testprogs/blackbox
+. $incdir/subunit.sh
+
+testit "rpcclient --pw-nt-hash" $RPCCLIENTCMD || failed=`expr $failed + 1`
+
+testok $0 $failed
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index c0108e0..546b1a0 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -456,6 +456,11 @@ plantestsuite("samba3.blackbox.rpcclient_srvsvc", "simpleserver",
"$USERNAME", "$PASSWORD", "$SERVER",
os.path.join(bindir(), "rpcclient"), "tmp"])
+plantestsuite("samba3.blackbox.rpcclient.pw-nt-hash", "simpleserver",
+ [os.path.join(samba3srcdir, "script/tests/test_rpcclient_pw_nt_hash.sh"),
+ "$USERNAME", "$PASSWORD", "$SERVER",
+ os.path.join(bindir(), "rpcclient")])
+
options_list = ["", "-e"]
for options in options_list:
plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
--
Samba Shared Repository
More information about the samba-cvs
mailing list