Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Aug 2005 07:23:13 -0500
From:      Bob Willcox <bob@immure.com>
To:        Ollivier Robert <roberto@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/usr.sbin/chkgrp chkgrp.8 chkgrp.c
Message-ID:  <20050804122313.GA87318@luke.immure.com>
In-Reply-To: <200505261057.j4QAv4oU071149@repoman.freebsd.org>
References:  <200505261057.j4QAv4oU071149@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 26, 2005 at 10:57:04AM +0000, Ollivier Robert wrote:
> roberto     2005-05-26 10:57:04 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     usr.sbin/chkgrp      chkgrp.8 chkgrp.c 
>   Log:
>   - Add further functionality to check for invalid characters
>   - Remove keyword 'continue' for more indepth error reporting
>     on each line
>   - WARNS 6 Clean
>   
>   Submitted by:   Liam J. Foy <liamfoy@dragonflybsd.org>
>   MFC after:          1 week
>   
>   Revision  Changes    Path
>   1.15      +6 -5      src/usr.sbin/chkgrp/chkgrp.8
>   1.9       +24 -6     src/usr.sbin/chkgrp/chkgrp.c

This change causes NIS /etc/group entries (+ in column one) to be
flagged in error. There is a PR (bin/82325) open on this with a proposed
fix, but here is a simpler (almost) one-line version that I'm using:

Index: chkgrp.c
===================================================================
RCS file: /usr/cvs/FreeBSD/src/usr.sbin/chkgrp/chkgrp.c,v
retrieving revision 1.9
diff -u -r1.9 chkgrp.c
--- chkgrp.c	26 May 2005 10:57:03 -0000	1.9
+++ chkgrp.c	4 Aug 2005 12:11:03 -0000
@@ -106,7 +106,8 @@
 	}
 
 	for (cp = f[0] ; *cp ; cp++) {
-	    if (!isalnum(*cp) && *cp != '.' && *cp != '_' && *cp != '-') {
+	    if (!isalnum(*cp) && *cp != '.' && *cp != '_' && *cp != '-' &&
+		    (cp > f[0] || *cp != '+')) {
 		warnx("%s: line %d: '%c' invalid character", gfn, n, *cp);
 		e++;
 	    }

Maybe someone has the time to commit a fix for this??

Thanks,
Bob

-- 
Bob Willcox                The early bird who catches the worm works for someone
bob@immure.com             who comes in late and owns the worm farm.
Austin, TX                         -- Travis McGee



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