From owner-cvs-all Mon Nov 26 20: 0:52 2001 Delivered-To: cvs-all@freebsd.org Received: from horsey.gshapiro.net (horsey.gshapiro.net [209.220.147.178]) by hub.freebsd.org (Postfix) with ESMTP id 4247837B405; Mon, 26 Nov 2001 20:00:41 -0800 (PST) Received: from horsey.gshapiro.net (gshapiro@localhost [IPv6:::1]) by horsey.gshapiro.net (8.12.2.Beta1/8.12.2.Beta1) with ESMTP id fAR40egv041648 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 26 Nov 2001 20:00:40 -0800 (PST) Received: (from gshapiro@localhost) by horsey.gshapiro.net (8.12.2.Beta1/8.12.2.Beta1/Submit) id fAR40eZs041645; Mon, 26 Nov 2001 20:00:40 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15363.4072.353022.489319@horsey.gshapiro.net> Date: Mon, 26 Nov 2001 20:00:40 -0800 From: Gregory Neil Shapiro To: Mike Silbersack Cc: , Subject: Re: cvs commit: src/etc security In-Reply-To: <20011126213416.J31506-100000@achilles.silby.com> References: <15362.63897.444387.12844@horsey.gshapiro.net> <20011126213416.J31506-100000@achilles.silby.com> X-Mailer: VM 6.96 under 21.5 (beta3) "asparagus" XEmacs Lucid Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG silby> Heh, that seems to set $who to "OPTARG". Closer, but not quite silby> there yet. :) Missed a $. I'll try it when I get home from work, but here is another attempt (lightly tested this time): --- 450.status-security~orig Mon Nov 26 18:20:40 2001 +++ 450.status-security Mon Nov 26 18:21:36 2001 @@ -36,6 +36,7 @@ >$daily_status_security_output 2>&1;; *) echo " (output mailed separately)" + args="-t $daily_status_security_output $args" sh /etc/security $args 2>&1 | sendmail $daily_status_security_output;; esac;; --- security~orig Mon Nov 26 18:20:45 2001 +++ security Mon Nov 26 18:23:53 2001 @@ -47,18 +47,19 @@ } sflag=FALSE ignore= -while getopts as c +while getopts ast: c do case "$c" in a) ignore="$ignore|^amd:";; s) sflag=TRUE;; + t) who=$OPTARG ;; esac done yesterday=`date -v-1d "+%b %e "` host=`hostname` -[ $sflag = FALSE ] && echo "To: root@${host}" +[ "$who" != "" ] && echo "To: ${who}" [ $sflag = FALSE ] && echo "Subject: ${host} security check output" umask 027 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message