cvs commit: src/usr.sbin/newsyslog newsyslog.c
Garance A Drosehn
gad at FreeBSD.org
Mon Aug 18 20:53:06 PDT 2003
gad 2003/08/18 20:53:04 PDT
FreeBSD src repository
Modified files:
usr.sbin/newsyslog newsyslog.c
Log:
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.
Obtained from: OpenBSD, by a long circuitous route
MFC after: 5 days
Revision Changes Path
1.72 +14 -2 src/usr.sbin/newsyslog/newsyslog.c
More information about the cvs-src
mailing list