diff options
-rw-r--r-- | databases/openldap-server/Makefile | 3 | ||||
-rw-r--r-- | databases/openldap/distinfo | 3 | ||||
-rw-r--r-- | databases/openldap/patches/patch-ap | 51 |
3 files changed, 55 insertions, 2 deletions
diff --git a/databases/openldap-server/Makefile b/databases/openldap-server/Makefile index e00d516fb4b..1f50f5b263b 100644 --- a/databases/openldap-server/Makefile +++ b/databases/openldap-server/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.28 2011/03/17 14:09:21 drochner Exp $ +# $NetBSD: Makefile,v 1.29 2011/10/30 18:05:28 drochner Exp $ PKGNAME= ${DISTNAME:S/-/-server-/} +PKGREVISION= 1 COMMENT= Lightweight Directory Access Protocol server suite CONFLICTS+= openldap<2.3.23nb1 diff --git a/databases/openldap/distinfo b/databases/openldap/distinfo index 30cff193a49..a3cab614d52 100644 --- a/databases/openldap/distinfo +++ b/databases/openldap/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.81 2011/03/25 10:37:19 adam Exp $ +$NetBSD: distinfo,v 1.82 2011/10/30 18:05:28 drochner Exp $ SHA1 (openldap-2.4.24.tgz) = a4baad3d45ae5810ba5fee48603210697c70d52f RMD160 (openldap-2.4.24.tgz) = b9df6a5a562b83fe4ad92f8779909b36fab65c52 @@ -12,6 +12,7 @@ SHA1 (patch-aj) = 4cedc384f2e81d592d66c0e1688e61cf0e69b05d SHA1 (patch-am) = cf97dbc86ed1e0dc3cd7f901dd3f0e4c77490a82 SHA1 (patch-an) = f98c6457474247c092dd0a062e86560cc894ec4e SHA1 (patch-ao) = 6276a1226689fc3be3ffacbcd8df2e4f3e51d1a0 +SHA1 (patch-ap) = c3f14d81e70acf5b236bbeab36204debc1b44b95 SHA1 (patch-da) = cb705b12715869ef4df4477ac82ab006154978de SHA1 (patch-dd) = bc1b506e0516f8ee604898beb39380111d07c56f SHA1 (patch-de) = 749cdbf2d76bcf4ff192ef087f1404b608447a30 diff --git a/databases/openldap/patches/patch-ap b/databases/openldap/patches/patch-ap new file mode 100644 index 00000000000..d2f55db3893 --- /dev/null +++ b/databases/openldap/patches/patch-ap @@ -0,0 +1,51 @@ +$NetBSD: patch-ap,v 1.3 2011/10/30 18:05:28 drochner Exp $ + +ITS#7059 + +--- servers/slapd/schema_init.c.orig 2011-02-02 21:35:26.000000000 +0000 ++++ servers/slapd/schema_init.c +@@ -1852,12 +1852,12 @@ UTF8StringNormalize( + } + nvalue.bv_val[nvalue.bv_len] = '\0'; + +- } else { ++ } else if ( tmp.bv_len ) { + /* string of all spaces is treated as one space */ + nvalue.bv_val[0] = ' '; + nvalue.bv_val[1] = '\0'; + nvalue.bv_len = 1; +- } ++ } /* should never be entered with 0-length val */ + + *normalized = nvalue; + return LDAP_SUCCESS; +@@ -2331,13 +2331,18 @@ postalAddressNormalize( + } + lines[l].bv_len = &val->bv_val[c] - lines[l].bv_val; + +- normalized->bv_len = l; ++ normalized->bv_len = c = l; + +- for ( l = 0; !BER_BVISNULL( &lines[l] ); l++ ) { ++ for ( l = 0; l <= c; l++ ) { + /* NOTE: we directly normalize each line, + * without unescaping the values, since the special + * values '\24' ('$') and '\5C' ('\') are not affected + * by normalization */ ++ if ( !lines[l].bv_len ) { ++ nlines[l].bv_len = 0; ++ nlines[l].bv_val = NULL; ++ continue; ++ } + rc = UTF8StringNormalize( usage, NULL, xmr, &lines[l], &nlines[l], ctx ); + if ( rc != LDAP_SUCCESS ) { + rc = LDAP_INVALID_SYNTAX; +@@ -2350,7 +2355,7 @@ postalAddressNormalize( + normalized->bv_val = slap_sl_malloc( normalized->bv_len + 1, ctx ); + + p = normalized->bv_val; +- for ( l = 0; !BER_BVISNULL( &nlines[l] ); l++ ) { ++ for ( l = 0; l <= c ; l++ ) { + p = lutil_strbvcopy( p, &nlines[l] ); + *p++ = '$'; + } |