Temporarily change our umask to 066 so that the potential creation

of wtmp.0 is done as mode 600.

This ensures that tight permissions set in /etc/newsyslog.conf for
wtmp logging aren't ``betrayed''.

Suggested by:	lumpy <lumpy@the.whole.net>
MFC after:	3 days
This commit is contained in:
Brian Somers 2002-05-17 14:05:08 +00:00
parent 740b91b560
commit 9e280368ad

View File

@ -11,6 +11,8 @@ then
source_periodic_confs
fi
oldmask=$(umask)
umask 066
case "$monthly_accounting_enable" in
[Yy][Ee][Ss])
W=/var/log/wtmp
@ -45,4 +47,5 @@ case "$monthly_accounting_enable" in
*) rc=0;;
esac
umask $oldmask
exit $rc