Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jul 1996 09:20:41 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-current@FreeBSD.org (FreeBSD-current users)
Subject:   Re: /usr/bin/passwd and finger output
Message-ID:  <199607200720.JAA03329@uriah.heep.sax.de>
In-Reply-To: <Pine.PTX.3.91.960719200611.11997d-100000@soda.CSUA.Berkeley.EDU> from Veggy Vinny at "Jul 19, 96 08:07:09 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As Veggy Vinny wrote:

> 	You're right about this one except I logged in as user vince then 
> su to root so then I su -l dennis and then did the passwd, this used to 
> work in -current as of 1.5 weeks ago but is there anyway around this?

It should never have worked this way.  If you verify the CVS file,
you'll notice that it used getlogin() all the time to obtain the
identity of the login user.

As i wrote, i think this is in error, and it should use getuid.  This
has other ill side-effects however, for cases where you've got more
than one user with the same UID.

The optimal way would be perhaps to use getlogin(), but fall back to
getuid() in case the login user has a different UID than the current
user.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



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