From 9266a43d6cc037d97261b9f35d38926f0e26ffed Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 5 Jan 2015 09:37:27 +0000 Subject: [PATCH] ITS#8016 return errmsg for unknown envflags --- servers/slapd/back-mdb/config.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-mdb/config.c b/servers/slapd/back-mdb/config.c index bb9be7302c..ab658b6b30 100644 --- a/servers/slapd/back-mdb/config.c +++ b/servers/slapd/back-mdb/config.c @@ -419,6 +419,9 @@ mdb_cf_gen( ConfigArgs *c ) mdb->mi_dbenv_flags ^= mdb_envflags[i].mask; } else { /* unknown keyword */ + snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: unknown keyword \"%s\"", + c->argv[0], c->argv[i] ); + Debug( LDAP_DEBUG_CONFIG, "%s %s\n", c->log, c->cr_msg, 0 ); rc = 1; } } @@ -621,7 +624,10 @@ mdb_cf_gen( ConfigArgs *c ) mdb->mi_dbenv_flags |= mdb_envflags[j].mask; } else { /* unknown keyword */ - rc = 1; + snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: unknown keyword \"%s\"", + c->argv[0], c->argv[i] ); + Debug( LDAP_DEBUG_ANY, "%s %s\n", c->log, c->cr_msg, 0 ); + return 1; } } } -- 2.39.5