Date: Tue, 19 Aug 2003 08:39:34 +0200 From: Pawel Jakub Dawidek <nick@garage.freebsd.pl> To: Garance A Drosehn <gad@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/newsyslog newsyslog.c Message-ID: <20030819063934.GC47959@garage.freebsd.pl> In-Reply-To: <200308190353.h7J3r4Fl062425@repoman.freebsd.org> References: <200308190353.h7J3r4Fl062425@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--B4IIlcmfBL/1gGOG Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 18, 2003 at 08:53:04PM -0700, Garance A Drosehn wrote: +> When checking the 'user:group' field in newsyslog.conf, freebsd's sour= ce +> was mistakenly calling the standard isnumber() function to find out if +> the given 'user' or 'group' were all numeric. This meant that only the +> first character of the fields were actually checked, so a username of +> (say) '3com' would look like a number, and thus get mapped to uid=3D3 = (bin) +> instead of username=3D3com. +> =20 +> This bug was introduced back in freebsd's v1.1. That initial import +> almost matches netbsd's v1.9, except that an internal isnumber() +> routine was removed in favor of the standard library version. The thi= ng +> is, that internal routine was checking the entire string, and not just +> the first digit. In OpenBSD, isnumber() was eventually renamed to +> isnumberstr() to make the distinction more obvious, and I'm going to +> follow that lead. +> =20 +> I believe this also happens to remove the last references to isnumber() +> in the entire freebsd base system. So is is there a chance to put isnumberstr() to libc? --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --B4IIlcmfBL/1gGOG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBP0HGJj/PhmMH/Mf1AQG8iQQAh1AEjHiijiDhv8AsN5H5/DJPX6v7Wx5a huyxdbGHsPVvCuLSdXJJAJw7rG5rLdRXWFdGu5KAlGs2u5dzuDAVo7Z/ty3LLtvq AwR1WJvT/y0JdwliDhNMPr0wdXfAbYPCb6LUhZssAjhLmaizIa2SOm0o33pL6KvA rI28fJ17aY0= =9dxZ -----END PGP SIGNATURE----- --B4IIlcmfBL/1gGOG--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030819063934.GC47959>