From owner-svn-src-head@FreeBSD.ORG Mon Sep 29 21:51:49 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E01A4DA7; Mon, 29 Sep 2014 21:51:49 +0000 (UTC) Received: from mail-wg0-x22c.google.com (mail-wg0-x22c.google.com [IPv6:2a00:1450:400c:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D491C80; Mon, 29 Sep 2014 21:51:48 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id y10so1793820wgg.3 for ; Mon, 29 Sep 2014 14:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=4fUVDWlUlxLfA1kBRuDZ7MiKylzbbCF3k8nN7cLODww=; b=q13agHdjgDnPtI1vIA18Q7iqUgq3r5oTrs6pW1sOxNc2JWjNaCkUbWXeoz7Tmnjyvx wlpAD6FlcajaKm9V6IMl3WRVNJG3p8HIimYihkQYprQzhJApg0TgQcysW4fL+1Bk0maX 0eow3PGf/LF/2evCQe1v7Ihplgy7/qIfpvyzQ+m1T/V8/vnHfvkfkSNBuJhfairm29xl UXxQStW9VDbBK4wfRGtiGazpMQlDiPzORWSCpdCSJUeONi5qC6zYm/LDrDC/Qy81wQ6B nAG5NaPk2Ii8qPXzkZ3P3spJmt+vjps87/cokwher5OysJAa62SGm5o35rJV5z27NZJQ gAZA== X-Received: by 10.194.187.241 with SMTP id fv17mr48588923wjc.13.1412027507170; Mon, 29 Sep 2014 14:51:47 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id fv1sm17040929wjb.35.2014.09.29.14.51.46 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 29 Sep 2014 14:51:46 -0700 (PDT) Date: Mon, 29 Sep 2014 23:51:44 +0200 From: Mateusz Guzik To: Xin LI Subject: Re: svn commit: r272288 - head/usr.bin/at Message-ID: <20140929215143.GA17622@dft-labs.eu> References: <201409292145.s8TLjvr5059566@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201409292145.s8TLjvr5059566@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Sep 2014 21:51:50 -0000 On Mon, Sep 29, 2014 at 09:45:57PM +0000, Xin LI wrote: > Author: delphij > Date: Mon Sep 29 21:45:57 2014 > New Revision: 272288 > URL: http://svnweb.freebsd.org/changeset/base/272288 > > Log: > When setting environment variables in the atrun script, use the > "export foo=bar" form instead of "foo=bar; export foo" since the > former allows the shell to catch variable names that are not valid > shell identifiers. This will cause /bin/sh to exit with an error > (which gets mailed to the at user) and it will not run the script. > > Obtained from: OpenBSD (r1.63 millert) > MFC after: 3 days > > Modified: > head/usr.bin/at/at.c > > Modified: head/usr.bin/at/at.c > ============================================================================== > --- head/usr.bin/at/at.c Mon Sep 29 19:54:17 2014 (r272287) > +++ head/usr.bin/at/at.c Mon Sep 29 21:45:57 2014 (r272288) > @@ -367,6 +367,7 @@ writefile(time_t runtimer, char queue) > > if (export) > { > + (void)fputs("export ", fp); > fwrite(*atenv, sizeof(char), eqp-*atenv, fp); > for(ap = eqp;*ap != '\0'; ap++) > { > @@ -389,7 +390,6 @@ writefile(time_t runtimer, char queue) > fputc(*ap, fp); > } > } > - fputs("; export ", fp); > fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp); Should not this line also be removed? > fputc('\n', fp); > > -- Mateusz Guzik