/* NOTE: used & documented in slapd.conf(5) */
#define IDSTR "rid"
#define PROVIDERSTR "provider"
-#define TYPESTR "type"
-#define INTERVALSTR "interval"
-#define SEARCHBASESTR "searchbase"
+#define SCHEMASTR "schemachecking"
#define FILTERSTR "filter"
+#define SEARCHBASESTR "searchbase"
#define SCOPESTR "scope"
-#define ATTRSSTR "attrs"
#define ATTRSONLYSTR "attrsonly"
+#define ATTRSSTR "attrs"
+#define TYPESTR "type"
+#define INTERVALSTR "interval"
+#define RETRYSTR "retry"
#define SLIMITSTR "sizelimit"
#define TLIMITSTR "timelimit"
-#define SCHEMASTR "schemachecking"
/* FIXME: undocumented */
#define OLDAUTHCSTR "bindprincipal"
#define EXATTRSSTR "exattrs"
-#define RETRYSTR "retry"
+#define MANAGEDSAITSTR "manageDSAit"
/* FIXME: unused */
#define LASTMODSTR "lastmod"
#define LMREQSTR "req"
#define SRVTABSTR "srvtab"
#define SUFFIXSTR "suffix"
-#define MANAGEDSAITSTR "manageDSAit"
/* mandatory */
#define GOT_ID 0x0001
} scopes[] = {
{ BER_BVC("base"), LDAP_SCOPE_BASE },
{ BER_BVC("one"), LDAP_SCOPE_ONELEVEL },
+ { BER_BVC("onelevel"), LDAP_SCOPE_ONELEVEL }, /* OpenLDAP extension */
#ifdef LDAP_SCOPE_SUBORDINATE
{ BER_BVC("children"), LDAP_SCOPE_SUBORDINATE },
- { BER_BVC("subordinate"), 0 },
+ { BER_BVC("subordinate"), LDAP_SCOPE_SUBORDINATE },
#endif
{ BER_BVC("sub"), LDAP_SCOPE_SUBTREE },
+ { BER_BVC("subtree"), LDAP_SCOPE_SUBTREE }, /* OpenLDAP extension */
{ BER_BVNULL, 0 }
};
int j;
val = cargv[ i ] + STRLENOF( SCOPESTR "=" );
for ( j=0; !BER_BVISNULL(&scopes[j].key); j++ ) {
- if (!strncasecmp( val, scopes[j].key.bv_val,
- scopes[j].key.bv_len )) {
- while (!scopes[j].val) j--;
+ if (!strcasecmp( val, scopes[j].key.bv_val )) {
si->si_scope = scopes[j].val;
break;
}