From owner-freebsd-current Fri Feb 7 2:43:17 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0724037B401; Fri, 7 Feb 2003 02:43:15 -0800 (PST) Received: from daemon.kr.FreeBSD.org (daemon.kr.freebsd.org [211.176.62.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14D2243F3F; Fri, 7 Feb 2003 02:43:14 -0800 (PST) (envelope-from cjh@kr.FreeBSD.org) Received: from gradius.wdb.co.kr (daemon [211.176.62.31]) by daemon.kr.FreeBSD.org (Postfix) with ESMTP id B58C88F646; Fri, 7 Feb 2003 19:43:08 +0900 (KST) Received: from localhost (localhost [127.0.0.1]) by gradius.wdb.co.kr (8.12.6/8.12.6) with ESMTP id h17Ah5ua004037; Fri, 7 Feb 2003 19:43:05 +0900 (KST) (envelope-from cjh@kr.FreeBSD.org) Date: Fri, 07 Feb 2003 19:43:04 +0900 (KST) Message-Id: <20030207.194304.39156547.cjh@kr.FreeBSD.org> To: thomas@FreeBSD.ORG Cc: tjr@FreeBSD.ORG, current@FreeBSD.ORG, roberto@FreeBSD.ORG Subject: Re: 5.0 cron problem From: CHOI Junho In-Reply-To: <20030207103742.GA61102@melusine.cuivre.fr.eu.org> References: <20030205.175730.55903839.cjh@kr.FreeBSD.org> <20030205204250.A12276@dilbert.robbins.dropbear.id.au> <20030207103742.GA61102@melusine.cuivre.fr.eu.org> Organization: Korea FreeBSD Users Group X-URL: http://www.kr.FreeBSD.org/~cjh X-Mailer: Mew version 3.1.51 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I tried it to 5.0-RELEASE. It works with my previous crontab file. From: Thomas Quinot Subject: Re: 5.0 cron problem Date: Fri, 7 Feb 2003 11:37:42 +0100 > Right, the according to the man page inner whitespace in the unquoted > right-hand part of an environment variable assignment should be preserved. > Please try the following patch: > > Index: lib/env.c > =================================================================== > RCS file: /home/ncvs/src/usr.sbin/cron/lib/env.c,v > retrieving revision 1.11 > diff -u -r1.11 env.c > --- lib/env.c 23 May 2002 13:16:30 -0000 1.11 > +++ lib/env.c 7 Feb 2003 10:34:48 -0000 > @@ -193,14 +193,16 @@ > break; > } > } else { > - if (isspace (*c)) { > - state++; > - c++; > - break; > - } > - if (state == NAME && *c == '=') { > - state++; > - break; > + if (state == NAME) { > + if (isspace (*c)) { > + c++; > + state++; > + break; > + } > + if (*c == '=') { > + state++; > + break; > + } > } > } > *str++ = *c++; > @@ -232,9 +234,14 @@ > Set_LineNum(fileline); > return (FALSE); > } > + if (state == VALUE) { > + /* End of unquoted value: trim trailing whitespace */ > + c = val + strlen (val); > + while (c > val && isspace (*(c - 1))) > + *(--c) = '\0'; > + } > > - /* 2 fields from parser; looks like an env setting > - */ > + /* 2 fields from parser; looks like an env setting */ > > if (strlen(name) + 1 + strlen(val) >= MAX_ENVSTR-1) > return (FALSE); > > -- > Thomas.Quinot@Cuivre.FR.EU.ORG -- CHOI Junho KFUG FreeBSD Project Web Data Bank Key fingerprint = 1369 7374 A45F F41A F3C0 07E3 4A01 C020 E602 60F5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message