bootmisc: Add /var/log/btmp 0600 support

The file /var/log/btmp holds bad login attempts and must be created with
0600 perms.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-08-08 00:05:34 +02:00
parent a016359891
commit 27899feea0
+3
View File
@@ -70,6 +70,9 @@ static void setup(void *UNUSED(arg))
touch("/var/log/wtmp");
chmod("/var/log/wtmp", 0664);
chown("/var/log/wtmp", 0, getgroup("utmp"));
touch("/var/log/btmp");
chmod("/var/log/btmp", 0600);
chown("/var/log/btmp", 0, getgroup("utmp"));
touch("/var/log/lastlog");
chmod("/var/log/lastlog", 0664);
chown("/var/log/lastlog", 0, getgroup("utmp"));