From ef8a7085e5014662d1ca74bc13e762f5e900bc3f Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 28 Oct 2020 13:03:59 +0100 Subject: Fix: tar2sqfs: if --root-becomes is used, also retarget links In addition to skipping non-prefixed files and stripping the prefix off of entries we accept, the targets of links also have to be altered, since they can be absolute paths with the root prefix attached. This can affect symbolic links as well. Altough they are allowed to point into nowhere, across filesystem boundaries, they may also be absolute paths refering to existing locations in the filesystem, so no distinction is made by default. However, the later may be intended (e.g. only a subdirectory is packed into SquashFS and then mounted at that location), so a command line switch is added to disable symlink retargetting. Signed-off-by: David Oberhollenzer --- bin/tar2sqfs/tar2sqfs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin/tar2sqfs/tar2sqfs.h') diff --git a/bin/tar2sqfs/tar2sqfs.h b/bin/tar2sqfs/tar2sqfs.h index d127aa0..915d89c 100644 --- a/bin/tar2sqfs/tar2sqfs.h +++ b/bin/tar2sqfs/tar2sqfs.h @@ -16,11 +16,13 @@ #include #include #include +#include /* options.c */ extern bool dont_skip; extern bool keep_time; extern bool no_tail_pack; +extern bool no_symlink_retarget; extern sqfs_writer_cfg_t cfg; extern char *root_becomes; -- cgit v1.2.3