]> git.sur5r.net Git - openldap/commitdiff
Hide works in progress
authorKurt Zeilenga <kurt@openldap.org>
Wed, 17 Dec 2003 22:04:09 +0000 (22:04 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 17 Dec 2003 22:04:09 +0000 (22:04 +0000)
servers/slapd/controls.c
servers/slapd/root_dse.c

index 1ede30038f801a69dea0035ed98969a8e9321ddc..a7bdc337f0a8cdec66a36a89846ce6c54207c709 100644 (file)
@@ -113,9 +113,11 @@ static struct slap_control control_defs[] = {
        { LDAP_CONTROL_SYNC,
                SLAP_CTRL_HIDE|SLAP_CTRL_SEARCH, NULL,
                parseLDAPsync, LDAP_SLIST_ENTRY_INITIALIZER(next) },
+#ifdef LDAP_CONTROL_MODIFY_INCREMENT
        { LDAP_CONTROL_MODIFY_INCREMENT,
                SLAP_CTRL_HIDE|SLAP_CTRL_MODIFY, NULL,
                parseModifyIncrement, LDAP_SLIST_ENTRY_INITIALIZER(next) },
+#endif
        { LDAP_CONTROL_MANAGEDSAIT,
                SLAP_CTRL_ACCESS, NULL,
                parseManageDSAit, LDAP_SLIST_ENTRY_INITIALIZER(next) },
@@ -752,11 +754,17 @@ static int parseProxyAuthz (
        {
                int     rc;
                char            buf[ SLAP_LDAPDN_MAXLEN ];
-               struct berval   id = { ctrl->ldctl_value.bv_len, (char *)buf },
+               struct berval   id,
                                user = { 0, NULL },
                                realm = { 0, NULL },
                                mech = { 0, NULL };
 
+               if ( sizeof( buf ) <= ctrl->ldctl_value.bv_len ) {
+                       return LDAP_INVALID_SYNTAX;
+               }
+
+               id.bv_len = ctrl->ldctl_value.bv_len;
+               id.bv_val = buf;
                strncpy( buf, ctrl->ldctl_value.bv_val, sizeof( buf ) );
 
                rc = slap_parse_user( &id, &user, &realm, &mech );
index 4038dfb7cf02a60419729d18c8110e93ba6c747e..91db21e13d5edd125f0ccb02c837f4c2994e6fda 100644 (file)
 #endif
 
 static struct berval supportedFeatures[] = {
-       BER_BVC(LDAP_FEATURE_ALL_OPERATIONAL_ATTRS), /* All Op Attrs (+) */
-       BER_BVC(LDAP_FEATURE_OBJECTCLASS_ATTRS), /* OCs in Attrs List (+person) */
-       BER_BVC(LDAP_FEATURE_ABSOLUTE_FILTERS), /* (&) and (|) search filters */
+       BER_BVC(LDAP_FEATURE_ALL_OP_ATTRS),                     /* All Op Attrs (+) */
+       BER_BVC(LDAP_FEATURE_OBJECTCLASS_ATTRS),        /* OCs in Attrs List (@class) */
+       BER_BVC(LDAP_FEATURE_ABSOLUTE_FILTERS),         /* (&) and (|) search filters */
        BER_BVC(LDAP_FEATURE_LANGUAGE_TAG_OPTIONS), /* Language Tag Options */
-       BER_BVC(LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS), /* Language Range Options */
+       BER_BVC(LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS),/* Language Range Options */
+
 #ifdef LDAP_DEVEL
-       BER_BVC(LDAP_FEATURE_MODIFY_INCREMENT), /* Modify/increment */
+       BER_BVC(LDAP_FEATURE_SUBORDINATE_SCOPE),        /* "children" search scope */
+       BER_BVC(LDAP_FEATURE_MODIFY_INCREMENT),         /* Modify/increment */
 #endif
        {0,NULL}
 };