summaryrefslogtreecommitdiffhomepage
path: root/src/skin
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-10-09 20:48:31 -0400
committermidipix <writeonce@midipix.org>2018-10-12 13:59:52 -0400
commit80f43a829180bc0301fecb5dc4ddf6dd95348976 (patch)
tree359f21c062534deae79d6527c7e1d9673609c244 /src/skin
parent4fe92c4cff0594f66da78c946cbee5621cf23428 (diff)
downloadntux-80f43a829180bc0301fecb5dc4ddf6dd95348976.tar.bz2
ntux-80f43a829180bc0301fecb5dc4ddf6dd95348976.tar.xz
driver: added 'chmod' command support.
Diffstat (limited to 'src/skin')
-rw-r--r--src/skin/ntux_skin_chmod.c39
-rw-r--r--src/skin/ntux_skin_default.c2
2 files changed, 40 insertions, 1 deletions
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,"<STRMODE>",
+ "set mode based on the symbolic mode %s"},
+
+ {"refmode", 'e',TAG_REFMODE,ARGV_OPTARG_REQUIRED,0,0,"<REFMODE>",
+ "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}