cvs commit: src/usr.sbin/newsyslog newsyslog.c
Pawel Jakub Dawidek
nick at garage.freebsd.pl
Mon Aug 18 23:39:03 PDT 2003
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 source
+> 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=3 (bin)
+> instead of username=3com.
+>
+> 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 thing
+> 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.
+>
+> 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?
--
Pawel Jakub Dawidek pawel at dawidek.net
UNIX Systems Programmer/Administrator http://garage.freebsd.pl
Am I Evil? Yes, I Am! http://cerber.sourceforge.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 305 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20030819/29c8652c/attachment.bin
More information about the cvs-src
mailing list