From: Pierangelo Masarati Date: Wed, 17 Mar 2004 22:37:40 +0000 (+0000) Subject: add labeledURI to back-ldap databases X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~233 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=802e3cc0699d542fab9fd1189f66f801eba1a02e;p=openldap add labeledURI to back-ldap databases --- diff --git a/servers/slapd/back-monitor/back-monitor.h b/servers/slapd/back-monitor/back-monitor.h index 46b2e1212c..cddd899abc 100644 --- a/servers/slapd/back-monitor/back-monitor.h +++ b/servers/slapd/back-monitor/back-monitor.h @@ -102,6 +102,7 @@ struct monitorinfo { AttributeDescription *mi_ad_description; AttributeDescription *mi_ad_seeAlso; AttributeDescription *mi_ad_l; + AttributeDescription *mi_ad_labeledURI; }; /* diff --git a/servers/slapd/back-monitor/database.c b/servers/slapd/back-monitor/database.c index 83677d9100..3442106bb0 100644 --- a/servers/slapd/back-monitor/database.c +++ b/servers/slapd/back-monitor/database.c @@ -32,6 +32,10 @@ static int monitor_back_add_plugin( Backend *be, Entry *e ); #endif /* defined(LDAP_SLAPI) */ +#if defined(SLAPD_LDAP) +#include "../back-ldap/back-ldap.h" +#endif /* defined(SLAPD_LDAP) */ + int monitor_subsys_database_init( BackendDB *be @@ -161,6 +165,18 @@ monitor_subsys_database_init( } } +#if defined(SLAPD_LDAP) + if ( strcmp( be->bd_info->bi_type, "ldap" ) == 0 ) { + struct ldapinfo *li = (struct ldapinfo *)be->be_private; + struct berval bv; + + bv.bv_val = li->url; + bv.bv_len = strlen( bv.bv_val ); + attr_merge_normalize_one( e, mi->mi_ad_labeledURI, + &bv, NULL ); + } +#endif /* defined(SLAPD_LDAP) */ + for ( j = nBackendInfo; j--; ) { if ( backendInfo[ j ].bi_type == be->bd_info->bi_type ) { struct berval bv; diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 8db9b1eb07..f8d2815066 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -329,6 +329,7 @@ monitor_back_db_open( "$ postalCode " #endif "$ seeAlso " + "$ labeledURI " "$ monitoredInfo " "$ managedInfo " "$ monitorOverlay " @@ -460,6 +461,7 @@ monitor_back_db_open( { NULL, NULL, 0, -1 }, /* description */ { NULL, NULL, 0, -1 }, /* seeAlso */ { NULL, NULL, 0, -1 }, /* l */ + { NULL, NULL, 0, -1 }, /* labeledURI */ #endif /* INTEGRATE_CORE_SCHEMA */ { NULL, NULL, 0, -1 } }, mat_core[] = { @@ -480,6 +482,12 @@ monitor_back_db_open( "DESC 'RFC2256: locality which this object resides in' " "SUP name )", 0, offsetof(struct monitorinfo, mi_ad_l) }, + { "labeledURI", "( 1.3.6.1.4.1.250.1.57 " + "NAME 'labeledURI' " + "DESC 'RFC2079: Uniform Resource Identifier with optional label' " + "EQUALITY caseExactMatch " + "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )", 0, + offsetof(struct monitorinfo, mi_ad_labeledURI) }, { NULL, NULL, 0, -1 } };