From owner-cvs-all@FreeBSD.ORG Mon Aug 18 20:53:06 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D1FD37B401; Mon, 18 Aug 2003 20:53:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC40E43FA3; Mon, 18 Aug 2003 20:53:05 -0700 (PDT) (envelope-from gad@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h7J3r50U062426; Mon, 18 Aug 2003 20:53:05 -0700 (PDT) (envelope-from gad@repoman.freebsd.org) Received: (from gad@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h7J3r4Fl062425; Mon, 18 Aug 2003 20:53:04 -0700 (PDT) Message-Id: <200308190353.h7J3r4Fl062425@repoman.freebsd.org> From: Garance A Drosehn Date: Mon, 18 Aug 2003 20:53:04 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.sbin/newsyslog newsyslog.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2003 03:53:06 -0000 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