mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-03 12:35:02 +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:
parent
740b91b560
commit
9e280368ad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96813
@ -11,6 +11,8 @@ then
|
|||||||
source_periodic_confs
|
source_periodic_confs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
oldmask=$(umask)
|
||||||
|
umask 066
|
||||||
case "$monthly_accounting_enable" in
|
case "$monthly_accounting_enable" in
|
||||||
[Yy][Ee][Ss])
|
[Yy][Ee][Ss])
|
||||||
W=/var/log/wtmp
|
W=/var/log/wtmp
|
||||||
@ -45,4 +47,5 @@ case "$monthly_accounting_enable" in
|
|||||||
*) rc=0;;
|
*) rc=0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
umask $oldmask
|
||||||
exit $rc
|
exit $rc
|
||||||
|
Loading…
Reference in New Issue
Block a user