aboutsummaryrefslogtreecommitdiffstats
path: root/tools/tar/patches/100-symlink-force-root-name.patch
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2018-01-19 18:55:28 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2018-01-20 20:22:01 +0100
commite787ad5c9658deb1baae7ebb1f86bfbe219cb13f (patch)
tree6ce3ac9a284b754a0afa69aa0c187d55544387c7 /tools/tar/patches/100-symlink-force-root-name.patch
parenta30370bbf114b54df1906a39b0ebb76ba0e53a8e (diff)
downloadupstream-e787ad5c9658deb1baae7ebb1f86bfbe219cb13f.tar.gz
upstream-e787ad5c9658deb1baae7ebb1f86bfbe219cb13f.tar.bz2
upstream-e787ad5c9658deb1baae7ebb1f86bfbe219cb13f.zip
tools/tar: update to 1.30
update GNU tar to 1.30 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'tools/tar/patches/100-symlink-force-root-name.patch')
-rw-r--r--tools/tar/patches/100-symlink-force-root-name.patch21
1 files changed, 13 insertions, 8 deletions
diff --git a/tools/tar/patches/100-symlink-force-root-name.patch b/tools/tar/patches/100-symlink-force-root-name.patch
index 896b4723fc..93f889761b 100644
--- a/tools/tar/patches/100-symlink-force-root-name.patch
+++ b/tools/tar/patches/100-symlink-force-root-name.patch
@@ -5,16 +5,21 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/src/create.c
+++ b/src/create.c
-@@ -545,12 +545,8 @@ write_gnu_long_link (struct tar_stat_inf
- char *tmpname;
+@@ -544,17 +544,8 @@ write_gnu_long_link (struct tar_stat_inf
+ union block *header;
header = start_private_header ("././@LongLink", size, 0);
-- uid_to_uname (0, &tmpname);
-- UNAME_TO_CHARS (tmpname, header->header.uname);
-- free (tmpname);
-- gid_to_gname (0, &tmpname);
-- GNAME_TO_CHARS (tmpname, header->header.gname);
-- free (tmpname);
+- if (! numeric_owner_option)
+- {
+- static char *uname, *gname;
+- if (!uname)
+- {
+- uid_to_uname (0, &uname);
+- gid_to_gname (0, &gname);
+- }
+- UNAME_TO_CHARS (uname, header->header.uname);
+- GNAME_TO_CHARS (gname, header->header.gname);
+- }
+ UNAME_TO_CHARS ("root", header->header.uname);
+ GNAME_TO_CHARS ("root", header->header.gname);