init.rc: Disable sysrq from the keyboard

Don't allow the accidental triggering of sysrq functionality
from the keyboard. The only expected use of sysrq functionality
is via /proc/sysrq-trigger

Please see https://www.kernel.org/doc/Documentation/sysrq.txt for
additional information on /proc/sys/kernel/sysrq

Bug: 13435961
Change-Id: I60dc92a4b2b4706e8fa34a6cead9abd449f7375f
This commit is contained in:
Nick Kralevich 2015-10-09 17:09:10 -07:00
parent a3ae129f22
commit d28a535d9a
1 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,9 @@ on early-init
# Set init and its forked children's oom_adj.
write /proc/1/oom_score_adj -1000
# Disable sysrq from keyboard
write /proc/sys/kernel/sysrq 0
# Set the security context of /adb_keys if present.
restorecon /adb_keys