From 31ddfc3c183054ca17b9c9f8f03ea8151db3b5b1 Mon Sep 17 00:00:00 2001 From: Michal Zidek Date: Fri, 12 Oct 2012 13:59:09 +0200 Subject: sss_debuglevel: Multiple arguments are treated as error. https://fedorahosted.org/sssd/ticket/1327 --- src/tools/sss_debuglevel.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tools/sss_debuglevel.c b/src/tools/sss_debuglevel.c index 74a63eb28..72701386a 100644 --- a/src/tools/sss_debuglevel.c +++ b/src/tools/sss_debuglevel.c @@ -97,6 +97,12 @@ int main(int argc, const char **argv) ret, fini); } + /* No more arguments expected. If something follows it is an error. */ + if (poptGetArg(pc)) { + BAD_POPT_PARAMS(pc, _("Only one argument expected\n"), + ret, fini); + } + /* get config file */ if (pc_config_file) { config_file = talloc_strdup(ctx, pc_config_file); -- cgit