aboutsummaryrefslogtreecommitdiff
path: root/net/openldap24-server/files
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2013-12-13 00:50:43 +0000
committerXin LI <delphij@FreeBSD.org>2013-12-13 00:50:43 +0000
commitdb39b2231327ef6488e7b5f6434eaa22b9df74e7 (patch)
treea9f8c14aba1968998f01867c601ab5dcc792ce84 /net/openldap24-server/files
parentd29eae27f3a4cf7d229fdf9b1dd7ba947df740c2 (diff)
downloadports-db39b2231327ef6488e7b5f6434eaa22b9df74e7.tar.gz
ports-db39b2231327ef6488e7b5f6434eaa22b9df74e7.zip
Add a patch from OpenLDAP ITS 7249 [1] which addresses crash issue
with OpenLDAP 'memberof' overlay. Pointed out by: oshogbo [1] http://www.openldap.org/lists/openldap-bugs/201205/msg00002.html
Notes
Notes: svn path=/head/; revision=336300
Diffstat (limited to 'net/openldap24-server/files')
-rw-r--r--net/openldap24-server/files/patch-ITS724956
1 files changed, 56 insertions, 0 deletions
diff --git a/net/openldap24-server/files/patch-ITS7249 b/net/openldap24-server/files/patch-ITS7249
new file mode 100644
index 000000000000..bf66d525f8f0
--- /dev/null
+++ b/net/openldap24-server/files/patch-ITS7249
@@ -0,0 +1,56 @@
+--- servers/slapd/overlays/memberof.c.orig 2013-11-14 19:31:27.000000000 -0800
++++ servers/slapd/overlays/memberof.c 2013-12-12 16:44:13.000000000 -0800
+@@ -190,7 +190,16 @@
+ BerVarray memberof;
+ memberof_is_t what;
+ } memberof_cbinfo_t;
+-
++
++static void
++memberof_set_backend(Operation *op_target, Operation *op, slap_overinst *on)
++{
++ BackendInfo *bi = op->o_bd->bd_info;
++
++ if (bi->bi_type == memberof.on_bi.bi_type)
++ op_target->o_bd->bd_info = (BackendInfo *)on->on_info;
++}
++
+ static int
+ memberof_isGroupOrMember_cb( Operation *op, SlapReply *rs )
+ {
+@@ -285,7 +294,7 @@
+ op2.ors_filterstr = mo->mo_groupFilterstr;
+ op2.ors_filter = &mo->mo_groupFilter;
+
+- op2.o_bd->bd_info = (BackendInfo *)on->on_info;
++ memberof_set_backend(&op2, op, on);
+ (void)op->o_bd->be_search( &op2, &rs2 );
+ op2.o_bd->bd_info = bi;
+
+@@ -307,7 +316,7 @@
+ op2.ors_filterstr = mo->mo_memberFilterstr;
+ op2.ors_filter = &mo->mo_memberFilter;
+
+- op2.o_bd->bd_info = (BackendInfo *)on->on_info;
++ memberof_set_backend(&op2, op, on);
+ (void)op->o_bd->be_search( &op2, &rs2 );
+ op2.o_bd->bd_info = bi;
+
+@@ -409,7 +418,7 @@
+
+ oex.oe_key = (void *)&memberof;
+ LDAP_SLIST_INSERT_HEAD(&op2.o_extra, &oex, oe_next);
+- op2.o_bd->bd_info = (BackendInfo *)on->on_info;
++ memberof_set_backend(&op2, op, on);
+ (void)op->o_bd->be_modify( &op2, &rs2 );
+ op2.o_bd->bd_info = bi;
+ LDAP_SLIST_REMOVE(&op2.o_extra, &oex, OpExtra, oe_next);
+@@ -451,7 +460,7 @@
+
+ oex.oe_key = (void *)&memberof;
+ LDAP_SLIST_INSERT_HEAD(&op2.o_extra, &oex, oe_next);
+- op2.o_bd->bd_info = (BackendInfo *)on->on_info;
++ memberof_set_backend(&op2, op, on);
+ (void)op->o_bd->be_modify( &op2, &rs2 );
+ op2.o_bd->bd_info = bi;
+ LDAP_SLIST_REMOVE(&op2.o_extra, &oex, OpExtra, oe_next);