#!/bin/sh
#
#     tiger - A UN*X security checking system
#     Copyright (C) 1993 Douglas Lee Schales, David K. Hess, David R. Safford
#
#     Please see the file `COPYING' for the complete copyright notice.
#
# NeXT/3/check_cron - 06/14/93
#
#-----------------------------------------------------------------------------
#
user=$1

cronfiles=
[ -f /private/etc/crontab ] &&
  cronfiles="$cronfiles /private/etc/crontab"
[ -f /private/etc/crontab.local ] &&
  cronfiles="$cronfiles /private/etc/crontab.local"

if [ -n "$cronfiles" ]; then
  $AWK '
    $6 == "'$user'" {print "YES"}
  ' $cronfiles |
  {
    read status

    [ "$status" != 'YES' ] && status='NO'

    echo $status
  }
else
  echo 'NO'
fi


