summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2010-07-16 11:07:31 -0700
committerJames Peach <jpeach@samba.org>2010-07-16 11:13:21 -0700
commitec25a000317f863df7af0d97f1fd8948b2f8959d (patch)
treeb0f90b6e06f73eeb48104463fbe7ff9a0dac1a47 /source4
parente058de31e81a23692ccb2bef290042a558e0e795 (diff)
downloadsamba-ec25a000317f863df7af0d97f1fd8948b2f8959d.tar.gz
samba-ec25a000317f863df7af0d97f1fd8948b2f8959d.tar.bz2
samba-ec25a000317f863df7af0d97f1fd8948b2f8959d.zip
smbtorture shell: Allow any config option to be set.
Not sure what I was thinking by restricting the shell to "torture:" parametric options. It's really extemely useful to be able to set arbitrary options.
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/shell.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/torture/shell.c b/source4/torture/shell.c
index 7c313af178..03c670a902 100644
--- a/source4/torture/shell.c
+++ b/source4/torture/shell.c
@@ -175,8 +175,6 @@ static void shell_help(const struct shell_command * command,
static void shell_set(const struct shell_command *command,
struct torture_context *tctx, int argc, const char **argv)
{
- char * name;
-
switch (argc) {
case 0:
lpcfg_dump(tctx->lp_ctx, stdout,
@@ -185,9 +183,12 @@ static void shell_set(const struct shell_command *command,
break;
case 2:
- name = talloc_asprintf(NULL, "torture:%s", argv[0]);
- lpcfg_set_cmdline(tctx->lp_ctx, name, argv[1]);
- talloc_free(name);
+ /* We want to allow users to set any config option. Top level
+ * options will get checked against their static definition, but
+ * parametric options can't be checked and will just get stashed
+ * as they are provided.
+ */
+ lpcfg_set_cmdline(tctx->lp_ctx, argv[0], argv[1]);
break;
default: