[git commit branch/1_28_stable] cpio: extract "unsafe" symlinks the same way tar/unzip does

Denys Vlasenko vda.linux at googlemail.com
Sun Apr 1 11:04:11 UTC 2018


commit: https://git.busybox.net/busybox/commit/?id=08cbe510dd779106c03e0699dac9c8d0347cec6b
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/1_28_stable

function                                             old     new   delta
cpio_main                                            588     596      +8

Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 archival/cpio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/archival/cpio.c b/archival/cpio.c
index 1d6cbd1e2..308ec1b25 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)
 	) {


More information about the busybox-cvs mailing list