[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-2931-g20e0bb4
Kai Blin
kai at samba.org
Fri Jun 20 22:44:42 GMT 2008
The branch, v3-3-test has been updated
via 20e0bb4800938863cb0aac1a19473748132043fc (commit)
from 8c87a4319cc83f55fb105cae81a8efbc3fb5b98b (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 20e0bb4800938863cb0aac1a19473748132043fc
Author: Kai Blin <kai at samba.org>
Date: Sat Jun 21 00:07:21 2008 +0200
net: Don't crash on invalid command line options.
This backs out the workaround Jerry added in
4c3bfea9f8d238f9100eaa264b9b2941dff5a6dd.
Thanks for the catch.
-----------------------------------------------------------------------
Summary of changes:
source/utils/net.c | 2 +-
source/utils/net_util.c | 7 -------
2 files changed, 1 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/utils/net.c b/source/utils/net.c
index c298fdb..d086f94 100644
--- a/source/utils/net.c
+++ b/source/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/source/utils/net_util.c b/source/utils/net_util.c
index 8938b9c..ae1d4ea 100644
--- a/source/utils/net_util.c
+++ b/source/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)
--
Samba Shared Repository
More information about the samba-cvs
mailing list