mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-02-01 12:22:23 +00:00
tar: override symlink permissions
On Linux, symlink permissions cannot be altered and are always 0777.
On Mac OS X they can be 0755. Force 0777 here to keep tarballs
reproducible across systems
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit e25cedd0b5
)
This commit is contained in:
parent
59a1c1675d
commit
e8bd0a606a
10
tools/tar/patches/110-symlink-force-permissions.patch
Normal file
10
tools/tar/patches/110-symlink-force-permissions.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/src/create.c
|
||||
+++ b/src/create.c
|
||||
@@ -1851,6 +1851,7 @@ dump_file0 (struct tar_stat_info *st, ch
|
||||
#ifdef HAVE_READLINK
|
||||
else if (S_ISLNK (st->stat.st_mode))
|
||||
{
|
||||
+ st->stat.st_mode |= 0777; /* make permissions portable */
|
||||
st->link_name = areadlinkat_with_size (parentfd, name, st->stat.st_size);
|
||||
if (!st->link_name)
|
||||
{
|
Loading…
Reference in New Issue
Block a user