Hello,

I have uploaded the attached changes (patch from upstream) to DELAYED/5

Samuel
diff -Nru shadow-4.2/debian/changelog shadow-4.2/debian/changelog
--- shadow-4.2/debian/changelog 2016-09-18 16:42:16.000000000 +0200
+++ shadow-4.2/debian/changelog 2016-11-22 19:31:28.000000000 +0100
@@ -1,3 +1,10 @@
+shadow (1:4.2-3.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Apply upstream patch to fix build on hurd-i386. (Closes: #750480)
+
+ -- Samuel Thibault <sthiba...@debian.org>  Tue, 22 Nov 2016 18:31:28 +0000
+
 shadow (1:4.2-3.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru shadow-4.2/debian/patches/9999_git-hurd-PATH_MAX 
shadow-4.2/debian/patches/9999_git-hurd-PATH_MAX
--- shadow-4.2/debian/patches/9999_git-hurd-PATH_MAX    1970-01-01 
01:00:00.000000000 +0100
+++ shadow-4.2/debian/patches/9999_git-hurd-PATH_MAX    2016-11-22 
19:31:28.000000000 +0100
@@ -0,0 +1,57 @@
+commit 4911773b7746ee86229f6a552a806b8e756b74c9
+Author: Serge Hallyn <serge.hal...@ubuntu.com>
+Date:   Thu Jun 26 16:48:56 2014 -0500
+
+    From: Svante Signell <svante.sign...@gmail.com>
+    
+    Currently shadow fails to build from source and is flagged as
+    out-of-date. This is due to a usage of PATH_MAX, which is not defined
+    on GNU/Hurd. The attached patch solves this problem by allocating a
+    fixed number of 32 bytes for the string proc_dir_name in files
+    src/procuidmap.c and src/procgidmap.c. (In fact only 18 bytes are
+    needed)
+    
+    Signed-off-by: Serge Hallyn <serge.hal...@ubuntu.com>
+
+diff --git a/src/newgidmap.c b/src/newgidmap.c
+index 1527a61..a532b45 100644
+--- a/src/newgidmap.c
++++ b/src/newgidmap.c
+@@ -94,7 +94,7 @@ static void usage(void)
+  */
+ int main(int argc, char **argv)
+ {
+-      char proc_dir_name[PATH_MAX];
++      char proc_dir_name[32];
+       char *target_str;
+       pid_t target, parent;
+       int proc_dir_fd;
+@@ -120,6 +120,7 @@ int main(int argc, char **argv)
+       if (!get_pid(target_str, &target))
+               usage();
+ 
++      /* max string length is 6 + 10 + 1 + 1 = 18, allocate 32 bytes */
+       written = snprintf(proc_dir_name, sizeof(proc_dir_name), "/proc/%u/",
+               target);
+       if ((written <= 0) || (written >= sizeof(proc_dir_name))) {
+diff --git a/src/newuidmap.c b/src/newuidmap.c
+index 69c5094..5150078 100644
+--- a/src/newuidmap.c
++++ b/src/newuidmap.c
+@@ -94,7 +94,7 @@ void usage(void)
+  */
+ int main(int argc, char **argv)
+ {
+-      char proc_dir_name[PATH_MAX];
++      char proc_dir_name[32];
+       char *target_str;
+       pid_t target, parent;
+       int proc_dir_fd;
+@@ -120,6 +120,7 @@ int main(int argc, char **argv)
+       if (!get_pid(target_str, &target))
+               usage();
+ 
++      /* max string length is 6 + 10 + 1 + 1 = 18, allocate 32 bytes */
+       written = snprintf(proc_dir_name, sizeof(proc_dir_name), "/proc/%u/",
+               target);
+       if ((written <= 0) || (written >= sizeof(proc_dir_name))) {
diff -Nru shadow-4.2/debian/patches/series shadow-4.2/debian/patches/series
--- shadow-4.2/debian/patches/series    2015-11-12 15:24:49.000000000 +0100
+++ shadow-4.2/debian/patches/series    2016-11-22 19:31:28.000000000 +0100
@@ -35,3 +35,4 @@
 1000_configure_userns
 1010_vietnamese_translation
 1020_fix_user_busy_errors
+9999_git-hurd-PATH_MAX

Reply via email to