Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Feb 2001 18:56:29 -0600
From:      Nathan Ahlstrom <nrahlstr@winternet.com>
To:        Mike Heffner <mheffner@vt.edu>
Cc:        FreeBSD-audit <FreeBSD-audit@FreeBSD.ORG>
Subject:   Re: mail(1) cleanup patch
Message-ID:  <20010215185629.A28636@winternet.com>
In-Reply-To: <XFMail.20010215192720.mheffner@vt.edu>; from mheffner@vt.edu on Thu, Feb 15, 2001 at 07:27:20PM -0500
References:  <XFMail.20010215192720.mheffner@vt.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
 
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 <mheffner@vt.edu> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010215185629.A28636>