From 5d49c0881f37db76cf9292b25cb8fc92c04e96c8 Mon Sep 17 00:00:00 2001 From: Simone Rota Date: Sat, 13 May 2006 20:58:08 +0000 Subject: [PATCH] tar: disabled automatic -p option for root user --- tar/.md5sum | 1 + tar/Pkgfile | 5 +++-- tar/tar-1.15.1-rootp.patch | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 tar/tar-1.15.1-rootp.patch diff --git a/tar/.md5sum b/tar/.md5sum index 99b37e3e..b3719797 100644 --- a/tar/.md5sum +++ b/tar/.md5sum @@ -1,3 +1,4 @@ +761b3bd89fcd56414c674ecc5f311bc9 tar-1.15.1-rootp.patch 9e3623f7c88d8766878ecb27c980d86a tar-1.15.1-sparse.patch 57da3c38f8e06589699548a34d5a5d07 tar-1.15.1.tar.bz2 3f32d11defc901c8487566a1cddae663 tar.1 diff --git a/tar/Pkgfile b/tar/Pkgfile index 11c959a3..9ec28aae 100644 --- a/tar/Pkgfile +++ b/tar/Pkgfile @@ -4,13 +4,14 @@ name=tar version=1.15.1 -release=2 +release=3 source=(http://mirrors.sunsite.dk/gnu/$name/$name-$version.tar.bz2 \ - $name-$version-sparse.patch tar.1) + $name-$version-sparse.patch $name-$version-rootp.patch tar.1) build() { cd $name-$version patch -p1 < ../$name-$version-sparse.patch + patch -p0 < ../$name-$version-rootp.patch ./configure --prefix= \ --libexec=/usr/lib/tar \ --disable-nls diff --git a/tar/tar-1.15.1-rootp.patch b/tar/tar-1.15.1-rootp.patch new file mode 100644 index 00000000..b9232e6b --- /dev/null +++ b/tar/tar-1.15.1-rootp.patch @@ -0,0 +1,15 @@ +--- src/extract.c.orig 2005-12-25 23:41:40.820662032 +0100 ++++ src/extract.c 2005-12-25 23:42:56.056224488 +0100 +@@ -112,8 +112,10 @@ void + extr_init (void) + { + we_are_root = geteuid () == 0; +- same_permissions_option += we_are_root; +- same_owner_option += we_are_root; ++ ++ /* Don't keep permissions by default if we are root. */ ++ /* same_permissions_option += we_are_root; */ ++ /* same_owner_option += we_are_root; */ + + /* Save 'root device' to avoid purging mount points. + FIXME: Should the same be done after handling -C option ? */