From owner-freebsd-audit Sun Aug 19 12:28:33 2001 Delivered-To: freebsd-audit@freebsd.org Received: from coffee.q9media.com (coffee.q9media.com [216.94.229.19]) by hub.freebsd.org (Postfix) with ESMTP id 2FAA637B414 for ; Sun, 19 Aug 2001 12:28:30 -0700 (PDT) (envelope-from mike@coffee.q9media.com) Received: (from mike@localhost) by coffee.q9media.com (8.11.2/8.11.3) id f7JJoY349234; Sun, 19 Aug 2001 15:50:34 -0400 (EDT) (envelope-from mike) Date: Sun, 19 Aug 2001 15:50:34 -0400 From: Mike Barcroft To: Kris Kennaway Cc: audit@FreeBSD.org Subject: Re: at(1) signal handler fix Message-ID: <20010819155034.C49129@coffee.q9media.com> Mail-Followup-To: Mike Barcroft , Kris Kennaway , audit@FreeBSD.org References: <20010818235833.A36306@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010818235833.A36306@xor.obsecurity.org>; from kris@obsecurity.org on Sat, Aug 18, 2001 at 11:58:33PM -0700 Organization: The FreeBSD Project Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Kris Kennaway writes: > This patch is adapted from OpenBSD..please review. > > Kris > > Index: at.c > =================================================================== > RCS file: /mnt/ncvs/src/usr.bin/at/at.c,v > retrieving revision 1.19 > diff -u -r1.19 at.c > --- at.c 2001/07/24 14:15:51 1.19 > +++ at.c 2001/08/19 06:58:02 [...] > static void alarmc(int signo) > { > -/* Time out after some seconds > - */ > - panic("file locking timed out"); > + char buf[1024]; > + > + /* Time out after some seconds. */ > + strlcpy(buf, namep, sizeof(buf)); > + strlcat(buf, ": file locking timed out\n", sizeof(buf)); > + write(STDERR_FILENO, buf, strlen(buf)); > + if (fcreated) { > + PRIV_START > + unlink(atfile); > + PRIV_END > + } > + _exit(EXIT_FAILURE); > } [...] Why not just call sigc() after write(2)? The other changes look okay. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message