]> git.sur5r.net Git - openldap/commitdiff
ITS#6754: Fail if there are unrecognized command-line arguments.
authorRein Tollevik <rein@openldap.org>
Thu, 30 Dec 2010 19:45:08 +0000 (19:45 +0000)
committerRein Tollevik <rein@openldap.org>
Thu, 30 Dec 2010 19:45:08 +0000 (19:45 +0000)
servers/slapd/main.c

index 06ebfde46c8990347bd5deac175217eef3f489b3..d04e1ef4d9f85c511e7880b3b53f2845279f280c 100644 (file)
@@ -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;