summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-02-01 22:26:20 -0500
committermidipix <writeonce@midipix.org>2020-05-23 05:59:02 +0000
commitefbaf8132d09a6bd26b64556291a7ff62fd413b9 (patch)
tree875032f05fb8c2b8d881c1105cd25e692fc6093d /src
parent239ac5c3f246a737d7b70817319a37d6cece8a69 (diff)
downloadtpax-efbaf8132d09a6bd26b64556291a7ff62fd413b9.tar.bz2
tpax-efbaf8132d09a6bd26b64556291a7ff62fd413b9.tar.xz
driver: --strict-path-input, --pure-path-output: initial support.
Diffstat (limited to 'src')
-rw-r--r--src/driver/tpax_driver_ctx.c8
-rw-r--r--src/internal/tpax_driver_impl.h2
-rw-r--r--src/skin/tpax_skin_default.c16
3 files changed, 26 insertions, 0 deletions
diff --git a/src/driver/tpax_driver_ctx.c b/src/driver/tpax_driver_ctx.c
index d8e2de8..c27ce90 100644
--- a/src/driver/tpax_driver_ctx.c
+++ b/src/driver/tpax_driver_ctx.c
@@ -403,6 +403,14 @@ int tpax_get_driver_ctx(
case TAG_NORECURSE:
cctx.drvflags &= ~(uintptr_t)TPAX_DRIVER_DIR_MEMBER_RECURSE;
break;
+
+ case TAG_STRICT_PATH:
+ cctx.drvflags |= TPAX_DRIVER_STRICT_PATH_INPUT;
+ break;
+
+ case TAG_PURE_PATH:
+ cctx.drvflags |= TPAX_DRIVER_PURE_PATH_OUTPUT;
+ break;
}
} else {
operand = entry;
diff --git a/src/internal/tpax_driver_impl.h b/src/internal/tpax_driver_impl.h
index 5f98415..c99553a 100644
--- a/src/internal/tpax_driver_impl.h
+++ b/src/internal/tpax_driver_impl.h
@@ -36,6 +36,8 @@ enum app_tags {
TAG_BLKSIZE,
TAG_RECURSE,
TAG_NORECURSE,
+ TAG_STRICT_PATH,
+ TAG_PURE_PATH,
};
struct tpax_driver_ctx_impl {
diff --git a/src/skin/tpax_skin_default.c b/src/skin/tpax_skin_default.c
index c6de7e6..4e93231 100644
--- a/src/skin/tpax_skin_default.c
+++ b/src/skin/tpax_skin_default.c
@@ -41,5 +41,21 @@ const struct argv_option tpax_default_options[] = {
{"no-recurse", 'd',TAG_NORECURSE,ARGV_OPTARG_NONE,0,0,0,
"do not recurse into directory archive members"},
+ {"strict-path-input",
+ 0,TAG_STRICT_PATH,ARGV_OPTARG_NONE,0,0,0,
+ "do not allow file arguments (in write and copy modes) "
+ "to contain parent-directoy (dot dot) references"},
+
+ {"pure-path-output",
+ 0,TAG_PURE_PATH,ARGV_OPTARG_NONE,0,0,0,
+ "output (in list mode) or store (in write mode) path "
+ "names in pure form, specifically by liminating all "
+ "this-dir (dot) elements from the listed/stored path "
+ "name, as well as replacing each meaningless sequence "
+ "of consecutive forward slash characters with a single "
+ "forward slash; the presence of exactly two forward "
+ "slash characters in the beginning of a path may be "
+ "meaningful, and therefore shall remain instact."},
+
{0,0,0,0,0,0,0,0}
};