mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
killall and sestatus also need ARGVN scanning
This commit is contained in:
parent
d63cd1bf1c
commit
9f00e05781
@ -1281,7 +1281,13 @@ enum {
|
|||||||
PSSCAN_UTIME = 1 << 13,
|
PSSCAN_UTIME = 1 << 13,
|
||||||
PSSCAN_TTY = 1 << 14,
|
PSSCAN_TTY = 1 << 14,
|
||||||
PSSCAN_SMAPS = (1 << 15) * ENABLE_FEATURE_TOPMEM,
|
PSSCAN_SMAPS = (1 << 15) * ENABLE_FEATURE_TOPMEM,
|
||||||
PSSCAN_ARGVN = (1 << 16) * (ENABLE_PGREP || ENABLE_PKILL || ENABLE_PIDOF),
|
/* NB: used by find_pid_by_name(). Any applet using it
|
||||||
|
* needs to be mentioned here. */
|
||||||
|
PSSCAN_ARGVN = (1 << 16) * (ENABLE_KILLALL
|
||||||
|
|| ENABLE_PGREP || ENABLE_PKILL
|
||||||
|
|| ENABLE_PIDOF
|
||||||
|
|| ENABLE_SESTATUS
|
||||||
|
),
|
||||||
USE_SELINUX(PSSCAN_CONTEXT = 1 << 17,)
|
USE_SELINUX(PSSCAN_CONTEXT = 1 << 17,)
|
||||||
PSSCAN_START_TIME = 1 << 18,
|
PSSCAN_START_TIME = 1 << 18,
|
||||||
PSSCAN_CPU = 1 << 19,
|
PSSCAN_CPU = 1 << 19,
|
||||||
|
@ -67,15 +67,14 @@ static int comm_match(procps_status_t *p, const char *procName)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find_pid_by_name()
|
/* This finds the pid of the specified process.
|
||||||
*
|
|
||||||
* Modified by Vladimir Oleynik for use with libbb/procps.c
|
|
||||||
* This finds the pid of the specified process.
|
|
||||||
* Currently, it's implemented by rummaging through
|
* Currently, it's implemented by rummaging through
|
||||||
* the proc filesystem.
|
* the proc filesystem.
|
||||||
*
|
*
|
||||||
* Returns a list of all matching PIDs
|
* Returns a list of all matching PIDs
|
||||||
* It is the caller's duty to free the returned pidlist.
|
* It is the caller's duty to free the returned pidlist.
|
||||||
|
*
|
||||||
|
* Modified by Vladimir Oleynik for use with libbb/procps.c
|
||||||
*/
|
*/
|
||||||
pid_t* FAST_FUNC find_pid_by_name(const char *procName)
|
pid_t* FAST_FUNC find_pid_by_name(const char *procName)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user