summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2015-10-09 17:09:10 -0700
committerNick Kralevich <nnk@google.com>2015-10-09 17:09:10 -0700
commitd28a535d9aa5a30deb682cd02b18c9bbd772c44f (patch)
tree1428fcaeddab37b0cf12be5e96429a95873fcc59 /rootdir
parenta3ae129f220402a00ed241a4c6bc81fbd4d20a5f (diff)
downloadcore-d28a535d9aa5a30deb682cd02b18c9bbd772c44f.tar.gz
core-d28a535d9aa5a30deb682cd02b18c9bbd772c44f.tar.bz2
core-d28a535d9aa5a30deb682cd02b18c9bbd772c44f.zip
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
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/init.rc3
1 files changed, 3 insertions, 0 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index bd4d1560d..38c686df7 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -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