GNU bug report logs - #13588
Pax hangs in case big UID

Previous Next

Package: automake;

Reported by: Petr Hracek <phracek <at> redhat.com>

Date: Wed, 30 Jan 2013 13:33:02 UTC

Severity: normal

Tags: patch

Merged with 8343

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #36 received at 13588 <at> debbugs.gnu.org (full text, mbox):

From: Petr Hracek <phracek <at> redhat.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 13588 <at> debbugs.gnu.org
Subject: Re: bug#13588: Pax hangs in case big UID
Date: Wed, 20 Mar 2013 12:45:59 +0100
Hello Stefano,

one more time. wrong patch file name.

[stone <at> kiasportyw automake(master)]$ cat 
0001-maint-pax-hangs-in-case-big-UID.patch
From af7d2d01b363914ce22628dae06f87065649d402 Mon Sep 17 00:00:00 2001
From: Petr Hracek <phracek <at> redhat.com>
Date: Wed, 20 Mar 2013 12:41:30 +0100
Subject: [PATCH] maint: pax hangs in case big UID

See automake bug #13588

* m4/tar.m4: check for ustar V7 archive format. Maximum value for user 
or group ID
is limited to 2097151
---
 m4/tar.m4 | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/m4/tar.m4 b/m4/tar.m4
index ec8c83e..a7f41d6 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -81,6 +81,27 @@ do
   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
   rm -rf conftest.dir
   if test -s conftest.tar; then
+    AC_CHECK_PROG([ID_TEST], id, [yes], [no])
+    if test x"$ID_TEST" = x"yes"; then
+      if test x"$1" = x"ustar" ; then
+         user_id=`id -u`
+         if test $? -eq 0; then
+           # Maximum allowed UID in case ustar format is 2097151
+           if test $user_id -ge 2097152; then
+             AC_MSG_ERROR([The uid is big and not allowed in case of 
ustar format. Change format in configure.ac],[2])
+             exit 1
+           fi
+         fi
+         group_id=`id -g`
+         if test $? -eq 0; then
+           # Maximum allowed GID in case ustar format is 2097151
+           if test $group_id -ge 2097152; then
+             AC_MSG_ERROR([The gid is big and not allowed in case of 
ustar format. Change format in configure.ac],[2])
+             exit 1
+           fi
+         fi
+      fi
+    fi
     AM_RUN_LOG([$am__untar <conftest.tar])
     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
   fi
-- 
1.8.1.4

[stone <at> kiasportyw automake(master)]$
On 03/20/2013 12:06 PM, Petr Hracek wrote:
>
> diff --git a/m4/tar.m4 b/m4/tar.m4 

-- 
S pozdravem / Best regards

Petr Hracek

Red Hat Czech s.r.o.
BaseOS Core Services Brno

Email: phracek <at> redhat.com
Web: www.cz.redhat.com





This bug report was last modified 12 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.