[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Thu Jun 28 12:40:02 MDT 2012


The branch, master has been updated
       via  a29bf4a selftest: run pdbtest against s3dc as well
       via  30fd88e selftest: use a loop rather than declare tests for both dc and s3dc
       via  15b9198 librpc/ndr: Initilaise the remainder of struct dom_sid after a pull
      from  7468ce6 s4-torture: fix typo in samlogon test.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a29bf4acf573e46b8bbb0bfe33df94b409825b27
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Jun 28 21:21:23 2012 +1000

    selftest: run pdbtest against s3dc as well
    
    This validates the password expiry, account disable in the s3 auth code
    and the save/restore of values in tdbsam.
    
    It also provides the first test of some net sam set subcommands.
    
    Andrew Bartlett
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Thu Jun 28 20:39:38 CEST 2012 on sn-devel-104

commit 30fd88ed65ee470f366afec4fdd84054edda754f
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Jun 28 20:42:31 2012 +1000

    selftest: use a loop rather than declare tests for both dc and s3dc

commit 15b9198644613536401a49dd779d4e9be706d980
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Jun 26 20:07:32 2012 +1000

    librpc/ndr: Initilaise the remainder of struct dom_sid after a pull
    
    This copes with the fact that r->sub_auths is a fixed-size array, not
    an allocated pointer, and so will still have some bytes no filled in
    if the sid did not have a MAX_SUB_AUTHS sub-authorities.
    
    Andrew Bartlett

-----------------------------------------------------------------------

Summary of changes:
 librpc/ndr/ndr_sec_helper.c        |    1 +
 source4/selftest/tests.py          |   34 +++++++++++++++++-----------------
 testprogs/blackbox/test_pdbtest.sh |    6 +++---
 3 files changed, 21 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/ndr/ndr_sec_helper.c b/librpc/ndr/ndr_sec_helper.c
index 984b6bd..66b0013 100644
--- a/librpc/ndr/ndr_sec_helper.c
+++ b/librpc/ndr/ndr_sec_helper.c
@@ -335,6 +335,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags,
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6));
+		ZERO_STRUCT(r->sub_auths);
 		for (cntr_sub_auths_0 = 0; cntr_sub_auths_0 < r->num_auths; cntr_sub_auths_0++) {
 			NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_auths[cntr_sub_auths_0]));
 		}
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 7c34090..97030ba 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -172,22 +172,23 @@ for t in net_tests:
 # FIXME: Integrate these into a single smbtorture test
 
 transport = "ncacn_np"
