1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-01 12:19:28 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96813

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