rpms/samba4/devel 0001-Fix-extended-operation-return-path.patch, NONE, 1.1 samba4.spec, 1.9, 1.10

Simo Sorce simo at fedoraproject.org
Tue Mar 10 22:03:10 UTC 2009


Author: simo

Update of /cvs/pkgs/rpms/samba4/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20336

Modified Files:
	samba4.spec 
Added Files:
	0001-Fix-extended-operation-return-path.patch 
Log Message:
* Tue Mar 10 2009 Simo Sorce <ssorce at redhat.com> - 4.0.0-12alpha7
- Second part of fix for the ldb segfault problem from upstream


0001-Fix-extended-operation-return-path.patch:

--- NEW FILE 0001-Fix-extended-operation-return-path.patch ---
>From 97cccb22194380ce84bf6188df90e2438f1176db Mon Sep 17 00:00:00 2001
From: Simo Sorce <idra at samba.org>
Date: Tue, 10 Mar 2009 10:05:52 -0400
Subject: [PATCH] Fix extended operation return path.

Extended operations return was not going thorugh the same patch as others
leaving the ctx around. Plus we were neutralizing the spy too early so that it
didn't set the request_terminated flag as it should have.

This should hopefully fix the failures in the build farm.
---
 source4/lib/ldb/ldb_tdb/ldb_tdb.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index d38cb82..9df62be 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -1020,13 +1020,14 @@ static void ltdb_timeout(struct tevent_context *ev,
 	ctx = talloc_get_type(private_data, struct ltdb_context);
 
 	if (!ctx->request_terminated) {
-		/* neutralize the spy */
-		ctx->spy->ctx = NULL;
-
 		/* request is done now */
 		ltdb_request_done(ctx, LDB_ERR_TIME_LIMIT_EXCEEDED);
 	}
 
+	if (!ctx->request_terminated) {
+		/* neutralize the spy */
+		ctx->spy->ctx = NULL;
+	}
 	talloc_free(ctx);
 }
 
@@ -1086,10 +1087,9 @@ static void ltdb_callback(struct tevent_context *ev,
 
 	ctx = talloc_get_type(private_data, struct ltdb_context);
 
-	if (!ctx->request_terminated) {
-		/* neutralize the spy */
-		ctx->spy->ctx = NULL;
-	} else goto done;
+	if (ctx->request_terminated) {
+		goto done;
+	}
 
 	switch (ctx->req->operation) {
 	case LDB_SEARCH:
@@ -1109,7 +1109,7 @@ static void ltdb_callback(struct tevent_context *ev,
 		break;
 	case LDB_EXTENDED:
 		ltdb_handle_extended(ctx);
-		return;
+		goto done;
 	default:
 		/* no other op supported */
 		ret = LDB_ERR_UNWILLING_TO_PERFORM;
@@ -1121,6 +1121,10 @@ static void ltdb_callback(struct tevent_context *ev,
 	}
 
 done:
+	if (!ctx->request_terminated) {
+		/* neutralize the spy */
+		ctx->spy->ctx = NULL;
+	}
 	talloc_free(ctx);
 }
 
-- 
1.5.6.6



Index: samba4.spec
===================================================================
RCS file: /cvs/pkgs/rpms/samba4/devel/samba4.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- samba4.spec	10 Mar 2009 00:17:24 -0000	1.9
+++ samba4.spec	10 Mar 2009 22:02:39 -0000	1.10
@@ -1,4 +1,4 @@
-%define main_release 11
+%define main_release 12
 %define samba4_version 4.0.0
 
 %define talloc_version 1.2.0
@@ -57,6 +57,7 @@
 
 Patch1: samba-4.0.0alpha6-GIT-3508a66-undefined-comparison_fn_t.patch
 Patch2: 0001-Fix-potential-segfaults-using-freed-memory.patch
+Patch3: 0001-Fix-extended-operation-return-path.patch
 
 Requires(pre): /usr/sbin/groupadd
 
@@ -290,6 +291,7 @@
 
 %patch1 -p1 -b .undefined-comparison_fn_t
 %patch2 -p1 -b .potential_ldb_segfault
+%patch3 -p1 -b .extended_operation
 
 mv source4/VERSION source4/VERSION.orig
 sed -e 's/SAMBA_VERSION_VENDOR_SUFFIX=$/&%{release}/' < source4/VERSION.orig > source4/VERSION
@@ -835,6 +837,9 @@
 %endif
 
 %changelog
+* Tue Mar 10 2009 Simo Sorce <ssorce at redhat.com> - 4.0.0-12alpha7
+- Second part of fix for the ldb segfault problem from upstream
+
 * Mon Mar 09 2009 Simo Sorce <ssorce at redhat.com> - 4.0.0-11alpha7
 - Add upstream patch to fix a problem within ldb
 




More information about the fedora-extras-commits mailing list