From 7f0f7291d9e7cda05870e3ae0626acf7f4c0f1b3 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Tue, 1 Nov 2011 06:56:37 -0600 Subject: [PATCH] another update from the hurd guys --- debian/changelog | 6 +++++ debian/patches/fix_FTBFS4Hurd.diff | 43 ++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index 36b47f4..0e001ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pax (1:20090728-4) unstable; urgency=low + + * updated patch to fix hurd FTBFS, closes: #645346 + + -- Bdale Garbee Tue, 01 Nov 2011 06:55:59 -0600 + pax (1:20090728-3) unstable; urgency=low * switch to use of dh diff --git a/debian/patches/fix_FTBFS4Hurd.diff b/debian/patches/fix_FTBFS4Hurd.diff index 68bcbd5..1be9590 100644 --- a/debian/patches/fix_FTBFS4Hurd.diff +++ b/debian/patches/fix_FTBFS4Hurd.diff @@ -1,6 +1,6 @@ diff -ur pax-20090728/file_subs.c pax-20090728.modified/file_subs.c --- pax-20090728/file_subs.c 2009-07-28 17:38:28.000000000 +0000 -+++ pax-20090728.modified/file_subs.c 2011-10-15 12:56:46.000000000 +0000 ++++ pax-20090728.modified/file_subs.c 2011-10-31 17:39:17.000000000 +0000 @@ -351,7 +351,7 @@ int pass = 0; mode_t file_mode; @@ -23,11 +23,26 @@ diff -ur pax-20090728/file_subs.c pax-20090728.modified/file_subs.c + } len = readlink(nm, target, - sizeof target - 1); -+ sb.st_size); ++ sb.st_size + 1); if (len == -1) { syswarn(0, errno, "cannot follow symlink %s in chain for %s", -@@ -411,6 +418,7 @@ +@@ -383,6 +390,14 @@ + res = -1; + goto badlink; + } ++ if (len > sb.st_size) { ++ syswarn(0, errno, ++ "symlink %s increased in size between lstat() and readlink() for %s", ++ nm, arcn->name); ++ ++ res = -1; ++ goto badlink; ++ } + target[len] = '\0'; + nm = target; + } +@@ -411,6 +426,7 @@ paxwarn(0, "%s skipped. Sockets cannot be copied or extracted", nm); @@ -35,7 +50,7 @@ diff -ur pax-20090728/file_subs.c pax-20090728.modified/file_subs.c return(-1); case PAX_SLK: res = symlink(arcn->ln_name, nm); -@@ -425,6 +433,7 @@ +@@ -425,6 +441,7 @@ */ paxwarn(0, "%s has an unknown file type, skipping", nm); @@ -43,7 +58,7 @@ diff -ur pax-20090728/file_subs.c pax-20090728.modified/file_subs.c return(-1); } -@@ -440,14 +449,17 @@ +@@ -440,14 +457,17 @@ * we failed to make the node */ oerrno = errno; @@ -62,7 +77,7 @@ diff -ur pax-20090728/file_subs.c pax-20090728.modified/file_subs.c return(-1); } } -@@ -465,8 +477,10 @@ +@@ -465,8 +485,10 @@ /* * symlinks are done now. */ @@ -74,7 +89,7 @@ diff -ur pax-20090728/file_subs.c pax-20090728.modified/file_subs.c /* * IMPORTANT SECURITY NOTE: -@@ -517,6 +531,7 @@ +@@ -517,6 +539,7 @@ if (patime || pmtime) set_ftime(nm, arcn->sb.st_mtime, arcn->sb.st_atime, 0); @@ -84,12 +99,12 @@ diff -ur pax-20090728/file_subs.c pax-20090728.modified/file_subs.c diff -ur pax-20090728/tables.c pax-20090728.modified/tables.c --- pax-20090728/tables.c 2009-07-28 17:38:28.000000000 +0000 -+++ pax-20090728.modified/tables.c 2011-10-15 13:39:29.000000000 +0000 ++++ pax-20090728.modified/tables.c 2011-10-31 17:17:26.000000000 +0000 @@ -55,6 +55,7 @@ #include "pax.h" #include "tables.h" #include "extern.h" -+#include "features.h" ++#include /* * Routines for controlling the contents of all the different databases pax @@ -97,7 +112,7 @@ diff -ur pax-20090728/tables.c pax-20090728.modified/tables.c add_dir(char *name, struct stat *psb, int frc_mode) { DIRDATA *dblk; -+#if (_POSIX_C_SOURCE - 0) >= 200809L ++#if (_POSIX_VERSION >= 200809L) + char *rp = NULL; +#else char realname[MAXPATHLEN], *rp; @@ -107,7 +122,7 @@ diff -ur pax-20090728/tables.c pax-20090728.modified/tables.c return; if (havechd && *name != '/') { -+#if (_POSIX_C_SOURCE - 0) >= 200809L ++#if (_POSIX_VERSION >= 200809L) + if ((rp = realpath(name, NULL)) == NULL) { +#else if ((rp = realpath(name, realname)) == NULL) { @@ -119,7 +134,7 @@ diff -ur pax-20090728/tables.c pax-20090728.modified/tables.c if (dblk == NULL) { paxwarn(1, "Unable to store mode and times for created" " directory: %s", name); -+#if (_POSIX_C_SOURCE - 0) >= 200809L ++#if (_POSIX_VERSION >= 200809L) + free(rp); +#endif return; @@ -129,7 +144,7 @@ diff -ur pax-20090728/tables.c pax-20090728.modified/tables.c if ((dblk->name = strdup(name)) == NULL) { paxwarn(1, "Unable to store mode and times for created" " directory: %s", name); -+#if (_POSIX_C_SOURCE - 0) >= 200809L ++#if (_POSIX_VERSION >= 200809L) + free(rp); +#endif return; @@ -139,7 +154,7 @@ diff -ur pax-20090728/tables.c pax-20090728.modified/tables.c dblk->atime = psb->st_atime; dblk->frc_mode = frc_mode; ++dircnt; -+#if (_POSIX_C_SOURCE - 0) >= 200809L ++#if (_POSIX_VERSION >= 200809L) + free(rp); +#endif } -- 2.30.2