From 669dadfa07a5e63db8d9e572603872be88db52a3 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sat, 20 Jul 2013 17:47:05 +0200 Subject: procfs: Ignore arguments for compatibility with Linux' procfs. Ignore the --nodev, --noexec and --nosuid arguments. * procfs/main.c (argp_parser): Ignore some arguments for compatibility. --- main.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/main.c b/main.c index 1b19c01..90b3e92 100644 --- a/main.c +++ b/main.c @@ -37,6 +37,10 @@ pid_t opt_fake_self; pid_t opt_kernel_pid; uid_t opt_anon_owner; +#define NODEV_KEY -1 /* <= 0, so no short option. */ +#define NOEXEC_KEY -2 /* Likewise. */ +#define NOSUID_KEY -3 /* Likewise. */ + static error_t argp_parser (int key, char *arg, struct argp_state *state) { @@ -104,6 +108,18 @@ argp_parser (int key, char *arg, struct argp_state *state) else opt_anon_owner = v; break; + + case NODEV_KEY: + /* Ignored for compatibility with Linux' procfs. */ + ;; + + case NOEXEC_KEY: + /* Ignored for compatibility with Linux' procfs. */ + ;; + + case NOSUID_KEY: + /* Ignored for compatibility with Linux' procfs. */ + ;; } return 0; @@ -136,6 +152,12 @@ struct argp argp = { "Be aware that USER will be granted access to the environment and " "other sensitive information about the processes in question. " "(default: use uid 0)" }, + { "nodev", NODEV_KEY, NULL, 0, + "Ignored for compatibility with Linux' procfs." }, + { "noexec", NOEXEC_KEY, NULL, 0, + "Ignored for compatibility with Linux' procfs." }, + { "nosuid", NOSUID_KEY, NULL, 0, + "Ignored for compatibility with Linux' procfs." }, {} }, .parser = argp_parser, -- cgit v1.2.3