fix: slapd with rwm overlay segfault following ldapmodify

Resolves: #865685
This commit is contained in:
Jan Vcelak 2012-10-12 08:58:01 +02:00
parent 8dc41a3295
commit 17508fb68c
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,33 @@
fix: slapd with rwm overlay segfault following ldapmodify
(newSup is NULL if it was specified, but same as old Sup)
Author: Howard Chu <hyc@openldap.org>
Upstream ITS: #7414
Upstream commit: d42c7c4
Resolves: #865685
diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c
index cc6211e..d12fd0f 100644
--- a/servers/slapd/overlays/rwm.c
+++ b/servers/slapd/overlays/rwm.c
@@ -107,10 +107,12 @@ rwm_op_rollback( Operation *op, SlapReply *rs, rwm_op_state *ros )
break;
case LDAP_REQ_MODRDN:
if ( op->orr_newSup != ros->orr_newSup ) {
- ch_free( op->orr_newSup->bv_val );
- ch_free( op->orr_nnewSup->bv_val );
- op->o_tmpfree( op->orr_newSup, op->o_tmpmemctx );
- op->o_tmpfree( op->orr_nnewSup, op->o_tmpmemctx );
+ if ( op->orr_newSup ) {
+ ch_free( op->orr_newSup->bv_val );
+ ch_free( op->orr_nnewSup->bv_val );
+ op->o_tmpfree( op->orr_newSup, op->o_tmpmemctx );
+ op->o_tmpfree( op->orr_nnewSup, op->o_tmpmemctx );
+ }
op->orr_newSup = ros->orr_newSup;
op->orr_nnewSup = ros->orr_nnewSup;
}
--
1.7.11.7

View File

@ -8,7 +8,7 @@
Name: openldap
Version: 2.4.33
Release: 1%{?dist}
Release: 2%{?dist}
Summary: LDAP support libraries
Group: System Environment/Daemons
License: OpenLDAP
@ -44,6 +44,7 @@ Patch12: openldap-tls-no-reuse-of-tls_session.patch
Patch13: openldap-nss-regex-search-hashed-cacert-dir.patch
Patch14: openldap-nss-ignore-certdb-type-prefix.patch
Patch15: openldap-nss-certs-from-certdb-fallback-pem.patch
Patch16: openldap-rwm-slapd-segfault-modrdn.patch
# Fedora specific patches
Patch100: openldap-autoconf-pkgconfig-nss.patch
@ -161,6 +162,7 @@ ln -s %{_includedir}/nspr4 include/nspr
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch102 -p1
@ -618,6 +620,9 @@ exit 0
%{evolution_connector_prefix}/
%changelog
* Fri Oct 12 2012 Jan Vcelak <jvcelak@redhat.com> 2.4.33-2
- fix: slapd with rwm overlay segfault following ldapmodify (#865685)
* Thu Oct 11 2012 Jan Vcelak <jvcelak@redhat.com> 2.4.33-1
- new upstream release:
+ slapd: ACLs, syncrepl