[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: saslRegexp limits syntax of regular expressions (ITS#1951)



I added too much to 'reg' in that first patch. This one is better (my
test-case works now) and it also fixes a logging statement in the same
file.

Andrew
-- 
-----------------------------------------------------------------------
|                 From Andrew Findlay, Skills 1st Ltd                 |
| Consultant in large-scale systems, networks, and directory services |
|        Andrew.Findlay@skills-1st.co.uk       +44 1628 782565        |
-----------------------------------------------------------------------

--- saslauthz.c.dist	Mon Aug  5 22:40:08 2002
+++ saslauthz.c	Wed Aug  7 18:41:48 2002
@@ -196,9 +196,13 @@
 	int rc;
 	SaslRegexp_t *reg;
 
+	/* Make space in array for another sasl-regex structure */
 	SaslRegexp = (SaslRegexp_t *) ch_realloc( (char *) SaslRegexp,
 	  (nSaslRegexp + 1) * sizeof(SaslRegexp_t) );
 
+	/* Point to the new slot in the array */
+	reg = SaslRegexp + nSaslRegexp;
+
 	reg->sr_match = ch_strdup( match );
 	reg->sr_replace = ch_strdup( replace );
 
@@ -325,7 +329,7 @@
 		out->bv_len ? out->bv_val : "", 0, 0 );
 #else
 	Debug( LDAP_DEBUG_TRACE,
-	   "slap_sasl_regexp: converted SASL name to
ldap:///%s??%s?%s\n";,
+	   "slap_sasl_regexp: converted SASL name to %s\n",
 		out->bv_len ? out->bv_val : "", 0, 0 );
 #endif