diff options
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/vfstest.c | 26 |
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", "" }, |