diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2021-07-13 19:32:45 -0700 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2021-07-13 19:32:45 -0700 |
commit | fdd53759d859dd44dccff846b9f1d137dcc25cd3 (patch) | |
tree | c54c4be0c14ca4ddb54200b44e60092d5f95d40b | |
parent | c523294a0c4ee3193bbb490c858ece396e627e86 (diff) | |
download | libcap-fdd53759d859dd44dccff846b9f1d137dcc25cd3.tar.gz |
Allow for systems with no /proc/self/cmdline file.
If /proc/ isn't mounted, the command line won't be available there.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r-- | libcap/execable.h | 2 | ||||
-rw-r--r-- | pam_cap/execable.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libcap/execable.h b/libcap/execable.h index 391245d..65bacd8 100644 --- a/libcap/execable.h +++ b/libcap/execable.h @@ -70,7 +70,7 @@ static void __execable_parse_args(int *argc_p, char ***argv_p) * function. */ -#define SO_MAIN \ +#define SO_MAIN \ static void __execable_main(int, char**); \ extern void __so_start(void); \ void __so_start(void) \ diff --git a/pam_cap/execable.c b/pam_cap/execable.c index 60cf667..0bf42d3 100644 --- a/pam_cap/execable.c +++ b/pam_cap/execable.c @@ -32,7 +32,7 @@ SO_MAIN(int argc, char **argv) "can be found at:\n" "\n" " https://sites.google.com/site/fullycapable/\n", cmd); - if (argc == 1) { + if (argc <= 1) { return; } |