summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-01-30 10:24:18 +0000
committerbrian <brian@FreeBSD.org>2001-01-30 10:24:18 +0000
commit9233b23065666a1692fd4310c5792a4abbafd1b2 (patch)
tree8371b8f0418c051e8f678315f0858dc155b7c1a0 /etc
parenta3eebfdb498127601f3c0d93833e2917107d993b (diff)
downloadFreeBSD-src-9233b23065666a1692fd4310c5792a4abbafd1b2.zip
FreeBSD-src-9233b23065666a1692fd4310c5792a4abbafd1b2.tar.gz
Allow the output of /etc/security to be logged or mailed to different
users in line with ${daily,weekly,monthly}_output using a new $daily_status_security_output variable. PR: 24643
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/periodic.conf1
-rwxr-xr-xetc/periodic/daily/450.status-security17
2 files changed, 13 insertions, 5 deletions
diff --git a/etc/defaults/periodic.conf b/etc/defaults/periodic.conf
index c50d28a..f72b146 100644
--- a/etc/defaults/periodic.conf
+++ b/etc/defaults/periodic.conf
@@ -110,6 +110,7 @@ daily_status_mailq_shorten="NO" # Shorten output
# 450.status-security
daily_status_security_enable="YES" # Security check
daily_status_security_inline="NO" # Run inline ?
+daily_status_security_output="root" # user or /file
daily_status_security_noamd="NO" # Don't check amd mounts
daily_status_security_nomfs="NO" # Don't check mfs mounts
diff --git a/etc/periodic/daily/450.status-security b/etc/periodic/daily/450.status-security
index 61fcf8b..4953fbb 100755
--- a/etc/periodic/daily/450.status-security
+++ b/etc/periodic/daily/450.status-security
@@ -30,13 +30,20 @@ case "$daily_status_security_enable" in
case "$daily_status_security_inline" in
[Yy][Ee][Ss])
- sh /etc/security -s $args
- rc=$?;;
+ sh /etc/security -s $args
+ rc=$?;;
*)
- echo " (output mailed separately)"
- sh /etc/security $args 2>&1 |
- sendmail root && rc=0 || rc=3;;
+ case "${daily_status_security_output:=root}" in
+ /*)
+ echo " (output logged separately)"
+ sh /etc/security -s $args \
+ >$daily_status_security_output 2>&1;;
+ *)
+ echo " (output mailed separately)"
+ sh /etc/security $args 2>&1 |
+ sendmail $daily_status_security_output;;
+ esac;;
esac;;
*) rc=0;;
OpenPOWER on IntegriCloud