Date: Tue, 27 Nov 2001 22:20:54 EET From: Maxim Sobolev <sobomax@FreeBSD.org> To: silby@silby.com, des@ofug.org Cc: brian@freebsd-services.com, rwatson@FreeBSD.org, gshapiro@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc security Message-ID: <200111272021.WAA02046@ipcard.iptcom.net> In-Reply-To: <20011127115346.R39566-100000@achilles.silby.com>
index | next in thread | previous in thread | raw e-mail
On Tue, 27 Nov 2001 11:55:53 -0600 (CST), Mike Silbersack wrote:
>
> On 27 Nov 2001, Dag-Erling Smorgrav wrote:
>
> > Mike Silbersack <silby@silby.com> writes:
> > > + mail -s '$host security check output' $daily_status_security_output;;
> >
> > Variables aren't expanded inside single-quoted strings. Use double
> > quotes.
> >
> > DES
> > --
> > Dag-Erling Smorgrav - des@ofug.org
>
> Yep, that does the trick. At this rate, I may eventually learn shell
> scripting. :)
>
> Here's the revised patch, I'll go ahead and commit it in a few hours
> unless there are further problems found.
>
> Mike "Silby" Silbersack
>
> --- /usr/src/etc/security Tue Nov 27 11:08:21 2001
> +++ /etc/security Tue Nov 27 11:13:35 2001
> @@ -58,8 +58,6 @@
> yesterday=`date -v-1d "+%b %e "`
>
> host=`hostname`
> -[ $sflag = FALSE ] && echo "To: root@${host}"
> -[ $sflag = FALSE ] && echo "Subject: ${host} security check output"
>
> umask 027
>
> --- /usr/src/etc/periodic/daily/450.status-security Wed Jun 6 14:24:44 2001
> +++ /etc/periodic/daily/450.status-security Tue Nov 27 11:55:00 2001
> @@ -36,8 +36,10 @@
> >$daily_status_security_output 2>&1;;
> *)
> echo " (output mailed separately)"
> + host=`hostname`
> + export host
What purpose this "export" serves?
> sh /etc/security $args 2>&1 |
> - sendmail $daily_status_security_output;;
> + mail -s "$host security check output" $daily_status_security_output;;
Why not:
+ mail -s "`hostname` security check output"
?
-Maxim
> esac;;
> esac;;
>
>
>
>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111272021.WAA02046>
