1
0

100-symlink-force-root-name.patch 753 B

12345678910111213141516171819202122
  1. Force root/root as names for uid0/gid0 instead of using the system
  2. names. This helps make packed download tarballs more reproducible
  3. Signed-off-by: Felix Fietkau <nbd@nbd.name>
  4. ---
  5. --- a/src/create.c
  6. +++ b/src/create.c
  7. @@ -545,12 +545,8 @@ write_gnu_long_link (struct tar_stat_inf
  8. char *tmpname;
  9. header = start_private_header ("././@LongLink", size, 0);
  10. - uid_to_uname (0, &tmpname);
  11. - UNAME_TO_CHARS (tmpname, header->header.uname);
  12. - free (tmpname);
  13. - gid_to_gname (0, &tmpname);
  14. - GNAME_TO_CHARS (tmpname, header->header.gname);
  15. - free (tmpname);
  16. + UNAME_TO_CHARS ("root", header->header.uname);
  17. + GNAME_TO_CHARS ("root", header->header.gname);
  18. strcpy (header->buffer + offsetof (struct posix_header, magic),
  19. OLDGNU_MAGIC);