mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
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.
This commit is contained in:
parent
74d061700c
commit
812cfcb94d
@ -64,7 +64,7 @@ requesting a sort order with -s.
|
||||
\fB\-H \-\-highlight-changes=DELAY\fR
|
||||
Highlight new and old processes
|
||||
.TP
|
||||
\fB \-\-drop-capabilities[=none|basic|strict]\fR
|
||||
\fB \-\-drop-capabilities[=off|basic|strict]\fR
|
||||
Linux only; requires libcap support.
|
||||
.br
|
||||
Drop unneeded Linux capabilities.
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user