-for ntlmoptions in [
-    "-k no --option=usespnego=yes",
-    "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no",
-    "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=yes",
-    "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=no",
-    "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
-    "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no",
-    "-k no --option=usespnego=yes --option=clientntlmv2auth=yes",
-    "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no",
-    "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
-    "-k no --option=usespnego=no --option=clientntlmv2auth=yes",
-    "-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes",
-    "-k no --option=usespnego=no"]:
-    name = "rpc.lsa.secrets on %s with with %s" % (transport, ntlmoptions)
-    plansmbtorturetestsuite('rpc.lsa.secrets', "dc", ["%s:$SERVER[]" % (transport), ntlmoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.%s" % name)
-    plansmbtorturetestsuite('rpc.lsa.secrets', "s3dc", ["%s:$SERVER[]" % (transport), ntlmoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.%s" % name)
+for env in ["dc", "s3dc"]:
+    for ntlmoptions in [
+        "-k no --option=usespnego=yes",
+        "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no",
+        "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=yes",
+        "-k no --option=usespnego=yes --option=ntlmssp_client:56bit=no",
+        "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
+        "-k no --option=usespnego=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=no",
+        "-k no --option=usespnego=yes --option=clientntlmv2auth=yes",
+        "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no",
+        "-k no --option=usespnego=yes --option=clientntlmv2auth=yes --option=ntlmssp_client:128bit=no --option=ntlmssp_client:56bit=yes",
+        "-k no --option=usespnego=no --option=clientntlmv2auth=yes",
+        "-k no --option=gensec:spnego=no --option=clientntlmv2auth=yes",
+        "-k no --option=usespnego=no"]:
+        name = "rpc.lsa.secrets on %s with with %s" % (transport, ntlmoptions)
+        plansmbtorturetestsuite('rpc.lsa.secrets', env, ["%s:$SERVER[]" % (transport), ntlmoptions, '-U$USERNAME%$PASSWORD', '--workgroup=$DOMAIN', '--option=gensec:target_hostname=$NETBIOSNAME'], "samba4.%s" % name)
+    plantestsuite("samba4.blackbox.pdbtest", "%s:local" % env, [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", smbclient, '$SMB_CONF_PATH', configuration])
 
 transports = ["ncacn_np", "ncacn_ip_tcp"]
 
@@ -310,7 +311,6 @@ plantestsuite("samba4.blackbox.kinit(fl2000dc:local)", "fl2000dc:local", [os.pat
 plantestsuite("samba4.blackbox.kinit(fl2008r2dc:local)", "fl2008r2dc:local", [os.path.join(bbdir, "test_kinit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", smbclient, configuration])
 plantestsuite("samba4.blackbox.ktpass(dc)", "dc", [os.path.join(bbdir, "test_ktpass.sh"), '$PREFIX'])
 plantestsuite("samba4.blackbox.passwords(dc:local)", "dc:local", [os.path.join(bbdir, "test_passwords.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', "$PREFIX", smbclient])
-plantestsuite("samba4.blackbox.pdbtest(dc:local)", "dc:local", [os.path.join(bbdir, "test_pdbtest.sh"), '$SERVER', "$PREFIX", smbclient, "dc", configuration])
 plantestsuite("samba4.blackbox.export.keytab(dc:local)", "dc:local", [os.path.join(bbdir, "test_export_keytab.sh"), '$SERVER', '$USERNAME', '$REALM', '$DOMAIN', "$PREFIX", smbclient])
 plantestsuite("samba4.blackbox.cifsdd(dc)", "dc", [os.path.join(samba4srcdir, "client/tests/test_cifsdd.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "$DOMAIN"])
 plantestsuite("samba4.blackbox.nmblookup(dc)", "dc", [os.path.join(samba4srcdir, "utils/tests/test_nmblookup.sh"), '$NETBIOSNAME', '$NETBIOSALIAS', '$SERVER', '$SERVER_IP', nmblookup])
diff --git a/testprogs/blackbox/test_pdbtest.sh b/testprogs/blackbox/test_pdbtest.sh
index d5b5be3..1e33a0b 100755
--- a/testprogs/blackbox/test_pdbtest.sh
+++ b/testprogs/blackbox/test_pdbtest.sh
@@ -5,7 +5,7 @@
 
 if [ $# -lt 2 ]; then
 cat <<EOF
-Usage: test_pdbtest.sh SERVER PREFIX SMBCLIENT ENV
+Usage: test_pdbtest.sh SERVER PREFIX SMBCLIENT SMB_CONF
 EOF
 exit 1;
 fi
@@ -13,7 +13,7 @@ fi
 SERVER=$1
 PREFIX=$2
 smbclient=$3
-ENV=$4
+SMB_CONF=$4
 shift 4
 failed=0
 
@@ -73,7 +73,7 @@ expect Retype new SMB password:
 send ${NEWUSERPASS}\n
 EOF
 
-testit "set user password with smbpasswd" $rkpty ./tmpsmbpasswdscript $smbpasswd -L pdbtest -c $PREFIX/$ENV/etc/smb.conf || failed=`expr $failed + 1`
+testit "set user password with smbpasswd" $rkpty ./tmpsmbpasswdscript $smbpasswd -L pdbtest -c $SMB_CONF || failed=`expr $failed + 1`
 USERPASS=$NEWUSERPASS
 
 test_smbclient "Test login with user (ntlm)" 'ls' -k no -Updbtest%$NEWUSERPASS $@|| failed=`expr $failed + 1`


-- 
Samba Shared Repository


More information about the samba-cvs mailing list