From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 15 15:19:54 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 752F516A41C for ; Wed, 15 Jun 2005 15:19:54 +0000 (GMT) (envelope-from faber@pun.isi.edu) Received: from pun.isi.edu (pun.isi.edu [128.9.160.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DA5043D49 for ; Wed, 15 Jun 2005 15:19:54 +0000 (GMT) (envelope-from faber@pun.isi.edu) Received: from pun.isi.edu (localhost [127.0.0.1]) by pun.isi.edu (8.13.3/8.13.1) with ESMTP id j5FFJrlP079542; Wed, 15 Jun 2005 08:19:53 -0700 (PDT) (envelope-from faber@pun.isi.edu) Received: (from faber@localhost) by pun.isi.edu (8.13.3/8.13.1/Submit) id j5FFJrtM079541; Wed, 15 Jun 2005 08:19:53 -0700 (PDT) (envelope-from faber) Date: Wed, 15 Jun 2005 08:19:53 -0700 From: Ted Faber To: freebsd-hackers@freebsd.org Message-ID: <20050615151953.GB78881@pun.isi.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NU0Ex4SbNnrxsi6C" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-url: http://www.isi.edu/~faber Cc: Subject: ckgrp flags NIS groups as bad - patch included to fix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2005 15:19:54 -0000 --NU0Ex4SbNnrxsi6C Content-Type: multipart/mixed; boundary="1UWUbFP1cBYEclgG" Content-Disposition: inline --1UWUbFP1cBYEclgG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The change to /usr/sbin/chkgrp on Fri Jun 10 flags NIS groups as having an invalid character in them - the leading +. Attached is a patch to explicitly allow that case. If some helpful committer would like to test and commit the patch, that would be great. I think that the testing needed is minimal. If no one wants to put this in, I'll pr it. Thanks. --=20 Ted Faber http://www.isi.edu/~faber PGP: http://www.isi.edu/~faber/pubkeys.= asc Unexpected attachment on this mail? See http://www.isi.edu/~faber/FAQ.html#= SIG --1UWUbFP1cBYEclgG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="chkgrp.patch" Content-Transfer-Encoding: quoted-printable --- chkgrp.c.orig Wed Jun 15 08:04:27 2005 +++ chkgrp.c Wed Jun 15 08:13:07 2005 @@ -105,7 +105,23 @@ line[i++] =3D 0; } =20 - for (cp =3D f[0] ; *cp ; cp++) { + /*=20 + * A group with the first character '+' is an NIS group. Allow that + * case explicitly. + */ + cp =3D f[0]; + if (!isalnum(*cp) && *cp !=3D '.' && *cp !=3D '+' && *cp !=3D '_' &&=20 + *cp !=3D '-') { + warnx("%s: line %d: '%c' invalid character", gfn, n, *cp); + e++; + } + cp++; + + /*=20 + * Check second through last characters of the group name for bad + * characters (cp is not re-initialized). + */ + for ( ; *cp ; cp++) { if (!isalnum(*cp) && *cp !=3D '.' && *cp !=3D '_' && *cp !=3D '-') { warnx("%s: line %d: '%c' invalid character", gfn, n, *cp); e++; --1UWUbFP1cBYEclgG-- --NU0Ex4SbNnrxsi6C Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCsEcZaUz3f+Zf+XsRAh7qAJ0Z6DmoWY5L0tTRoGipbwni+5L2MACgsZpB qh++3gq/78KhhlmNhvdbYEg= =XWKx -----END PGP SIGNATURE----- --NU0Ex4SbNnrxsi6C--