summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-08-22 12:06:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:11 -0500
commit8dd00920ef8f9e6dce9bfb80c45ae46c2a562abd (patch)
tree311a8c6f0ccfdd87cfa95b00f7a8c05bbb7f63c8 /source3/nsswitch/winbindd.c
parentfaab8dba02d364dccf341e0f6756b1bf625d3c5b (diff)
downloadsamba-8dd00920ef8f9e6dce9bfb80c45ae46c2a562abd.tar.gz
samba-8dd00920ef8f9e6dce9bfb80c45ae46c2a562abd.tar.bz2
samba-8dd00920ef8f9e6dce9bfb80c45ae46c2a562abd.zip
r24621: - deferr calling build_options();exit(0);
- use poptPrintUsage() to give the user more info metze (This used to be commit a95d9d1ef99d6a2f77a289f8d2011cae482821b1)
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r--source3/nsswitch/winbindd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index f1283c5a83..56e20b78c7 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -1017,8 +1017,9 @@ int main(int argc, char **argv, char **envp)
while ((opt = poptGetNextOpt(pc)) != -1) {
switch (opt) {
default:
- d_fprintf(stderr, "\nInvalid option %s: %s\n",
+ d_fprintf(stderr, "\nInvalid option %s: %s\n\n",
poptBadOption(pc, 0), poptStrerror(opt));
+ poptPrintUsage(pc, stderr, 0);
exit(1);
}
}
@@ -1036,6 +1037,8 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
+ poptFreeContext(pc);
+
if (!override_logfile) {
pstr_sprintf(logfile, "%s/log.winbindd", dyn_LOGFILEBASE);
lp_set_logfile(logfile);
@@ -1167,8 +1170,6 @@ int main(int argc, char **argv, char **envp)
messaging_register(winbind_messaging_context(), NULL,
MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list);
- poptFreeContext(pc);
-
netsamlogon_cache_init(); /* Non-critical */
/* clear the cached list of trusted domains */