From dad9228494e3cc03dc477e8109f43119390b53c4 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 9 Dec 2019 15:52:38 +0100 Subject: Only check for OS specific bad filenames when unpacking When converting a SquashFS image to a tarball, it makes no sense to refuse conversion if the filename is considered evil by the OS. This patch adds an option to is_filename_sane to check if the OS has a problem with the given file name. sqfs2tar sets it to false and converts everything while rdsquashfs sets it to true when unpacking. Signed-off-by: David Oberhollenzer --- include/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/common.h b/include/common.h index cdcce39..38237a0 100644 --- a/include/common.h +++ b/include/common.h @@ -140,7 +140,7 @@ void sqfs_writer_cleanup(sqfs_writer_t *sqfs); void sqfs_perror(const char *file, const char *action, int error_code); -bool is_filename_sane(const char *name); +bool is_filename_sane(const char *name, bool check_os_specific); /* A wrapper around mkdir() that behaves like 'mkdir -p'. It tries to create -- cgit v1.2.3