]> 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 23:59:55 +0000 (23:59 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 26 Feb 2007 23:59:55 +0000 (23:59 +0000)
CHANGES
servers/slapd/overlays/rwmmap.c

diff --git a/CHANGES b/CHANGES
index c8a2307b6dad55b37434780663e38ec0218e8e66..1a4fd8d40c1bcc7484d82bdefadd5a6896f885a0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,7 +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
+       Fixed slapd-meta/slapo-rwm filter mapping
 
 OpenLDAP 2.3.34 Release (2007/02/16)
        Fixed libldap missing get_option(TLS CipherSuite) (ITS#4815)
index 8ba1d1d9fae20c8ddcc21532dfaadb5aba1b28a8..5728afd8811982ed4a72cf804942b637c547e800 100644 (file)
@@ -499,7 +499,7 @@ rwm_int_filter_map_rewrite(
                fstr->bv_val = ch_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 : "" );
 
                ch_free( vtmp.bv_val );
                break;
@@ -516,7 +516,7 @@ rwm_int_filter_map_rewrite(
                fstr->bv_val = ch_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 : "" );
 
                ch_free( vtmp.bv_val );
                break;
@@ -533,7 +533,7 @@ rwm_int_filter_map_rewrite(
                fstr->bv_val = ch_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 : "" );
 
                ch_free( vtmp.bv_val );
                break;
@@ -550,7 +550,7 @@ rwm_int_filter_map_rewrite(
                fstr->bv_val = ch_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 : "" );
 
                ch_free( vtmp.bv_val );
                break;
@@ -581,7 +581,7 @@ rwm_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 : "" );
 
                        ch_free( vtmp.bv_val );
                }
@@ -596,7 +596,7 @@ rwm_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 : "" );
                                ch_free( vtmp.bv_val );
                        }
                }
@@ -611,7 +611,7 @@ rwm_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 : "" );
 
                        ch_free( vtmp.bv_val );
                }
@@ -657,7 +657,7 @@ rwm_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 );
                }
@@ -690,7 +690,7 @@ rwm_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 : "" );
                ch_free( vtmp.bv_val );
                break;
        }