added structural objectclass; reworked obejctclasses to use 'monitor' and 'extensibleObject'; minor cleanup

This commit is contained in:
Pierangelo Masarati 2002-01-11 10:27:58 +00:00
parent 52249ffc34
commit 75f1addd76
8 changed files with 23 additions and 94 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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,

View File

@ -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 );

View File

@ -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,

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );