summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa2018-03-30 20:18:12 +0200
committerDenys Vlasenko2018-04-01 13:04:11 +0200
commit08cbe510dd779106c03e0699dac9c8d0347cec6b (patch)
tree697b930d865c976bd547fcc0429f80c8281d47e7
parentaf874cc63e75f9c3b6f6715727a3a3e92a3b686f (diff)
downloadbusybox-08cbe510dd779106c03e0699dac9c8d0347cec6b.zip
busybox-08cbe510dd779106c03e0699dac9c8d0347cec6b.tar.gz
cpio: extract "unsafe" symlinks the same way tar/unzip does
function old new delta cpio_main 588 596 +8 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/cpio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/archival/cpio.c b/archival/cpio.c
index 1d6cbd1..308ec1b 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -508,6 +508,8 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
while (get_header_cpio(archive_handle) == EXIT_SUCCESS)
continue;
+ create_symlinks_from_list(archive_handle->symlink_placeholders);
+
if (archive_handle->cpio__blocks != (off_t)-1
&& !(opt & OPT_QUIET)
) {