]> git.sur5r.net Git - openldap/commitdiff
ITS#8016 return errmsg for unknown envflags
authorHoward Chu <hyc@openldap.org>
Mon, 5 Jan 2015 09:37:27 +0000 (09:37 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 5 Jan 2015 09:37:27 +0000 (09:37 +0000)
servers/slapd/back-mdb/config.c

index bb9be7302c10dfec7a876eca2a74d3d56d439283..ab658b6b30191ffdbbe6b7a44fe9e80bd4b8fd2a 100644 (file)
@@ -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;
                        }
                }
                }