From 80f43a829180bc0301fecb5dc4ddf6dd95348976 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 9 Oct 2018 20:48:31 -0400 Subject: driver: added 'chmod' command support. --- src/skin/ntux_skin_chmod.c | 39 +++++++++++++++++++++++++++++++++++++++ src/skin/ntux_skin_default.c | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 src/skin/ntux_skin_chmod.c (limited to 'src/skin') diff --git a/src/skin/ntux_skin_chmod.c b/src/skin/ntux_skin_chmod.c new file mode 100644 index 0000000..cb300a6 --- /dev/null +++ b/src/skin/ntux_skin_chmod.c @@ -0,0 +1,39 @@ +#include "ntux_driver_impl.h" +#include "argv/argv.h" + +const struct argv_option ntux_chmod_options[] = { + {"version", 'v',TAG_VERSION,ARGV_OPTARG_NONE,0,0,0, + "show version information"}, + + {"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0, + "show usage information [listing %s options only]"}, + + {"verbose", 'V',TAG_VERBOSE,ARGV_OPTARG_NONE,0,0,0, + "dump security descriptor information for each file and action"}, + + {"silent", 'f',TAG_VERSION,ARGV_OPTARG_NONE,0,0,0, + "suppress most error messages"}, + + {"recursive", 'R',TAG_RECURSIVE,ARGV_OPTARG_NONE,0,0,0, + "recurse into sub-directories"}, + + {"strmode", 's',TAG_STRMODE,ARGV_OPTARG_REQUIRED,0,0,"", + "set mode based on the symbolic mode %s"}, + + {"refmode", 'e',TAG_REFMODE,ARGV_OPTARG_REQUIRED,0,0,"", + "set mode based on the reference file %s"}, + + {"reference", 0,TAG_REFMODE,ARGV_OPTARG_REQUIRED,0,0,0, + "a synonym for --refmode"}, + + {"changes", 'c',TAG_CHANGES,ARGV_OPTARG_NONE,0,0,0, + "a synonym for --refmode"}, + + {"preserve-root", 0,TAG_ROOTED,ARGV_OPTARG_NONE,0,0,0, + "disallow operating on the root folder /"}, + + {"no-preserve-root", 0,TAG_ROOTLESS,ARGV_OPTARG_NONE,0,0,0, + "allow operating on the root folder /"}, + + {0,0,0,0,0,0,0,0} +}; diff --git a/src/skin/ntux_skin_default.c b/src/skin/ntux_skin_default.c index 73a89bf..f79f008 100644 --- a/src/skin/ntux_skin_default.c +++ b/src/skin/ntux_skin_default.c @@ -8,7 +8,7 @@ const struct argv_option ntux_default_options[] = { {"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0, "show usage information [listing %s options only]"}, - {"cmd", 0,TAG_CMD,ARGV_OPTARG_REQUIRED,0,"stat|spawn|strace",0, + {"cmd", 0,TAG_CMD,ARGV_OPTARG_REQUIRED,0,"stat|spawn|strace|chmod",0, "invoke one of the following ntux commands: %s"}, {0,0,0,0,0,0,0,0} -- cgit v1.2.3