From owner-freebsd-audit Fri Mar 22 19:41:56 2002 Delivered-To: freebsd-audit@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 47BF137B419; Fri, 22 Mar 2002 19:41:50 -0800 (PST) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g2N3Ztg68192; Fri, 22 Mar 2002 22:35:55 -0500 (EST) (envelope-from mike) Date: Fri, 22 Mar 2002 22:35:55 -0500 From: Mike Barcroft To: markm@freebsd.org Cc: audit@freebsd.org Subject: Re: chpass WARNS/lint fixes Message-ID: <20020322223555.I80338@espresso.q9media.com> References: <200203230056.g2N0uV1D047229@grimreaper.grondar.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200203230056.g2N0uV1D047229@grimreaper.grondar.org>; from markm@freebsd.org on Sat, Mar 23, 2002 at 12:56:31AM +0000 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 markm@freebsd.org writes: > Index: chpass.c > =================================================================== > RCS file: /home/ncvs/src/usr.bin/chpass/chpass.c,v > retrieving revision 1.20 > diff -u -d -r1.20 chpass.c > --- chpass.c 22 Mar 2002 01:19:26 -0000 1.20 > +++ chpass.c 23 Mar 2002 00:45:13 -0000 > @@ -39,10 +39,11 @@ > > #ifndef lint > static const char sccsid[] = "From: @(#)chpass.c 8.4 (Berkeley) 4/2/94"; > -static const char rcsid[] = > - "$FreeBSD: src/usr.bin/chpass/chpass.c,v 1.20 2002/03/22 01:19:26 imp Exp $"; > #endif /* not lint */ The vendor ID should be restored from Rev 1.1 and then wrapped in #if 0 ... #endif. > +++ edit.c 23 Mar 2002 00:45:42 -0000 [...] > @@ -260,7 +261,7 @@ > pw->pw_name, pw->pw_passwd, (unsigned long)pw->pw_uid, > (unsigned long)pw->pw_gid, pw->pw_class, (long)pw->pw_change, > (long)pw->pw_expire, pw->pw_gecos, pw->pw_dir, > - pw->pw_shell) >= sizeof(buf)) { > + pw->pw_shell) >= (int)sizeof(buf)) { I don't like the idea of casting this down, but it won't make a difference in this case unless LINE_MAX becomes much larger. > Index: pw_yp.c > =================================================================== > RCS file: /home/ncvs/src/usr.bin/chpass/pw_yp.c,v > retrieving revision 1.19 > diff -u -d -r1.19 pw_yp.c > --- pw_yp.c 6 Feb 2002 15:26:04 -0000 1.19 > +++ pw_yp.c 23 Mar 2002 00:46:33 -0000 > @@ -34,35 +34,37 @@ > * Written by Bill Paul > * Center for Telecommunications Research > * Columbia University, New York City > - * > - * $FreeBSD: src/usr.bin/chpass/pw_yp.c,v 1.19 2002/02/06 15:26:04 des Exp $ > */ > > +#include > +__FBSDID("$FreeBSD$"); > + > #ifdef YP > -#include > -#include > -#include > -#include > -#include > -#include > +#include > #include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > #include > -#include > -#include > +#include New line needed. > #include > #include > -struct dom_binding {}; > #include > #include New line needed. > +#include > +#include > +#include > +#include > +#include > +#include > #include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +struct dom_binding {}; > + This seems bogus; what is it used for? > #include "pw_yp.h" > #include "ypxfr_extern.h" > #include "yppasswd_private.h" The rest looks okay. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message