]> git.sur5r.net Git - openldap/commitdiff
add labeledURI to back-ldap databases
authorPierangelo Masarati <ando@openldap.org>
Wed, 17 Mar 2004 22:37:40 +0000 (22:37 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 17 Mar 2004 22:37:40 +0000 (22:37 +0000)
servers/slapd/back-monitor/back-monitor.h
servers/slapd/back-monitor/database.c
servers/slapd/back-monitor/init.c

index 46b2e1212ca6ea940a9bcb85a0c01250d814f656..cddd899abc4ec5b9ebc7aa0713e959d72cc61896 100644 (file)
@@ -102,6 +102,7 @@ struct monitorinfo {
        AttributeDescription *mi_ad_description;
        AttributeDescription *mi_ad_seeAlso;
        AttributeDescription *mi_ad_l;
+       AttributeDescription *mi_ad_labeledURI;
 };
 
 /*
index 83677d91004515453aa7e5bb0828ac86de9ad407..3442106bb0fea7641e209ac9a0cdf2c881f40d5d 100644 (file)
 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;
index 8db9b1eb0756d4b4c09b11fd8118b01d9dbaa58a..f8d2815066bb7da236466ab790ae4c7043346f71 100644 (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 }
        };