]> git.sur5r.net Git - openldap/commitdiff
Hide log schema
authorHoward Chu <hyc@openldap.org>
Sat, 1 Sep 2007 22:28:06 +0000 (22:28 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 1 Sep 2007 22:28:06 +0000 (22:28 +0000)
servers/slapd/overlays/accesslog.c

index 51813e6a8c95f7ccef1bc2c190d8b3c443d0df1d..983395a8aaa7501ab14ef5be398ef2f83988bd3a 100644 (file)
@@ -162,7 +162,8 @@ enum {
        LOG_EN__COUNT
 };
 
-static ObjectClass *log_ocs[LOG_EN__COUNT], *log_container;
+static ObjectClass *log_ocs[LOG_EN__COUNT], *log_container,
+       *log_oc_read, *log_oc_write;
 
 #define LOG_SCHEMA_ROOT        "1.3.6.1.4.1.4203.666.11.5"
 
@@ -400,10 +401,10 @@ static struct {
                                &log_ocs[LOG_EN_UNBIND] },
        { "( " LOG_SCHEMA_OC ".2 NAME 'auditReadObject' "
                "DESC 'OpenLDAP read request record' "
-               "SUP auditObject STRUCTURAL )", NULL },
+               "SUP auditObject STRUCTURAL )", &log_oc_read },
        { "( " LOG_SCHEMA_OC ".3 NAME 'auditWriteObject' "
                "DESC 'OpenLDAP write request record' "
-               "SUP auditObject STRUCTURAL )", NULL },
+               "SUP auditObject STRUCTURAL )", &log_oc_write },
        { "( " LOG_SCHEMA_OC ".4 NAME 'auditAbandon' "
                "DESC 'Abandon operation' "
                "SUP auditObject STRUCTURAL "
@@ -2032,6 +2033,9 @@ int accesslog_initialize()
                                0, 0, 0 );
                        return -1;
                }
+#ifndef LDAP_DEVEL
+               (*lattrs[i].ad)->ad_type->sat_flags |= SLAP_AT_HIDE;
+#endif
        }
 
        for ( i=0; locs[i].ot; i++ ) {
@@ -2044,6 +2048,9 @@ int accesslog_initialize()
                                0, 0, 0 );
                        return -1;
                }
+#ifndef LDAP_DEVEL
+               (*locs[i].oc)->soc_flags |= SLAP_OC_HIDE;
+#endif
        }
 
        return overlay_register(&accesslog);