aboutsummaryrefslogtreecommitdiff
path: root/etc/periodic/monthly
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2002-05-17 14:05:08 +0000
committerBrian Somers <brian@FreeBSD.org>2002-05-17 14:05:08 +0000
commit9e280368ada934d897be03c816c5bb2bef1f05e8 (patch)
treed8eb437497a62dda683f2cf5c6d81ed5a108ef40 /etc/periodic/monthly
parent740b91b560951c8eee62ffbdd1d327b1d918dbc9 (diff)
downloadsrc-9e280368ada934d897be03c816c5bb2bef1f05e8.tar.gz
src-9e280368ada934d897be03c816c5bb2bef1f05e8.zip
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
Notes
Notes: svn path=/head/; revision=96813
Diffstat (limited to 'etc/periodic/monthly')
-rwxr-xr-xetc/periodic/monthly/200.accounting3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/periodic/monthly/200.accounting b/etc/periodic/monthly/200.accounting
index 2142193978f0..10a65d10ed5b 100755
--- a/etc/periodic/monthly/200.accounting
+++ b/etc/periodic/monthly/200.accounting
@@ -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