]> git.sur5r.net Git - openldap/commitdiff
Hide config schema if !LDAP_DEVEL
authorHoward Chu <hyc@openldap.org>
Tue, 29 Aug 2006 02:02:12 +0000 (02:02 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 29 Aug 2006 02:02:12 +0000 (02:02 +0000)
servers/slapd/config.c

index e467df82e37743384ca740418f33cf59186de50d..a9bacd0a6284947ddc296ee4923babd5040c5e21 100644 (file)
@@ -509,6 +509,10 @@ init_config_attrs(ConfigTable *ct) {
                        fprintf( stderr, "init_config_attrs: AttributeType \"%s\": %s\n",
                                ct[i].attribute, err );
                        return code;
+               } else {
+#ifndef LDAP_DEVEL
+                       ct[i].ad->ad_type->sat_flags |= SLAP_AT_HIDE;
+#endif
                }
        }
 
@@ -539,10 +543,14 @@ init_config_ocs( ConfigOCs *ocs ) {
                        return code;
                }
                ocs[i].co_oc = oc_find(oc->oc_names[0]);
-               if ( code )
+               if ( code ) {
                        ldap_objectclass_free(oc);
-               else
+               } else {
                        ldap_memfree(oc);
+#ifndef LDAP_DEVEL
+                       ocs[i].co_oc->soc_flags |= SLAP_OC_HIDE;
+#endif
+               }
        }
        return 0;
 }