diff options
author | Denis Vlasenko | 2008-02-14 20:37:54 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-02-14 20:37:54 +0000 |
commit | e00e5025ecb2eb6160e7b94c0e93fc2a777f6eaa (patch) | |
tree | c08295d50b96a33d51c11b8601ac455333b8004a /archival/libunarchive/get_header_tar.c | |
parent | 39487e2d6a9a2b6e520969f65b4d326da82e354f (diff) | |
download | busybox-e00e5025ecb2eb6160e7b94c0e93fc2a777f6eaa.zip busybox-e00e5025ecb2eb6160e7b94c0e93fc2a777f6eaa.tar.gz |
tar: real support for -p. +200 if selected.
By Natanael Copa <natanael.copa at gmail.com>
Diffstat (limited to 'archival/libunarchive/get_header_tar.c')
-rw-r--r-- | archival/libunarchive/get_header_tar.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index 5a1f594..893cd5b 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c @@ -187,6 +187,10 @@ char get_header_tar(archive_handle_t *archive_handle) /* FIXME: what if we have non-link object with link_target? */ /* Will link_target be free()ed? */ } +#if ENABLE_FEATURE_TAR_UNAME_GNAME + file_header->uname = tar.uname[0] ? xstrndup(tar.uname, sizeof(tar.uname)) : NULL; + file_header->gname = tar.gname[0] ? xstrndup(tar.gname, sizeof(tar.gname)) : NULL; +#endif file_header->mtime = GET_OCTAL(tar.mtime); file_header->size = GET_OCTAL(tar.size); file_header->gid = GET_OCTAL(tar.gid); @@ -317,6 +321,9 @@ char get_header_tar(archive_handle_t *archive_handle) free(file_header->link_target); /* Do not free(file_header->name)! */ - +#if ENABLE_FEATURE_TAR_UNAME_GNAME + free(file_header->uname); + free(file_header->gname); +#endif return EXIT_SUCCESS; } |