Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Aug 2003 20:53:04 -0700 (PDT)
From:      Garance A Drosehn <gad@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/usr.sbin/newsyslog newsyslog.c
Message-ID:  <200308190353.h7J3r4Fl062425@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308190353.h7J3r4Fl062425>