diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2010-08-31 18:12:25 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-09-08 09:36:22 -0400 |
commit | 8443d24c0584f45151e0c80506d7a572b8a38ed7 (patch) | |
tree | 3df77db1747c04ed38095bb6b78087c6534adc50 /src/tools/sss_useradd.c | |
parent | 4f6a396fcf16f97b2abc3d0cba10e9aa9bc38619 (diff) | |
download | sssd-8443d24c0584f45151e0c80506d7a572b8a38ed7.tar.gz sssd-8443d24c0584f45151e0c80506d7a572b8a38ed7.tar.xz sssd-8443d24c0584f45151e0c80506d7a572b8a38ed7.zip |
Fix assorted minor bugs in sss_ tools
Fixes: #585
Diffstat (limited to 'src/tools/sss_useradd.c')
-rw-r--r-- | src/tools/sss_useradd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tools/sss_useradd.c b/src/tools/sss_useradd.c index f9b95155e..edff6e141 100644 --- a/src/tools/sss_useradd.c +++ b/src/tools/sss_useradd.c @@ -80,7 +80,10 @@ int main(int argc, const char **argv) switch (ret) { case 'G': groups = poptGetOptArg(pc); - if (!groups) goto fini; + if (!groups) { + BAD_POPT_PARAMS(pc, _("Specify group to add to\n"), + ret, fini); + } break; case 'm': @@ -96,17 +99,13 @@ int main(int argc, const char **argv) debug_level = pc_debug; if (ret != -1) { - usage(pc, poptStrerror(ret)); - ret = EXIT_FAILURE; - goto fini; + BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini); } /* username is an argument without --option */ pc_username = poptGetArg(pc); if (pc_username == NULL) { - usage(pc, (_("Specify user to add\n"))); - ret = EXIT_FAILURE; - goto fini; + BAD_POPT_PARAMS(pc, _("Specify user to add\n"), ret, fini); } CHECK_ROOT(ret, debug_prg_name); |