add labeledURI to back-ldap databases

This commit is contained in:
Pierangelo Masarati 2004-03-17 22:37:40 +00:00
parent 66ee9b2d73
commit 802e3cc069
3 changed files with 25 additions and 0 deletions

View File

@ -102,6 +102,7 @@ struct monitorinfo {
AttributeDescription *mi_ad_description;
AttributeDescription *mi_ad_seeAlso;
AttributeDescription *mi_ad_l;
AttributeDescription *mi_ad_labeledURI;
};
/*

View File

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

View File

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