From: Howard Chu Date: Fri, 18 Mar 2005 23:24:28 +0000 (+0000) Subject: Add ordered-values schema flag X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=90172993a3c1bf4a2878a77baa2521621b0c2c7d;p=openldap Add ordered-values schema flag --- diff --git a/servers/slapd/at.c b/servers/slapd/at.c index 7958a1ec39..c6f363b690 100644 --- a/servers/slapd/at.c +++ b/servers/slapd/at.c @@ -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 ) { diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index ba7eb64fc3..6f49b4d28c 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -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 }, diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index da0d71040e..6aa3e6c16b 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -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;