]> git.sur5r.net Git - openldap/commitdiff
Add ordered-values schema flag
authorHoward Chu <hyc@openldap.org>
Fri, 18 Mar 2005 23:24:28 +0000 (23:24 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 18 Mar 2005 23:24:28 +0000 (23:24 +0000)
servers/slapd/at.c
servers/slapd/bconfig.c
servers/slapd/slap.h

index 7958a1ec3987b154c4916f71742ddcd80ab56656..c6f363b6904b3b0433fb1ba14eb06fdaf8a772aa 100644 (file)
@@ -438,6 +438,19 @@ at_add(
                sat->sat_substr = sat->sat_sup->sat_substr;
        }
 
+       /*
+        * check for X-ORDERED attributes
+        */
+       if ( sat->sat_extensions ) {
+               for (i=0; sat->sat_extensions[i]; i++) {
+                       if (!strcasecmp( sat->sat_extensions[i]->lsei_name,
+                               "X-ORDERED" )) {
+                               sat->sat_flags |= SLAP_AT_ORDERED;
+                               break;
+                       }
+               }
+       }
+
        if ( at->at_syntax_oid ) {
                syn = syn_find(sat->sat_syntax_oid);
                if ( syn == NULL ) {
index ba7eb64fc3f7676416cdae221c54029a584a5f8f..6f49b4d28c9beb351ece9c2a0a7ed9ec0158dac7 100644 (file)
@@ -260,7 +260,7 @@ ConfigTable config_back_cf_table[] = {
                &config_generic, "( OLcfgAt:9 NAME 'olcBackend' "
                        "DESC 'A type of backend' "
                        "EQUALITY caseIgnoreMatch "
-                       "SYNTAX OMsDirectoryString )", NULL, NULL },
+                       "SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
        { "concurrency", "level", 2, 2, 0, ARG_INT|ARG_NONZERO|ARG_MAGIC|CFG_CONCUR,
                &config_generic, "( OLcfgAt:10 NAME 'olcConcurrency' "
                        "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
@@ -273,7 +273,7 @@ ConfigTable config_back_cf_table[] = {
        { "database", "type", 2, 2, 0, ARG_MAGIC|CFG_DATABASE,
                &config_generic, "( OLcfgAt:13 NAME 'olcDatabase' "
                        "DESC 'The backend type for a database instance' "
-                       "SUP olcBackend )", NULL, NULL },
+                       "SUP olcBackend X-ORDERED 'VALUES' )", NULL, NULL },
        { "defaultSearchBase", "dn", 2, 2, 0, ARG_PRE_BI|ARG_PRE_DB|ARG_DN|ARG_MAGIC,
                &config_search_base, "( OLcfgAt:14 NAME 'olcDefaultSearchBase' "
                        "SYNTAX OMsDN SINGLE-VALUE )", NULL, NULL },
@@ -353,7 +353,7 @@ ConfigTable config_back_cf_table[] = {
                        "SYNTAX OMsDirectoryString X-ORDERED 'VALUES' )", NULL, NULL },
        { "overlay", "overlay", 2, 2, 0, ARG_MAGIC,
                &config_overlay, "( OLcfgAt:34 NAME 'olcOverlay' "
-                       "SUP olcDatabase )", NULL, NULL },
+                       "SUP olcDatabase X-ORDERED 'VALUES' )", NULL, NULL },
        { "password-crypt-salt-format", "salt", 2, 2, 0, ARG_STRING|ARG_MAGIC|CFG_SALT,
                &config_generic, "( OLcfgAt:35 NAME 'olcPasswordCryptSaltFormat' "
                        "SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
index da0d71040eba205be8ed9e0ac157e3a79e43efd2..6aa3e6c16bc41e25500600cf9ddb9e78897aeaaa 100644 (file)
@@ -647,6 +647,8 @@ typedef struct slap_attribute_type {
 #endif
 #define        SLAP_AT_DYNAMIC         0x0400U /* dynamically generated */
 
+#define        SLAP_AT_ORDERED         0x0001U /* values are ordered */
+
        slap_mask_t                                     sat_flags;
 
        LDAP_SLIST_ENTRY(slap_attribute_type) sat_next;