]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
import fix for group limits from HEAD
authorPierangelo Masarati <ando@openldap.org>
Mon, 3 Jan 2005 18:09:51 +0000 (18:09 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 3 Jan 2005 18:09:51 +0000 (18:09 +0000)
CHANGES
servers/slapd/limits.c

diff --git a/CHANGES b/CHANGES
index db4149e023dac5c1da5b608acc89ece6012a6eb5..ffc791c6c577f51aa7624bd0fc502ad2a6332c0b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 OpenLDAP 2.2 Change Log
 
 OpenLDAP 2.2.21 Engineering
+       Fixed slapd group limits
 
 OpenLDAP 2.2.20 Release
        Fixed slapd sanity check on protocol in authz-regexp URI (ITS#3411)
index c60e734068c3ff6eac2004c133f76448b56b6bd3..7c1b17a261ba9f5b751ab32b67b558661108e6cb 100644 (file)
@@ -562,8 +562,12 @@ limits_parse(
                        struct berval   oc, ad;
 
                        oc.bv_val = pattern + 1;
+                       pattern = strchr( pattern, '=' );
+                       if ( pattern == NULL ) {
+                               return -1;
+                       }
 
-                       ad.bv_val = strchr(pattern, '/');
+                       ad.bv_val = strchr( oc.bv_val, '/' );
                        if ( ad.bv_val != NULL ) {
                                const char      *text = NULL;
                                int             rc;
@@ -571,18 +575,14 @@ limits_parse(
                                oc.bv_len = ad.bv_val - oc.bv_val;
 
                                ad.bv_val++;
-                               ad.bv_len = strlen( ad.bv_val );
+                               ad.bv_len = pattern - ad.bv_val;
                                rc = slap_bv2ad( &ad, &group_ad, &text );
                                if ( rc != LDAP_SUCCESS ) {
                                        goto no_ad;
                                }
 
-                               pattern = ad.bv_val + ad.bv_len;
-
                        } else {
-                               oc.bv_len = strlen( oc.bv_val );
-
-                               pattern = oc.bv_val + oc.bv_len;
+                               oc.bv_len = pattern - oc.bv_val;
                        }
 
                        group_oc = oc_bvfind( &oc );