diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-03-25 14:33:27 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2021-04-14 17:19:26 +0200 |
commit | 812cfcb94df0fc0e6f9d33e39078454842d61609 (patch) | |
tree | 2546de17092ff899fcfff1ff3441ad2c14fe9bb6 /linux/Platform.c | |
parent | 74d061700c5a931a02d77da6ecc940c1e1132fe4 (diff) |
Rename drop-capabilities options none to off
None might be ambiguous whether we are dropping none or whether we keep
none.
Rename to off to make more clear this option does not drop any.
Diffstat (limited to 'linux/Platform.c')
-rw-r--r-- | linux/Platform.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/linux/Platform.c b/linux/Platform.c index d5fd45dc..831ea273 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -73,7 +73,7 @@ in the source distribution for its full text. #ifdef HAVE_LIBCAP enum CapMode { - CAP_MODE_NONE, + CAP_MODE_OFF, CAP_MODE_BASIC, CAP_MODE_STRICT }; @@ -855,8 +855,8 @@ void Platform_longOptionsUsage(const char* name) { #ifdef HAVE_LIBCAP printf( -" --drop-capabilities[=none|basic|strict] Drop Linux capabilities when running as root\n" -" none - do not drop any capabilities\n" +" --drop-capabilities[=off|basic|strict] Drop Linux capabilities when running as root\n" +" off - do not drop any capabilities\n" " basic (default) - drop all capabilities not needed by %s\n" " strict - drop all capabilities except those needed for\n" " core functionality\n", name); @@ -882,8 +882,8 @@ bool Platform_getLongOption(int opt, int argc, char** argv) { if (!mode || String_eq(mode, "basic")) { Platform_capabilitiesMode = CAP_MODE_BASIC; - } else if (String_eq(mode, "none")) { - Platform_capabilitiesMode = CAP_MODE_NONE; + } else if (String_eq(mode, "off")) { + Platform_capabilitiesMode = CAP_MODE_OFF; } else if (String_eq(mode, "strict")) { Platform_capabilitiesMode = CAP_MODE_STRICT; } else { @@ -903,7 +903,7 @@ bool Platform_getLongOption(int opt, int argc, char** argv) { #ifdef HAVE_LIBCAP static int dropCapabilities(enum CapMode mode) { - if (mode == CAP_MODE_NONE) + if (mode == CAP_MODE_OFF) return 0; /* capabilities we keep to operate */ |