proc: make oom adjustment files user read-only
Make oom_adj and oom_score_adj user read-only. Bug: 19636629 Change-Id: I055bb172d5b4d3d856e25918f3c5de8edf31e4a3 Signed-off-by: Rom Lemarchand <romlem@google.com>
This commit is contained in:
parent
9d19f72b43
commit
55541f1ac3
1 changed files with 5 additions and 4 deletions
|
@ -2793,8 +2793,9 @@ static const struct pid_entry tgid_base_stuff[] = {
|
|||
ONE("cgroup", S_IRUGO, proc_cgroup_show),
|
||||
#endif
|
||||
ONE("oom_score", S_IRUGO, proc_oom_score),
|
||||
REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations),
|
||||
REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
|
||||
INF("oom_score", S_IRUGO, proc_oom_score),
|
||||
REG("oom_adj", S_IRUSR, proc_oom_adj_operations),
|
||||
REG("oom_score_adj", S_IRUSR, proc_oom_score_adj_operations),
|
||||
#ifdef CONFIG_AUDITSYSCALL
|
||||
REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
|
||||
REG("sessionid", S_IRUGO, proc_sessionid_operations),
|
||||
|
@ -3141,8 +3142,8 @@ static const struct pid_entry tid_base_stuff[] = {
|
|||
ONE("cgroup", S_IRUGO, proc_cgroup_show),
|
||||
#endif
|
||||
ONE("oom_score", S_IRUGO, proc_oom_score),
|
||||
REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations),
|
||||
REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations),
|
||||
REG("oom_adj", S_IRUSR, proc_oom_adj_operations),
|
||||
REG("oom_score_adj", S_IRUSR, proc_oom_score_adj_operations),
|
||||
#ifdef CONFIG_AUDITSYSCALL
|
||||
REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations),
|
||||
REG("sessionid", S_IRUGO, proc_sessionid_operations),
|
||||
|
|
Loading…
Add table
Reference in a new issue