summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-10-06 23:56:19 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-10-06 23:56:19 +0000
commitaea8185191743f35818de0bd15914b9336f1d4eb (patch)
tree104fb74202f24b2c4dd8e194690448925115b8b3
parent91e4c437995950ede57057889f277ad2b357acaf (diff)
Don't allow anyone but root to read /var/log/{daily,weekly,monthly}.out.
Unfortunately this does not fix existing file permissions. Spotted by Antti Harri <iku at openbsd dot fi>. OK millert@.
-rw-r--r--etc/crontab8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/crontab b/etc/crontab
index e4d0e57682b..5c698697ee6 100644
--- a/etc/crontab
+++ b/etc/crontab
@@ -1,4 +1,4 @@
-# $OpenBSD: crontab,v 1.12 2003/03/10 01:05:28 deraadt Exp $
+# $OpenBSD: crontab,v 1.13 2006/10/06 23:56:18 ray Exp $
#
# /var/cron/tabs/root - root's crontab
#
@@ -17,7 +17,7 @@ HOME=/var/log
#1-59 * * * * /usr/bin/newsyslog -m
#
# do daily/weekly/monthly maintenance
-30 1 * * * /bin/sh /etc/daily 2>&1 | tee /var/log/daily.out | mail -s "`/bin/hostname` daily output" root
-30 3 * * 6 /bin/sh /etc/weekly 2>&1 | tee /var/log/weekly.out | mail -s "`/bin/hostname` weekly output" root
-30 5 1 * * /bin/sh /etc/monthly 2>&1 | tee /var/log/monthly.out | mail -s "`/bin/hostname` monthly output" root
+30 1 * * * umask 077; /bin/sh /etc/daily 2>&1 | tee /var/log/daily.out | mail -s "`/bin/hostname` daily output" root
+30 3 * * 6 umask 077; /bin/sh /etc/weekly 2>&1 | tee /var/log/weekly.out | mail -s "`/bin/hostname` weekly output" root
+30 5 1 * * umask 077; /bin/sh /etc/monthly 2>&1 | tee /var/log/monthly.out | mail -s "`/bin/hostname` monthly output" root
#0 * * * * /usr/libexec/spamd-setup