diff options
Diffstat (limited to 'toys/pending')
-rw-r--r-- | toys/pending/tar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/toys/pending/tar.c b/toys/pending/tar.c index 7cad2729..bff8b540 100644 --- a/toys/pending/tar.c +++ b/toys/pending/tar.c @@ -121,7 +121,6 @@ static void write_longname(char *name, char type) memset(&tmp, 0, sizeof(tmp)); strcpy(tmp.name, "././@LongLink"); - ITOO(tmp.mode, 0); ITOO(tmp.uid, 0); ITOO(tmp.gid, 0); ITOO(tmp.size, sz); @@ -129,6 +128,11 @@ static void write_longname(char *name, char type) tmp.type = type; strcpy(tmp.magic, "ustar "); + // Historical nonsense to match other implementations. Never used. + ITOO(tmp.mode, 0644); + strcpy(tmp.uname, "root"); + strcpy(tmp.gname, "root"); + // Calculate checksum. Since 512*255 = 0377000 in octal, this can never // use more than 6 digits. The last byte is ' ' or historical reasons. itoo(tmp.chksum, sizeof(tmp.chksum)-1, cksum(&tmp)); |