tar: disabled automatic -p option for root user
This commit is contained in:
parent
6d952c5674
commit
5d49c0881f
@ -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
|
||||
|
@ -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
|
||||
|
15
tar/tar-1.15.1-rootp.patch
Normal file
15
tar/tar-1.15.1-rootp.patch
Normal file
@ -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 ? */
|
Loading…
x
Reference in New Issue
Block a user