diff options
-rw-r--r-- | source3/utils/net.c | 2 | ||||
-rw-r--r-- | source3/utils/net_util.c | 7 |
2 files changed, 1 insertions, 8 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c index c298fdb461..d086f947f1 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -664,6 +664,7 @@ static struct functable net_func[] = { /* set default debug level to 0 regardless of what smb.conf sets */ DEBUGLEVEL_CLASS[DBGC_ALL] = 0; dbf = x_stderr; + c->private_data = net_func; pc = poptGetContext(NULL, argc, (const char **) argv, long_options, POPT_CONTEXT_KEEP_FIRST); @@ -758,7 +759,6 @@ static struct functable net_func[] = { c->opt_password = getenv("PASSWD"); } - c->private_data = net_func; rc = net_run_function(c, argc_new-1, argv_new+1, "net", net_func); DEBUG(2,("return code = %d\n", rc)); diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index 8938b9cf01..ae1d4ea2b6 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -551,13 +551,6 @@ int net_run_function(struct net_context *c, int argc, const char **argv, { int i; - if (!table) { - d_fprintf(stderr, "Invalid command. Run \"%s\" for more details.\n", - whoami); - return 1; - } - - if (argc != 0) { for (i=0; table[i].funcname != NULL; i++) { if (StrCaseCmp(argv[0], table[i].funcname) == 0) |