summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2002-08-19 00:19:44 +0000
committerJelmer Vernooij <jelmer@samba.org>2002-08-19 00:19:44 +0000
commitcb2478befbcac990f6b601262a351733657ea497 (patch)
tree3fd088975f580ebb0d74df396d028733a3f56576 /source3/torture
parentc9df8aa9cdd7400c346e9ef318a52d7256a015f0 (diff)
downloadsamba-cb2478befbcac990f6b601262a351733657ea497.tar.gz
samba-cb2478befbcac990f6b601262a351733657ea497.tar.bz2
samba-cb2478befbcac990f6b601262a351733657ea497.zip
Add 'conf' command to load different smb.conf files
(This used to be commit 9b4deb1e0f36968bf9b83120b12e6692b20df9d4)
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/vfstest.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c
index 18d4514c93..b8773d5785 100644
--- a/source3/torture/vfstest.c
+++ b/source3/torture/vfstest.c
@@ -108,7 +108,24 @@ static char* next_command (char** cmdstr)
return command;
}
+/* Load specified configuration file */
+static NTSTATUS cmd_conf(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
+ int argc, char **argv)
+{
+ if (argc != 2) {
+ printf("Usage: %s <smb.conf>\n", argv[0]);
+ return NT_STATUS_OK;
+ }
+ if (!lp_load(argv[1], False, True, False)) {
+ printf("Error loading \"%s\"\n", argv[1]);
+ return NT_STATUS_OK;
+ }
+
+ printf("\"%s\" successfully loaded\n", argv[1]);
+ return NT_STATUS_OK;
+}
+
/* Display help on commands */
static NTSTATUS cmd_help(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
int argc, char **argv)
@@ -206,10 +223,11 @@ static struct cmd_set vfstest_commands[] = {
{ "GENERAL OPTIONS" },
- { "help", cmd_help, "Get help on commands", "[command]" },
- { "?", cmd_help, "Get help on commands", "[command]" },
- { "debuglevel", cmd_debuglevel, "Set debug level", "level" },
- { "freemem", cmd_freemem, "Free currently allocated buffers", "freemem" },
+ { "conf", cmd_conf, "Load smb configuration file", "conf <smb.conf>" },
+ { "help", cmd_help, "Get help on commands", "" },
+ { "?", cmd_help, "Get help on commands", "" },
+ { "debuglevel", cmd_debuglevel, "Set debug level", "" },
+ { "freemem", cmd_freemem, "Free currently allocated buffers", "" },
{ "exit", cmd_quit, "Exit program", "" },
{ "quit", cmd_quit, "Exit program", "" },