Created
April 28, 2019 11:13
-
-
Save EJSohn/aab719aeae9bc0638f0c883a5ec98f0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Superuser processes are usually more important, so we make it | |
* less likely that we kill those. | |
*/ | |
if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_ADMIN) || | |
p->uid == 0 || p->euid == 0) | |
points /= 4; | |
/* | |
* We don't want to kill a process with direct hardware access. | |
* Not only could that mess up the hardware, but usually users | |
* tend to only have this flag set on applications they think | |
* of as important. | |
*/ | |
if (cap_t(p->cap_effective) & CAP_TO_MASK(CAP_SYS_RAWIO)) | |
points /= 4; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment