Fix utmp permissions, Gentoo #240437.

This commit is contained in:
Roy Marples 2008-10-08 13:58:17 +00:00
parent 4d74e94c39
commit 5cdc489573

View File

@ -77,10 +77,13 @@ start()
if dir_writeable /var/run; then if dir_writeable /var/run; then
ebegin "Creating user login records" ebegin "Creating user login records"
cp /dev/null /var/run/utmp cp /dev/null /var/run/utmp
chgrp utmp /var/run/utmp
chmod 0664 /var/run/utmp
if dir_writeable /var/log; then if dir_writeable /var/log; then
logw=true logw=true
[ -e /var/log/wtmp ] || cp /dev/null /var/log/wtmp [ -e /var/log/wtmp ] || cp /dev/null /var/log/wtmp
chmod 0644 /var/run/utmp /var/log/wtmp chgrp utmp /var/log/wtmp
chmod 0664 /var/log/wtmp
fi fi
eend 0 eend 0