mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
added structural objectclass; reworked obejctclasses to use 'monitor' and 'extensibleObject'; minor cleanup
This commit is contained in:
parent
52249ffc34
commit
75f1addd76
@ -39,11 +39,9 @@ to ease the addition of new subsystems.
|
||||
SCHEMA
|
||||
|
||||
All the subsystems get a default "cn" attribute, represented by the
|
||||
subsystem's name, and they all have "top", "LDAPsubEntry" and
|
||||
"monitorSubEntry" objectclasses (the latter has not been defined yet,
|
||||
pending the design of the monitor schema and its registration under
|
||||
OpenLDAP's OID).
|
||||
At present "extensibleObject" is used, and the "description" attribute
|
||||
subsystem's name, and they all have "top", "monitor" and "extensibleObject"
|
||||
objectclasses.
|
||||
"extensibleObject" is used, and the "description" attribute
|
||||
is used to hold the monitor information of each entry.
|
||||
|
||||
|
||||
|
@ -162,6 +162,12 @@ struct monitorinfo {
|
||||
#define SLAPD_MONITOR_SENT_DN \
|
||||
SLAPD_MONITOR_SENT_RDN "," SLAPD_MONITOR_DN
|
||||
|
||||
#define SLAPD_MONITOR_OBJECTCLASSES \
|
||||
"objectClass: top\n" \
|
||||
"objectClass: monitor\n" \
|
||||
"objectClass: extensibleObject\n" \
|
||||
"structuralObjectClass: monitor\n"
|
||||
|
||||
struct monitorsubsys {
|
||||
int mss_type;
|
||||
char *mss_name;
|
||||
|
@ -83,13 +83,7 @@ monitor_subsys_backend_init(
|
||||
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=%d,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: %d\n",
|
||||
i,
|
||||
monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn.bv_val,
|
||||
|
@ -78,13 +78,7 @@ monitor_subsys_conn_init(
|
||||
*/
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=Total,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitor\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: Total\n",
|
||||
monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val );
|
||||
|
||||
@ -142,13 +136,7 @@ monitor_subsys_conn_init(
|
||||
*/
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=Current,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: Current\n",
|
||||
monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val );
|
||||
|
||||
@ -270,13 +258,7 @@ conn_create(
|
||||
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=%ld,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: %ld\n",
|
||||
c->c_connid, monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val,
|
||||
c->c_connid );
|
||||
|
@ -82,13 +82,7 @@ monitor_subsys_database_init(
|
||||
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=%d,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: %d\n",
|
||||
i,
|
||||
monitor_subsys[SLAPD_MONITOR_DATABASE].mss_dn.bv_val,
|
||||
|
@ -323,13 +323,7 @@ monitor_back_db_init(
|
||||
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: %s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: %s\n",
|
||||
monitor_subsys[ i ].mss_dn.bv_val,
|
||||
monitor_subsys[ i ].mss_name );
|
||||
@ -378,12 +372,9 @@ monitor_back_db_init(
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: " SLAPD_MONITOR_DN "\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: monitor\n"
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
"structuralObjectClass: monitor\n"
|
||||
"cn: Monitor" );
|
||||
|
||||
e = str2entry( buf );
|
||||
|
@ -78,13 +78,7 @@ monitor_subsys_ops_init(
|
||||
*/
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=Initiated,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: Initiated\n",
|
||||
monitor_subsys[SLAPD_MONITOR_OPS].mss_dn.bv_val );
|
||||
|
||||
@ -141,13 +135,7 @@ monitor_subsys_ops_init(
|
||||
*/
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=Completed,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: Completed\n",
|
||||
monitor_subsys[SLAPD_MONITOR_OPS].mss_dn.bv_val );
|
||||
|
||||
|
@ -78,13 +78,7 @@ monitor_subsys_sent_init(
|
||||
*/
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=Entries,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: Entries\n",
|
||||
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
|
||||
|
||||
@ -141,13 +135,7 @@ monitor_subsys_sent_init(
|
||||
*/
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=Referrals,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: Referrals\n",
|
||||
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
|
||||
|
||||
@ -203,13 +191,7 @@ monitor_subsys_sent_init(
|
||||
*/
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=PDU,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: PDU\n",
|
||||
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
|
||||
|
||||
@ -265,13 +247,7 @@ monitor_subsys_sent_init(
|
||||
*/
|
||||
snprintf( buf, sizeof( buf ),
|
||||
"dn: cn=Bytes,%s\n"
|
||||
"objectClass: top\n"
|
||||
"objectClass: LDAPsubEntry\n"
|
||||
#ifdef SLAPD_MONITORSUBENTRY
|
||||
"objectClass: monitorSubEntry\n"
|
||||
#else /* !SLAPD_MONITORSUBENTRY */
|
||||
"objectClass: extensibleObject\n"
|
||||
#endif /* !SLAPD_MONITORSUBENTRY */
|
||||
SLAPD_MONITOR_OBJECTCLASSES
|
||||
"cn: Bytes\n",
|
||||
monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user