mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 18:47:06 +00:00
23 lines
753 B
Diff
23 lines
753 B
Diff
|
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
|
||
|
@@ -545,12 +545,8 @@ write_gnu_long_link (struct tar_stat_inf
|
||
|
char *tmpname;
|
||
|
|
||
|
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);
|
||
|
+ UNAME_TO_CHARS ("root", header->header.uname);
|
||
|
+ GNAME_TO_CHARS ("root", header->header.gname);
|
||
|
|
||
|
strcpy (header->buffer + offsetof (struct posix_header, magic),
|
||
|
OLDGNU_MAGIC);
|