summaryrefslogtreecommitdiff
path: root/source3/utils/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net.c')
-rw-r--r--source3/utils/net.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index 7588771fbc..f8ed590d4b 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -70,7 +70,6 @@ int opt_maxusers = -1;
const char *opt_comment = "";
char *opt_container = "cn=Users";
int opt_flags = -1;
-int opt_jobid = 0;
int opt_timeout = 0;
const char *opt_target_workgroup = NULL;
static int opt_machine_pass = 0;
@@ -78,8 +77,6 @@ static int opt_machine_pass = 0;
BOOL opt_have_ip = False;
struct in_addr opt_dest_ip;
-extern BOOL AllowDebugChange;
-
/*
run a function from a function table. If not found then
call the specified usage function
@@ -454,7 +451,7 @@ static int net_maxrid(int argc, const char **argv)
uint32 rid;
if (argc != 0) {
- DEBUG(0, ("usage: net initrid\n"));
+ DEBUG(0, ("usage: net maxrid\n"));
return 1;
}
@@ -513,31 +510,26 @@ static struct functable net_func[] = {
int argc_new = 0;
const char ** argv_new;
poptContext pc;
- static char *servicesf = dyn_CONFIGFILE;
- static char *debuglevel = NULL;
struct poptOption long_options[] = {
{"help", 'h', POPT_ARG_NONE, 0, 'h'},
{"workgroup", 'w', POPT_ARG_STRING, &opt_target_workgroup},
- {"myworkgroup", 'W', POPT_ARG_STRING, &opt_workgroup},
{"user", 'U', POPT_ARG_STRING, &opt_user_name, 'U'},
{"ipaddress", 'I', POPT_ARG_STRING, 0,'I'},
{"port", 'p', POPT_ARG_INT, &opt_port},
{"myname", 'n', POPT_ARG_STRING, &opt_requester_name},
- {"conf", 's', POPT_ARG_STRING, &servicesf},
{"server", 'S', POPT_ARG_STRING, &opt_host},
{"container", 'c', POPT_ARG_STRING, &opt_container},
{"comment", 'C', POPT_ARG_STRING, &opt_comment},
{"maxusers", 'M', POPT_ARG_INT, &opt_maxusers},
{"flags", 'F', POPT_ARG_INT, &opt_flags},
- {"jobid", 'j', POPT_ARG_INT, &opt_jobid},
{"long", 'l', POPT_ARG_NONE, &opt_long_list_entries},
{"reboot", 'r', POPT_ARG_NONE, &opt_reboot},
{"force", 'f', POPT_ARG_NONE, &opt_force},
{"timeout", 't', POPT_ARG_INT, &opt_timeout},
{"machine-pass",'P', POPT_ARG_NONE, &opt_machine_pass},
- {"debuglevel", 'd', POPT_ARG_STRING, &debuglevel},
- {NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_version},
+ {"myworkgroup", 'W', POPT_ARG_STRING, &opt_workgroup},
+ POPT_COMMON_SAMBA
{ 0, 0, 0, 0}
};
@@ -577,13 +569,8 @@ static struct functable net_func[] = {
exit(1);
}
}
-
- if (debuglevel) {
- debug_parse_levels(debuglevel);
- AllowDebugChange = False;
- }
-
- lp_load(servicesf,True,False,False);
+
+ lp_load(dyn_CONFIGFILE,True,False,False);
argv_new = (const char **)poptGetArgs(pc);
@@ -636,6 +623,10 @@ static struct functable net_func[] = {
exit(1);
}
}
+
+ if (!opt_password) {
+ opt_password = getenv("PASSWD");
+ }
rc = net_run_function(argc_new-1, argv_new+1, net_func, net_help);