Home | History | Annotate | Download | only in cron
      1 #!/bin/sh
      2 #*********************************************************************
      3 #   Copyright (c) International Business Machines  Corp., 2000
      4 #
      5 #   This program is free software;  you can redistribute it and/or modify
      6 #   it under the terms of the GNU General Public License as published by
      7 #   the Free Software Foundation; either version 2 of the License, or
      8 #   (at your option) any later version.
      9 #
     10 #   This program is distributed in the hope that it will be useful,
     11 #   but WITHOUT ANY WARRANTY;  without even the implied warranty of
     12 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
     13 #   the GNU General Public License for more details.
     14 #
     15 #   You should have received a copy of the GNU General Public License
     16 #   along with this program;  if not, write to the Free Software
     17 #   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
     18 #
     19 #  FILE   : cron
     20 #
     21 #  PUROPOSE: Ensure that the following directories only have root write access
     22 #			/etc/cron.d
     23 #			/etc/cron.daily
     24 #			/etc/cron.hourly
     25 #			/etc/cron.monthly
     26 #			/etc/cron.weekly
     27 #			/var/spool/cron
     28 #	HISTORY:
     29 #		Jerone Young (jyoung5 (at] us.ibm.com)
     30 #
     31 
     32 DIRS="/etc/cron.d /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly /var/spool/cron"
     33 
     34 EXIT_CODE=0
     35 for i in $DIRS
     36 do
     37 	cron_dirs_check $i
     38 	if [ $? != 0 ]
     39 	then
     40 		echo "$i FAILED TEST!!!!!"
     41 		EXIT_CODE=1
     42 	fi
     43 
     44 done
     45 
     46 exit $EXIT_CODE
     47