2016-12-19 20:06:07 +00:00
|
|
|
Force root/root as names for uid0/gid0 instead of using the system
|
|
|
|
names. This helps make packed download tarballs more reproducible
|
|
|
|
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
---
|
|
|
|
--- a/src/create.c
|
|
|
|
+++ b/src/create.c
|
2018-01-19 16:55:28 +00:00
|
|
|
@@ -544,17 +544,8 @@ write_gnu_long_link (struct tar_stat_inf
|
|
|
|
union block *header;
|
2016-12-19 20:06:07 +00:00
|
|
|
|
|
|
|
header = start_private_header ("././@LongLink", size, 0);
|
2018-01-19 16:55:28 +00:00
|
|
|
- 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);
|
|
|
|
- }
|
2016-12-19 20:06:07 +00:00
|
|
|
+ UNAME_TO_CHARS ("root", header->header.uname);
|
|
|
|
+ GNAME_TO_CHARS ("root", header->header.gname);
|
|
|
|
|
|
|
|
strcpy (header->buffer + offsetof (struct posix_header, magic),
|
|
|
|
OLDGNU_MAGIC);
|