From owner-freebsd-audit Thu Feb 15 16:56:38 2001 Delivered-To: freebsd-audit@freebsd.org Received: from icicle.winternet.com (icicle.winternet.com [198.174.169.13]) by hub.freebsd.org (Postfix) with ESMTP id 222A437B491 for ; Thu, 15 Feb 2001 16:56:32 -0800 (PST) Received: from tundra.winternet.com (nrahlstr@tundra.winternet.com [198.174.169.11]) by icicle.winternet.com (8.9.3/8.9.3mc) with ESMTP id SAA19464; Thu, 15 Feb 2001 18:56:30 -0600 (CST) SMTP "HELO" (ESMTP) greeting from tundra.winternet.com But _really_ from :: nrahlstr@tundra.winternet.com [198.174.169.11] SMTP "MAIL From" = nrahlstr@mail.winternet.com (Nathan Ahlstrom) SMTP "RCPT To" = Received: (from nrahlstr@localhost) by tundra.winternet.com (8.8.7/8.8.4) id SAA28689; Thu, 15 Feb 2001 18:56:30 -0600 (CST) Date: Thu, 15 Feb 2001 18:56:29 -0600 From: Nathan Ahlstrom To: Mike Heffner Cc: FreeBSD-audit Subject: Re: mail(1) cleanup patch Message-ID: <20010215185629.A28636@winternet.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: ; from mheffner@vt.edu on Thu, Feb 15, 2001 at 07:27:20PM -0500 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi Mike, I created a similar patch several months ago. It is not as complete as your patch, but it does clean up some of those style bugs you mention below and was an attempt at BDEFLAGS (IIRC -- it's been awhile). http://people.freebsd.org/~nra/ I have a couple of questions about your patches for mail. - Why have an upcase() call? Why not just call toupper(3) directly? - I am a bit scared of the code in istrncpy, why not make a call to strncpy/strlcpy and another call to tolower() ? Thanks for the good work. Nathan Mike Heffner wrote: > The following patch to mail(1) is a combination of changes taken from OpenBSD > and NetBSD, as well as a few of my one. The patch addresses the following: > > - remove panic() in favor of err(3) and use err(3) functions > consistently throughout > - use stat(2)'s S_IS* macros rather than S_IF* > - [r]index -> str[r]chr > - convert some static buffers to dynamic ones > - use real tempfiles rather than reopening the same templates > - rename some functions that clash with libc > - convert wait_status from union to int and use wait(2) > status macros > - fix multiple potential buffer overflows > > as well as some misc. cleanups. I'd also like to eventually do a style(9) > cleanup patch (NOSTR -> NULL, kill register, whitespace fixes, ...) so that > diffs are somewhat closer with the other BSDs. > > (also at http://filebox.vt.edu/users/mheffner/patches/mail.patch) [patch trimmed] -- Nathan Ahlstrom / nrahlstr@winternet.com / nra@FreeBSD.org / PGP: 0x67BC9D19 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message