From a1a5affeb00f79213af6fb3e75ec8450330e8681 Mon Sep 17 00:00:00 2001 From: Rein Tollevik Date: Thu, 30 Dec 2010 19:45:08 +0000 Subject: [PATCH] ITS#6754: Fail if there are unrecognized command-line arguments. --- servers/slapd/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 06ebfde46c..d04e1ef4d9 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -683,6 +683,9 @@ unhandled_option:; } } + if ( optind != argc ) + goto unhandled_option; + ber_set_option(NULL, LBER_OPT_DEBUG_LEVEL, &slap_debug); ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &slap_debug); ldif_debug = slap_debug; -- 2.39.5