mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 00:31:16 +00:00
ps selinux logic correction, but do not tested too
This commit is contained in:
parent
be0ed3d0b9
commit
9c44dce304
@ -33,6 +33,7 @@ extern int ps_main(int argc, char **argv)
|
|||||||
#if ENABLE_FEATURE_PS_WIDE
|
#if ENABLE_FEATURE_PS_WIDE
|
||||||
int terminal_width;
|
int terminal_width;
|
||||||
int w_count = 0;
|
int w_count = 0;
|
||||||
|
bb_opt_complementally="ww";
|
||||||
#else
|
#else
|
||||||
# define terminal_width 80
|
# define terminal_width 80
|
||||||
#endif
|
#endif
|
||||||
@ -40,12 +41,10 @@ extern int ps_main(int argc, char **argv)
|
|||||||
#if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX
|
#if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX
|
||||||
/* handle arguments */
|
/* handle arguments */
|
||||||
#if ENABLE_FEATURE_PS_WIDE && ENABLE_SELINUX
|
#if ENABLE_FEATURE_PS_WIDE && ENABLE_SELINUX
|
||||||
bb_opt_complementally="ww";
|
|
||||||
i = bb_getopt_ulflags(argc, argv, "wc", &w_count);
|
i = bb_getopt_ulflags(argc, argv, "wc", &w_count);
|
||||||
#elif ENABLE_FEATURE_PS_WIDE && !ENABLE_SELINUX
|
#elif ENABLE_FEATURE_PS_WIDE && !ENABLE_SELINUX
|
||||||
bb_opt_complementally="ww";
|
|
||||||
i = bb_getopt_ulflags(argc, argv, "w", &w_count);
|
i = bb_getopt_ulflags(argc, argv, "w", &w_count);
|
||||||
#else /* !ENABLE_FEATURE_PS_WIDE && !ENABLE_SELINUX */
|
#else /* !ENABLE_FEATURE_PS_WIDE && ENABLE_SELINUX */
|
||||||
i = bb_getopt_ulflags(argc, argv, "c");
|
i = bb_getopt_ulflags(argc, argv, "c");
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_FEATURE_PS_WIDE
|
#if ENABLE_FEATURE_PS_WIDE
|
||||||
@ -61,7 +60,7 @@ extern int ps_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_SELINUX
|
#if ENABLE_SELINUX
|
||||||
if ((i & 2) && is_selinux_enabled())
|
if ((i & (1+ENABLE_FEATURE_PS_WIDE)) && is_selinux_enabled())
|
||||||
use_selinux = 1;
|
use_selinux = 1;
|
||||||
#endif
|
#endif
|
||||||
#endif /* ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX */
|
#endif /* ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX */
|
||||||
|
Loading…
Reference in New Issue
Block a user