]> git.sur5r.net Git - openldap/commitdiff
Solaris doesn't like NULL pointers in printf, which now can occur since IA5string...
authorPierangelo Masarati <ando@openldap.org>
Mon, 26 Feb 2007 20:40:12 +0000 (20:40 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 26 Feb 2007 20:40:12 +0000 (20:40 +0000)
CHANGES
servers/slapd/back-meta/map.c

diff --git a/CHANGES b/CHANGES
index 98904df33c02f77978ebdf5ab645f7480e3a022c..c8a2307b6dad55b37434780663e38ec0218e8e66 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@ OpenLDAP 2.3 Change Log
 OpenLDAP 2.3.35 Engineering
        Fixed entry consistency check in str2entry2 (ITS#4852)
        Fixed slapd-bdb/hdb startup with missing shm env (ITS#4851)
+       Fixed slapd-meta filter mapping
 
 OpenLDAP 2.3.34 Release (2007/02/16)
        Fixed libldap missing get_option(TLS CipherSuite) (ITS#4815)
index 4d6aa59b61fc49f73c169052028a73363da0870d..1871ebbddf9521c2306f4548c1dd6dfbc023e378 100644 (file)
@@ -326,7 +326,7 @@ ldap_back_int_filter_map_rewrite(
                fstr->bv_val = malloc( fstr->bv_len + 1 );
 
                snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s=%s)",
-                       atmp.bv_val, vtmp.bv_val );
+                       atmp.bv_val, vtmp.bv_len ? vtmp.bv_val : "" );
 
                ber_memfree( vtmp.bv_val );
                break;
@@ -343,7 +343,7 @@ ldap_back_int_filter_map_rewrite(
                fstr->bv_val = malloc( fstr->bv_len + 1 );
 
                snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s>=%s)",
-                       atmp.bv_val, vtmp.bv_val );
+                       atmp.bv_val, vtmp.bv_len ? vtmp.bv_val : "" );
 
                ber_memfree( vtmp.bv_val );
                break;
@@ -360,7 +360,7 @@ ldap_back_int_filter_map_rewrite(
                fstr->bv_val = malloc( fstr->bv_len + 1 );
 
                snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s<=%s)",
-                       atmp.bv_val, vtmp.bv_val );
+                       atmp.bv_val, vtmp.bv_len ? vtmp.bv_val : "" );
 
                ber_memfree( vtmp.bv_val );
                break;
@@ -377,7 +377,7 @@ ldap_back_int_filter_map_rewrite(
                fstr->bv_val = malloc( fstr->bv_len + 1 );
 
                snprintf( fstr->bv_val, fstr->bv_len + 1, "(%s~=%s)",
-                       atmp.bv_val, vtmp.bv_val );
+                       atmp.bv_val, vtmp.bv_len ? vtmp.bv_val : "" );
 
                ber_memfree( vtmp.bv_val );
                break;
@@ -407,7 +407,7 @@ ldap_back_int_filter_map_rewrite(
 
                        snprintf( &fstr->bv_val[len - 2], vtmp.bv_len + 3,
                                /* "(attr=" */ "%s*)",
-                               vtmp.bv_val );
+                               vtmp.bv_len ? vtmp.bv_val : "" );
 
                        ber_memfree( vtmp.bv_val );
                }
@@ -422,7 +422,7 @@ ldap_back_int_filter_map_rewrite(
 
                                snprintf( &fstr->bv_val[len - 1], vtmp.bv_len + 3,
                                        /* "(attr=[init]*[any*]" */ "%s*)",
-                                       vtmp.bv_val );
+                                       vtmp.bv_len ? vtmp.bv_val : "" );
                                ber_memfree( vtmp.bv_val );
                        }
                }
@@ -437,7 +437,7 @@ ldap_back_int_filter_map_rewrite(
 
                        snprintf( &fstr->bv_val[len - 1], vtmp.bv_len + 3,
                                /* "(attr=[init*][any*]" */ "%s)",
-                               vtmp.bv_val );
+                               vtmp.bv_len ? vtmp.bv_val : "" );
 
                        ber_memfree( vtmp.bv_val );
                }
@@ -482,7 +482,7 @@ ldap_back_int_filter_map_rewrite(
                        fstr->bv_val = ch_realloc( fstr->bv_val, fstr->bv_len + 1 );
 
                        snprintf( &fstr->bv_val[len-1], vtmp.bv_len + 2, 
-                               /*"("*/ "%s)", vtmp.bv_val );
+                               /*"("*/ "%s)", vtmp.bv_len ? vtmp.bv_val : "" );
 
                        ch_free( vtmp.bv_val );
                }
@@ -514,7 +514,7 @@ ldap_back_int_filter_map_rewrite(
                        f->f_mr_dnattrs ? ":dn" : "",
                        !BER_BVISEMPTY( &f->f_mr_rule_text ) ? ":" : "",
                        !BER_BVISEMPTY( &f->f_mr_rule_text ) ? f->f_mr_rule_text.bv_val : "",
-                       vtmp.bv_val );
+                       vtmp.bv_len ? vtmp.bv_val : "" );
                ber_memfree( vtmp.bv_val );
                break;