[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Fri Oct 15 04:15:02 MDT 2010


The branch, master has been updated
       via  0061116 s4-test: fixed a typo in test_kinit.sh
       via  d59a342 s4-test: fixed test_kinit.sh time command test
       via  918d864 s4-net: exit with a failure when a command is unknown
       via  add7ddb script: the --tests option has been replaced by --test-command
       via  bda626d s4-finddcs: better debug messages to help track down DNS problems
       via  77a16bf s4-net: fix the dependence on command line ordering
      from  10e1de3 s4:samdb_msg_add_int* - use "ldb_msg_add_string" rather than "samdb_msg_add_string"

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


- Log -----------------------------------------------------------------
commit 006111646c0a032cc8d76cf54adfd55a79e18761
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Oct 15 20:32:09 2010 +1100

    s4-test: fixed a typo in test_kinit.sh
    
    too many Ts
    
    Autobuild-User: Andrew Tridgell <tridge at samba.org>
    Autobuild-Date: Fri Oct 15 10:14:27 UTC 2010 on sn-devel-104

commit d59a342c7120fb5d997591ec7425d1560e947416
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Oct 15 20:31:06 2010 +1100

    s4-test: fixed test_kinit.sh time command test
    
    passing -W breaks -k yes

commit 918d864a67fc4b94abe2d36dec32160a17eaa259
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Oct 15 20:30:03 2010 +1100

    s4-net: exit with a failure when a command is unknown
    
    this ensures we don't pass bad tests in 'make test' if they call
    unknown net commands

commit add7ddb2e01ff4000513e0136aa2bc305228e561
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Oct 15 17:43:44 2010 +1100

    script: the --tests option has been replaced by --test-command

commit bda626da8149d58b82c16015e30f22681e06a962
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Oct 15 17:40:53 2010 +1100

    s4-finddcs: better debug messages to help track down DNS problems
    
    Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>

commit 77a16bf5046e6026cc8ed8b96c15623c84a17ef7
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Oct 15 12:10:02 2010 +1100

    s4-net: fix the dependence on command line ordering
    
    this fixes python net commands where you use a '-' option before the
    command name
    
    Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>

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

Summary of changes:
 script/bisect-test.py            |    1 -
 source4/libcli/finddcs_cldap.c   |   13 ++++++++++++-
 source4/utils/net/net.c          |   20 +++++++++++---------
 testprogs/blackbox/test_kinit.sh |    4 ++--
 4 files changed, 25 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/script/bisect-test.py b/script/bisect-test.py
index accee7a..e4daa8c 100755
--- a/script/bisect-test.py
+++ b/script/bisect-test.py
@@ -9,7 +9,6 @@ import os, tempfile, sys
 from optparse import OptionParser
 
 parser = OptionParser()
-parser.add_option("", "--tests", help="list of tests to run", default='*')
 parser.add_option("", "--good", help="known good revision (default HEAD~100)", default='HEAD~100')
 parser.add_option("", "--bad", help="known bad revision (default HEAD)", default='HEAD')
 parser.add_option("", "--skip-build-errors", help="skip revision where make fails",
diff --git a/source4/libcli/finddcs_cldap.c b/source4/libcli/finddcs_cldap.c
index 011d35d..4c21f00 100644
--- a/source4/libcli/finddcs_cldap.c
+++ b/source4/libcli/finddcs_cldap.c
@@ -94,15 +94,18 @@ struct tevent_req *finddcs_cldap_send(TALLOC_CTX *mem_ctx,
 	}
 
 	if (io->in.server_address) {
+		DEBUG(4,("finddcs: searching for a DC by IP %s\n", io->in.server_address));
 		if (!finddcs_cldap_ipaddress(state, io)) {
 			return tevent_req_post(req, event_ctx);
 		}
 	} else if (strchr(state->domain_name, '.')) {
 		/* looks like a DNS name */
+		DEBUG(4,("finddcs: searching for a DC by DNS domain %s\n", state->domain_name));
 		if (!finddcs_cldap_srv_lookup(state, io, resolve_ctx, event_ctx)) {
 			return tevent_req_post(req, event_ctx);
 		}
 	} else {
+		DEBUG(4,("finddcs: searching for a DC by NBT lookup %s\n", state->domain_name));
 		if (!finddcs_cldap_nbt_lookup(state, io, resolve_ctx, event_ctx)) {
 			return tevent_req_post(req, event_ctx);
 		}
@@ -157,6 +160,8 @@ static bool finddcs_cldap_srv_lookup(struct finddcs_cldap_state *state,
 		state->srv_name = talloc_asprintf(state, "_ldap._tcp.%s", io->in.domain_name);
 	}
 
+	DEBUG(4,("finddcs: looking for SRV records for %s\n", state->srv_name));
+
 	make_nbt_name(&name, state->srv_name, 0);
 
 	creq = resolve_name_ex_send(resolve_ctx, state,
@@ -229,6 +234,8 @@ static void finddcs_cldap_next_server(struct finddcs_cldap_state *state)
 		NETLOGON_NT_VERSION_IP;
 	state->netlogon->in.map_response = true;
 
+	DEBUG(4,("finddcs: performing CLDAP query on %s\n", state->netlogon->in.dest_address));
+
 	subreq = cldap_netlogon_send(state, state->cldap, state->netlogon);
 	if (tevent_req_nomem(subreq, state->req)) {
 		return;
@@ -258,7 +265,7 @@ static void finddcs_cldap_netlogon_replied(struct tevent_req *subreq)
 	if (state->minimum_dc_flags !=
 	    (state->minimum_dc_flags & state->netlogon->out.netlogon.data.nt5_ex.server_type)) {
 		/* the server didn't match the minimum requirements */
-		DEBUG(4,(__location__ ": Skipping DC %s with server_type=0x%08x - required 0x%08x\n",
+		DEBUG(4,("finddcs: Skipping DC %s with server_type=0x%08x - required 0x%08x\n",
 			 state->srv_addresses[state->srv_address_index],
 			 state->netlogon->out.netlogon.data.nt5_ex.server_type,
 			 state->minimum_dc_flags));
@@ -267,6 +274,10 @@ static void finddcs_cldap_netlogon_replied(struct tevent_req *subreq)
 		return;
 	}
 
+	DEBUG(4,("finddcs: Found matching DC %s with server_type=0x%08x\n",
+		 state->srv_addresses[state->srv_address_index],
+		 state->netlogon->out.netlogon.data.nt5_ex.server_type));
+
 	tevent_req_done(state->req);
 }
 
diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c
index acace9e..95b70ef 100644
--- a/source4/utils/net/net.c
+++ b/source4/utils/net/net.c
@@ -156,7 +156,7 @@ int net_run_function(struct net_context *ctx,
 			return functable[i].fn(ctx, argc-1, argv+1);
 	}
 
-	d_printf("No command: %s\n", argv[0]);
+	d_printf("No command: '%s'\n", argv[0]);
 	return usage_fn(ctx, argc, argv);
 }
 
@@ -274,7 +274,7 @@ static int net_usage(struct net_context *ctx, int argc, const char **argv)
 	d_printf("Usage:\n");
 	d_printf("net <command> [options]\n");
 	net_help(ctx, net_functable);
-	return 0;
+	return -1;
 }
 
 /****************************************************************************
@@ -317,13 +317,15 @@ static int binary_net(int argc, const char **argv)
 		return 1;
 	}
 
-	if (argc > 1) {
-		py_cmd = PyDict_GetItemString(py_cmds, argv[1]);
-		if (py_cmd != NULL) {
-			rc = py_call_with_string_args(py_cmd, "_run",
-				argc-1, argv+1);
-			talloc_free(ev);
-			return rc;
+	for (i=1; i<argc; i++) {
+		if (argv[i][0] != '-') {
+			py_cmd = PyDict_GetItemString(py_cmds, argv[i]);
+			if (py_cmd != NULL) {
+				rc = py_call_with_string_args(py_cmd, "_run",
+							      argc-1, argv+1);
+				talloc_free(ev);
+				return rc;
+			}
 		}
 	}
 
diff --git a/testprogs/blackbox/test_kinit.sh b/testprogs/blackbox/test_kinit.sh
index c748b4d..2e65fe0 100755
--- a/testprogs/blackbox/test_kinit.sh
+++ b/testprogs/blackbox/test_kinit.sh
@@ -68,7 +68,7 @@ testit "kinit renew ticket" $samba4kinit $enctype --request-pac -R
 
 test_smbclient "Test login with kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
 
-testit "check time with kerberos ccache" $VALGRIND $net $CONFIGURATION -W "$DOMAIN" -k yes $@ time $SERVER || failed=`expr $failed + 1`
+testit "check time with kerberos ccache" $VALGRIND $net $CONFIGURATION -k yes $@ time $SERVER || failed=`expr $failed + 1`
 
 USERPASS=testPass at 12%
 echo $USERPASS > ./tmpuserpassfile
@@ -166,7 +166,7 @@ export KRB5CCNAME
 testit "del user with kerberos ccache" $VALGRIND $net user delete nettestuser $CONFIGURATION -k yes $@ || failed=`expr $failed + 1`
 
 rm -f $KRB5CCNAME
-testit "kinit with machineaccountccache script" $machineaccountccache $CONFIGURATTION $KRB5CCNAME || failed=`expr $failed + 1`
+testit "kinit with machineaccountccache script" $machineaccountccache $CONFIGURATION $KRB5CCNAME || failed=`expr $failed + 1`
 test_smbclient "Test machine account login with kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
 
 testit "reset password policies" $VALGRIND $net pwsettings $PWSETCONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`


-- 
Samba Shared Repository


More information about the samba-cvs mailing list