Fix utmp permissions, Gentoo #240437.
This commit is contained in:
parent
4d74e94c39
commit
5cdc489573
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user