From 1ea8901a50ddeaaddf4ab069e3e34dd3d996c385 Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Tue, 10 Mar 2015 15:44:05 +0100 Subject: Restrict access to /var/log/dmesg.log --- 1 | 5 +++++ 1 file changed, 5 insertions(+) (limited to '1') diff --git a/1 b/1 index bba2dd3..9e9f413 100755 --- a/1 +++ b/1 @@ -16,6 +16,11 @@ for f in /etc/runit/core-services/*.sh; do done dmesg >/var/log/dmesg.log +if [ $(sysctl -n kernel.dmesg_restrict 2>/dev/null) -eq 1 ]; then + chmod 0600 /var/log/dmesg.log +else + chmod 0644 /var/log/dmesg.log +fi mkdir -p /run/runit install -m100 /dev/null /run/runit/stopit -- cgit 1.4.1