On Wed, Jan 20, 1999 at 10:13:15PM +0100, Martin Machacek wrote:
>
> On 20-Jan-99 Harald Hanche-Olsen wrote:
> > - Chris Hardie <[EMAIL PROTECTED]>:
> >
> > Second, I guess a bug report to the FreeBSD maintainers might be
> > appropriate. There is a form for submitting bug reports available
> > from the FreeBSD home page at <URL:http://www.freebsd.org/> somewhere.
>
> You can also use the send-pr program (part of baseic FreeBSD distribution).
>
> Interesting, on FreeBSD RELENG-2.2 dated October 28 1998 it seems to be OK.
> Here is output for user netadmin:
>
> martin@servis:/tmp# ./test netadmin
> netadmin: name="netadmin", uid=1000, gid=21, homedir=/usr/home/netadmin
> martin@servis:/tmp# ./test netadmin-foo
> netadmin-foo: nope.
> martin@servis:/tmp#
I've tried it on a 2.2.7-RELEASE system, two 2.2-STABLE systems from around
September, a 2.2-STABLE system from late December, and a 3.0-CURRENT system,
current as of yesterday, and they all behave correctly. ./getpwnam cjohnson
gives me the goods, and ./getpwnam cjohnson-test gives me a "nope."
News flash! I just checked http://www.freebsd.org/releases/2.2.8R/errata.html
and here's what it says:
o getpwnam(3) semantics are incorrect in some cases.
Fix: If passed a string longer than the maximum allowed for a user name,
getpwnam will incorrectly return an entry for a user that matches the
initial characters in the string up to the maximum length allowed for a
user name. To correct this behaviour, libc needs to be patched and
recompiled. The appropriate patch can be obtained from:
http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/getpwent.c.diff?r1=1.35.2.2&r2=1.35.2.3
Chris