diff options
Diffstat (limited to 'etc/periodic/security/300.chkuid0')
-rwxr-xr-x | etc/periodic/security/300.chkuid0 | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/periodic/security/300.chkuid0 b/etc/periodic/security/300.chkuid0 index 32cc16c..73578e2 100755 --- a/etc/periodic/security/300.chkuid0 +++ b/etc/periodic/security/300.chkuid0 @@ -36,16 +36,19 @@ then source_periodic_confs fi -case "$daily_status_security_chkuid0_enable" in - [Yy][Ee][Ss]) +security_daily_compat_var security_status_chkuid0_enable + +rc=0 + +if check_yesno_period security_status_chkuid0_enable +then echo "" echo 'Checking for uids of 0:' n=$(awk -F: '/^#/ {next} $3==0 {print $1,$3}' /etc/master.passwd | tee /dev/stderr | sed -e '/^root 0$/d' -e '/^toor 0$/d' | wc -l) - [ $n -gt 0 ] && rc=1 || rc=0;; - *) rc=0;; -esac + [ $n -gt 0 ] && rc=1 || rc=0 +fi exit "$rc" |