[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha5-159-g4d80dbf

Stefan Metzmacher metze at samba.org
Sat Jul 26 18:12:15 GMT 2008


The branch, v4-0-test has been updated
       via  4d80dbfac27659046e0986a2af3d06999e2cb2f2 (commit)
      from  396ea14732d667960091f4a2570341059914ecb6 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 4d80dbfac27659046e0986a2af3d06999e2cb2f2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed May 14 09:47:18 2008 +0200

    smbtorture: add --extra-user option
    
    This can we used to pass additional credentials to torture tests
    (it can be used multiple times.
    
    metze

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

Summary of changes:
 source/torture/smbtorture.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/torture/smbtorture.c b/source/torture/smbtorture.c
index 37d7d17..1329f03 100644
--- a/source/torture/smbtorture.c
+++ b/source/torture/smbtorture.c
@@ -540,8 +540,9 @@ int main(int argc,char *argv[])
 	const char *basedir = NULL;
 	const char *extra_module = NULL;
 	static int list_tests = 0;
+	int num_extra_users = 0;
 	enum {OPT_LOADFILE=1000,OPT_UNCLIST,OPT_TIMELIMIT,OPT_DNS, OPT_LIST,
-	      OPT_DANGEROUS,OPT_SMB_PORTS,OPT_ASYNC,OPT_NUMPROGS};
+	      OPT_DANGEROUS,OPT_SMB_PORTS,OPT_ASYNC,OPT_NUMPROGS,OPT_EXTRA_USER};
 	
 	struct poptOption long_options[] = {
 		POPT_AUTOHELP
@@ -569,6 +570,8 @@ int main(int argc,char *argv[])
 		 "number of simultaneous async requests", NULL},
 		{"maximum-runtime", 0, POPT_ARG_INT, &max_runtime, 0, 
 		 "set maximum time for smbtorture to live", "seconds"},
+		{"extra-user",   0, POPT_ARG_STRING, NULL, OPT_EXTRA_USER,
+		 "extra user credentials", NULL},
 		POPT_COMMON_SAMBA
 		POPT_COMMON_CONNECTION
 		POPT_COMMON_CREDENTIALS
@@ -612,6 +615,15 @@ int main(int argc,char *argv[])
 		case OPT_SMB_PORTS:
 			lp_set_cmdline(cmdline_lp_ctx, "smb ports", poptGetOptArg(pc));
 			break;
+		case OPT_EXTRA_USER:
+			{
+				char *option = talloc_asprintf(NULL, "torture:extra_user%u",
+							       ++num_extra_users);
+				char *value = poptGetOptArg(pc);
+				lp_set_cmdline(cmdline_lp_ctx, option, value);
+				talloc_free(option);
+			}
+			break;
 		}
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list