From f76e1055f8f4b4d36e8229bb0bd41f0ee7c77b98 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 29 Jul 2005 09:01:44 +0000 Subject: [PATCH] treat extra args as errors --- servers/slapd/config.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/servers/slapd/config.c b/servers/slapd/config.c index a488bdd3d2..40be0f7ba5 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -136,9 +136,19 @@ int config_check_vals(ConfigTable *Conf, ConfigArgs *c, int check_only ) { return(ARG_BAD_CONF); } if(Conf->max_args && (c->argc > Conf->max_args)) { - sprintf( c->msg, "<%s> extra cruft after <%s> ignored", + char *ignored = " ignored"; + + sprintf( c->msg, "<%s> extra cruft after <%s>", c->argv[0], Conf->what ); - Debug(LDAP_DEBUG_CONFIG, "%s: %s\n", c->log, c->msg, 0 ); + +#ifdef LDAP_DEVEL + ignored = ""; +#endif /* LDAP_DEVEL */ + Debug(LDAP_DEBUG_CONFIG, "%s: %s%s.\n", + c->log, c->msg, ignored ); +#ifdef LDAP_DEVEL + return(ARG_BAD_CONF); +#endif /* LDAP_DEVEL */ } if((arg_type & ARG_DB) && !c->be) { sprintf( c->msg, "<%s> only allowed within database declaration", -- 2.39.5