Your message dated Thu, 31 Mar 2011 10:02:16 +0000
with message-id <[email protected]>
and subject line Bug#603155: fixed in ctdb 1.10-1
has caused the Debian Bug report #603155,
regarding Fix broken readdir
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
603155: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603155
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ctdb
Version: 1.0.112-12-1
Severity: normal
Tags: patch
Justification: Policy 9.3.2
User: [email protected]
Usertags: origin-ubuntu natty ubuntu-patch

Hello,

In Ubuntu we applied the following changes:

- debian/patches/99-fix-gcc-warnings: Hide gcc warnings.
- debian/patches/99-fix-broken-readdir-test.diff: Fix broken readdir
  test.

And we think you might be interested in applying them too, attaching the
patches.
diff -Naurp ctdb-1.0.108.orig/lib/events/events_signal.c ctdb-1.0.108/lib/events/events_signal.c
--- ctdb-1.0.108.orig/lib/events/events_signal.c	2009-12-10 09:31:41.000000000 -0500
+++ ctdb-1.0.108/lib/events/events_signal.c	2010-01-12 11:13:28.112386323 -0500
@@ -216,7 +216,8 @@ struct signal_event *common_event_add_si
 	if (ev->pipe_fde == NULL) {
 		if (sig_state->pipe_hack[0] == 0 && 
 		    sig_state->pipe_hack[1] == 0) {
-			pipe(sig_state->pipe_hack);
+			if (pipe(sig_state->pipe_hack)) 
+				return;
 			set_blocking(sig_state->pipe_hack[0], False);
 			set_blocking(sig_state->pipe_hack[1], False);
 		}
diff -Naurp ctdb-1.0.108.orig/lib/replace/getpass.c ctdb-1.0.108/lib/replace/getpass.c
--- ctdb-1.0.108.orig/lib/replace/getpass.c	2009-12-10 09:31:41.000000000 -0500
+++ ctdb-1.0.108/lib/replace/getpass.c	2010-01-12 11:04:00.202386891 -0500
@@ -185,7 +185,8 @@ char *rep_getpass(const char *prompt)
 	buf[0] = 0;
 	if (!gotintr) {
 		in_fd = fileno(in);
-		fgets(buf, bufsize, in);
+		if (fgets(buf, bufsize, in) != in)
+			return NULL;
 	}
 	nread = strlen(buf);
 	if (nread) {
diff -Naurp ctdb-1.0.108.orig/server/ctdb_lockwait.c ctdb-1.0.108/server/ctdb_lockwait.c
--- ctdb-1.0.108.orig/server/ctdb_lockwait.c	2009-12-10 09:31:42.000000000 -0500
+++ ctdb-1.0.108/server/ctdb_lockwait.c	2010-01-12 10:21:53.441761347 -0500
@@ -137,7 +137,9 @@ struct lockwait_handle *ctdb_lockwait(st
 		char c = 0;
 		close(result->fd[0]);
 		tdb_chainlock(ctdb_db->ltdb->tdb, key);
-		write(result->fd[1], &c, 1);
+		if (write(result->fd[1], &c, 1) != 1) {
+			return NULL;
+		}
 		/* make sure we die when our parent dies */
 		while (kill(parent, 0) == 0 || errno != ESRCH) {
 			sleep(5);
diff -Naurp ctdb-1.0.108.orig/server/ctdb_logging.c ctdb-1.0.108/server/ctdb_logging.c
--- ctdb-1.0.108.orig/server/ctdb_logging.c	2009-12-10 09:31:42.000000000 -0500
+++ ctdb-1.0.108/server/ctdb_logging.c	2010-01-12 10:55:50.402386601 -0500
@@ -263,7 +263,8 @@ static void ctdb_logfile_log(const char 
 	if (ret == -1) {
 		const char *errstr = "vasprintf failed\n";
 
-		write(log_state->fd, errstr, strlen(errstr));
+		if (write(log_state->fd, errstr, strlen(errstr)) != strlen(errstr))
+			return;
 		return;
 	}
 
@@ -277,11 +278,13 @@ static void ctdb_logfile_log(const char 
 	free(s);
 	if (ret == -1) {
 		const char *errstr = "asprintf failed\n";
-		write(log_state->fd, errstr, strlen(errstr));
+		if(write(log_state->fd, errstr, strlen(errstr)) != strlen(errstr))
+			return;
 		return;
 	}
 	if (s2) {
-		write(log_state->fd, s2, strlen(s2));
+		if (write(log_state->fd, s2, strlen(s2)) != strlen(s2))
+			return;
 		free(s2);
 	}
 }
@@ -295,12 +298,14 @@ static void ctdb_logfile_log_add(const c
 	if (ret == -1) {
 		const char *errstr = "vasprintf failed\n";
 
-		write(log_state->fd, errstr, strlen(errstr));
+		if (write(log_state->fd, errstr, strlen(errstr)) != strlen(errstr))
+			return;
 		return;
 	}
 
 	if (s) {
-		write(log_state->fd, s, strlen(s));
+		if (write(log_state->fd, s, strlen(s)) != strlen(s))
+			free(s);
 		free(s);
 	}
 }
diff -Naurp ctdb-1.0.108.orig/server/ctdb_persistent.c ctdb-1.0.108/server/ctdb_persistent.c
--- ctdb-1.0.108.orig/server/ctdb_persistent.c	2009-12-10 09:31:42.000000000 -0500
+++ ctdb-1.0.108/server/ctdb_persistent.c	2010-01-12 10:42:02.171761060 -0500
@@ -458,7 +458,8 @@ struct childwrite_handle *ctdb_childwrit
 			c = 1;
 		}
 
-		write(result->fd[1], &c, 1);
+		if (write(result->fd[1], &c, 1) != 1)
+			return NULL;
 
 		/* make sure we die when our parent dies */
 		while (kill(parent, 0) == 0 || errno != ESRCH) {
diff -Naurp ctdb-1.0.108.orig/server/ctdb_recover.c ctdb-1.0.108/server/ctdb_recover.c
--- ctdb-1.0.108.orig/server/ctdb_recover.c	2009-12-10 09:31:42.000000000 -0500
+++ ctdb-1.0.108/server/ctdb_recover.c	2010-01-12 10:27:38.362386447 -0500
@@ -727,11 +727,13 @@ int32_t ctdb_control_set_recmode(struct 
 			cc = 1;
 		}
 
-		write(state->fd[1], &cc, 1);
+		if (write(state->fd[1], &cc, 1) != 1) 
+			return -1;
 		/* make sure we die when our parent dies */
 		while (kill(parent, 0) == 0 || errno != ESRCH) {
 			sleep(5);
-			write(state->fd[1], &cc, 1);
+			if (write(state->fd[1], &cc, 1) != 1)
+				break;
 		}
 		_exit(0);
 	}
diff -Naurp ctdb-1.0.108.orig/server/ctdb_recoverd.c ctdb-1.0.108/server/ctdb_recoverd.c
--- ctdb-1.0.108.orig/server/ctdb_recoverd.c	2009-12-10 09:31:42.000000000 -0500
+++ ctdb-1.0.108/server/ctdb_recoverd.c	2010-01-12 10:25:15.152386407 -0500
@@ -2617,11 +2617,13 @@ static int check_recovery_lock(struct ct
 			cc = RECLOCK_FAILED;
 		}
 
-		write(state->fd[1], &cc, 1);
+		if (write(state->fd[1], &cc, 1) != 1)
+			return -1;
 		/* make sure we die when our parent dies */
 		while (kill(parent, 0) == 0 || errno != ESRCH) {
 			sleep(5);
-			write(state->fd[1], &cc, 1);
+			if (write(state->fd[1], &cc, 1) != 1)
+				break;
 		}
 		_exit(0);
 	}
diff -Naurp ctdb-1.0.108.orig/server/ctdb_vacuum.c ctdb-1.0.108/server/ctdb_vacuum.c
--- ctdb-1.0.108.orig/server/ctdb_vacuum.c	2009-12-10 09:31:42.000000000 -0500
+++ ctdb-1.0.108/server/ctdb_vacuum.c	2010-01-12 11:03:03.152386512 -0500
@@ -839,7 +839,8 @@ ctdb_vacuum_event(struct event_context *
 		 */
 		cc = ctdb_repack_db(ctdb_db, child_ctx);
 
-		write(child_ctx->fd[1], &cc, 1);
+		if (write(child_ctx->fd[1], &cc, 1) != 1)
+			return;
 		_exit(0);
 	}
 
diff -Naurp ctdb-1.0.108.orig/server/eventscript.c ctdb-1.0.108/server/eventscript.c
--- ctdb-1.0.108.orig/server/eventscript.c	2009-12-10 09:31:42.000000000 -0500
+++ ctdb-1.0.108/server/eventscript.c	2010-01-12 10:41:28.601761072 -0500
@@ -50,7 +50,9 @@ static void sigterm(int sig)
 	strftime(tbuf, sizeof(tbuf)-1, "%Y%m%d%H%M%S", 	localtime(&t));
 	sprintf(buf, "{ pstree -p; cat /proc/locks; ls -li /var/ctdb/ /var/ctdb/persistent; }"
 		" >/tmp/ctdb.event.%s.%d", tbuf, getpid());
-	system(buf);
+	if (system(buf) != -1 ) {
+		printf("system() failed");
+	}
 
 	DEBUG(DEBUG_ERR,("Logged timedout eventscript : %s\n", buf));
 
@@ -407,7 +409,8 @@ static int fork_child_for_script(struct 
 		rt = child_run_script(ctdb, state->from_user, state->call, state->options, current);
 		/* We must be able to write PIPEBUF bytes at least; if this
 		   somehow fails, the read above will be short. */
-		write(state->fd[1], &rt, sizeof(rt));
+		if (write(state->fd[1], &rt, sizeof(rt)) != sizeof(rt))
+			return -errno;
 		close(state->fd[1]);
 		_exit(rt);
 	}
diff -Naurp ctdb-1.0.108.orig/tools/ctdb.c ctdb-1.0.108/tools/ctdb.c
--- ctdb-1.0.108.orig/tools/ctdb.c	2009-12-10 09:31:42.000000000 -0500
+++ ctdb-1.0.108/tools/ctdb.c	2010-01-12 11:19:56.242386360 -0500
@@ -3245,7 +3245,8 @@ static int control_restoredb(struct ctdb
 		return -1;
 	}
 
-	read(fh, &dbhdr, sizeof(dbhdr));
+	if (read(fh, &dbhdr, sizeof(dbhdr)) != sizeof(dbhdr))
+		return -1;
 	if (dbhdr.version != DB_VERSION) {
 		DEBUG(DEBUG_ERR,("Invalid version of database dump. File is version %lu but expected version was %u\n", dbhdr.version, DB_VERSION));
 		talloc_free(tmp_ctx);
@@ -3260,7 +3261,8 @@ static int control_restoredb(struct ctdb
 		talloc_free(tmp_ctx);
 		return -1;
 	}		
-	read(fh, outdata.dptr, outdata.dsize);
+	if (read(fh, outdata.dptr, outdata.dsize) != outdata.dsize)
+		return -1;
 	close(fh);
 
 	tm = localtime(&dbhdr.timestamp);
@@ -3613,7 +3615,10 @@ static int control_dumpmemory(struct ctd
 		talloc_free(tmp_ctx);
 		return -1;
 	}
-	write(1, data.dptr, data.dsize);
+	if (write(1, data.dptr, data.dsize) != data.dsize) {
+		talloc_free(tmp_ctx);
+		return -1;
+	}
 	talloc_free(tmp_ctx);
 	return 0;
 }
@@ -3624,7 +3629,8 @@ static int control_dumpmemory(struct ctd
 static void mem_dump_handler(struct ctdb_context *ctdb, uint64_t srvid, 
 			     TDB_DATA data, void *private_data)
 {
-	write(1, data.dptr, data.dsize);
+	if (write(1, data.dptr, data.dsize) != data.dsize)
+		exit(0);
 	exit(0);
 }
 
diff -Naurp ctdb-1.0.108.orig/configure ctdb-1.0.108/configure
--- ctdb-1.0.108.orig/configure	2009-12-10 09:31:44.000000000 -0500
+++ ctdb-1.0.108/configure	2010-01-12 09:30:45.991761240 -0500
@@ -8139,7 +8139,7 @@ else
 /* end confdefs.h.  */
 
 #define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"
+#include "$libreplacedir/tests/os2_delete.c"
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
   libreplace_cv_READDIR_NEEDED=no
@@ -8273,7 +8273,7 @@ else
 #define _LIBREPLACE_REPLACE_H
 #include "$libreplacedir/repdir_getdirentries.c"
 #define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"
+#include "$libreplacedir/tests/os2_delete.c"
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
   libreplace_cv_READDIR_GETDIRENTRIES=yes
@@ -8334,7 +8334,7 @@ else
 #error _donot_use_getdents_replacement_anymore
 #include "$libreplacedir/repdir_getdents.c"
 #define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"
+#include "$libreplacedir/tests/os2_delete.c"
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
   libreplace_cv_READDIR_GETDENTS=yes
diff -Naurp ctdb-1.0.108.orig/lib/replace/repdir.m4 ctdb-1.0.108/lib/replace/repdir.m4
--- ctdb-1.0.108.orig/lib/replace/repdir.m4	2009-12-10 09:31:41.000000000 -0500
+++ ctdb-1.0.108/lib/replace/repdir.m4	2010-01-12 09:31:17.261761034 -0500
@@ -1,7 +1,7 @@
 AC_CACHE_CHECK([for broken readdir],libreplace_cv_READDIR_NEEDED,[
 	AC_TRY_RUN([
 #define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"],
+#include "$libreplacedir/tests/os2_delete.c"],
 	[libreplace_cv_READDIR_NEEDED=no],
 	[libreplace_cv_READDIR_NEEDED=yes],
 	[libreplace_cv_READDIR_NEEDED="assuming not"])
@@ -34,7 +34,7 @@ AC_CACHE_CHECK([for replacing readdir us
 #define _LIBREPLACE_REPLACE_H
 #include "$libreplacedir/repdir_getdirentries.c"
 #define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"],
+#include "$libreplacedir/tests/os2_delete.c"],
 	[libreplace_cv_READDIR_GETDIRENTRIES=yes],
 	[libreplace_cv_READDIR_GETDIRENTRIES=no])
 ])
@@ -57,7 +57,7 @@ AC_CACHE_CHECK([for replacing readdir us
 #error _donot_use_getdents_replacement_anymore
 #include "$libreplacedir/repdir_getdents.c"
 #define test_readdir_os2_delete main
-#include "$libreplacedir/test/os2_delete.c"],
+#include "$libreplacedir/tests/os2_delete.c"],
 	[libreplace_cv_READDIR_GETDENTS=yes],
 	[libreplace_cv_READDIR_GETDENTS=no])
 ])

--- End Message ---
--- Begin Message ---
Source: ctdb
Source-Version: 1.10-1

We believe that the bug you reported is fixed in the latest version of
ctdb, which is due to be installed in the Debian FTP archive:

ctdb-dbg_1.10-1_i386.deb
  to main/c/ctdb/ctdb-dbg_1.10-1_i386.deb
ctdb-dev_1.10-1_i386.deb
  to main/c/ctdb/ctdb-dev_1.10-1_i386.deb
ctdb_1.10-1.debian.tar.gz
  to main/c/ctdb/ctdb_1.10-1.debian.tar.gz
ctdb_1.10-1.dsc
  to main/c/ctdb/ctdb_1.10-1.dsc
ctdb_1.10-1_i386.deb
  to main/c/ctdb/ctdb_1.10-1_i386.deb
ctdb_1.10.orig.tar.gz
  to main/c/ctdb/ctdb_1.10.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mathieu Parent <[email protected]> (supplier of updated ctdb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 26 Mar 2011 21:26:37 +0100
Source: ctdb
Binary: ctdb ctdb-dev ctdb-dbg
Architecture: source i386
Version: 1.10-1
Distribution: experimental
Urgency: low
Maintainer: Debian Samba Maintainers <[email protected]>
Changed-By: Mathieu Parent <[email protected]>
Description: 
 ctdb       - clustered database to store temporary data
 ctdb-dbg   - clustered database to store temporary data -- debugging symbols a
 ctdb-dev   - clustered database to store temporary data -- development files
Closes: 603155
Changes: 
 ctdb (1.10-1) experimental; urgency=low
 .
   * New upstream release, uploaded to experimental (testing needed)
     - updated 02_ctdb_diagnostics.diff
     - removed 50-fix-bashism.diff, merged upstream
     - removed 60-spelling-errors.diff, merged upstream
     - removed 61-spelling-errors-manpages.diff, merged upstream
     - removed 70-nfstickle-sysconfig.diff, fixed upstream
     - removed 71-correct-nice_service.diff, merged upstream
     - added 62-spelling-errors.diff, again
   * d/watch, d/uupdate-wrapper: use new upstream git url
   * Switch to dpkg-source 3.0 (quilt) format
   * Bump Standards-Version to 3.9.1: no changes
   * Added 70-ping_pong-manpage.diff
   * Added 99-fix-broken-readdir-test.diff (Closes: #603155)
   * Upgrading to debhelper 7
     - Replaced 'dh_clean -k -i' by 'dh_prep -i'
   * New package ctdb-dev, add the corresponding Breaks and Replaces
   * d/ctdb.init: updated
Checksums-Sha1: 
 31c497151cdc5318296a95a96faca00f5672ca69 1225 ctdb_1.10-1.dsc
 4b16da2fdc746748cefbd705ded3ad1b2148eb88 991321 ctdb_1.10.orig.tar.gz
 8e01ab14826dde4cf1f86610486738f8e26e38b7 23604 ctdb_1.10-1.debian.tar.gz
 cca42f066ce02bfe661f8bd341c5692e7ab90984 445042 ctdb_1.10-1_i386.deb
 067929c27cc170c0d324f444ad9138e5939ebd5f 43578 ctdb-dev_1.10-1_i386.deb
 ef5d8126defc5612df0a93becd3b27f65afc8791 3375968 ctdb-dbg_1.10-1_i386.deb
Checksums-Sha256: 
 e3b89c2d889acb35ce2499723ff13d4a58507d4b3c92852ebef47890509c854d 1225 
ctdb_1.10-1.dsc
 3c8a0f507e1853448e6a9a86dcda03a8c9127f5b7b93ab25b89464825286b6a9 991321 
ctdb_1.10.orig.tar.gz
 9bb3bedc673af377fb6f6e921b7dbba146205a0a689c99541245774fcc5ec92e 23604 
ctdb_1.10-1.debian.tar.gz
 c2345fa85d71f03c126c47f11842596a724d4a4479759581a14bb589147aa8e0 445042 
ctdb_1.10-1_i386.deb
 564137598b7b502bbe2970b666eff3355a907c59c80b70933ced0c571c6fc887 43578 
ctdb-dev_1.10-1_i386.deb
 9a06c3e11875cc998f0fc96b1e1639b7929e5706995766eb2ea60898ae0e9bc8 3375968 
ctdb-dbg_1.10-1_i386.deb
Files: 
 deb6d88fa79ae537614167d99920b844 1225 net extra ctdb_1.10-1.dsc
 bd7651ab277e8cb3f211ff7d5f2f37fb 991321 net extra ctdb_1.10.orig.tar.gz
 6acfda8fa59bfbc5d93e518d699faa4c 23604 net extra ctdb_1.10-1.debian.tar.gz
 b164d05da72f9fb32d04033ef430f891 445042 net extra ctdb_1.10-1_i386.deb
 9d5289c4c5e2b11c92e693fb9d3c354f 43578 libdevel extra ctdb-dev_1.10-1_i386.deb
 c9756c574b99a5f96052e3d715a76574 3375968 debug extra ctdb-dbg_1.10-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk2OTlwACgkQOW2jYf5fHX+iCACfWz6ZPWo47H79wQSwkGHhCuwY
D10An1Ri/bMLUB4t1WKktFlOjcv8a2i4
=OBtx
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to