bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13588: Pax hangs in case big UID


From: Petr Hracek
Subject: bug#13588: Pax hangs in case big UID
Date: Wed, 20 Mar 2013 12:45:59 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Hello Stefano,

one more time. wrong patch file name.

address@hidden automake(master)]$ cat 0001-maint-pax-hangs-in-case-big-UID.patch
From af7d2d01b363914ce22628dae06f87065649d402 Mon Sep 17 00:00:00 2001
From: Petr Hracek <address@hidden>
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

address@hidden 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: address@hidden
Web: www.cz.redhat.com






reply via email to

[Prev in Thread] Current Thread [Next in Thread]