From owner-freebsd-current Sun Jul 21 02:09:12 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA22133 for current-outgoing; Sun, 21 Jul 1996 02:09:12 -0700 (PDT) Received: from soda.CSUA.Berkeley.EDU (soda.CSUA.Berkeley.EDU [128.32.43.52]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id CAA22121 for ; Sun, 21 Jul 1996 02:09:09 -0700 (PDT) Received: (from richardc@localhost) by soda.CSUA.Berkeley.EDU (8.6.12/8.6.12) id CAA19785; Sun, 21 Jul 1996 02:09:25 -0700 Date: Sun, 21 Jul 1996 02:09:23 -0700 (PDT) From: Veggy Vinny To: Joerg Wunsch cc: FreeBSD-current users Subject: Re: /usr/bin/passwd and finger output In-Reply-To: <199607200720.JAA03329@uriah.heep.sax.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sat, 20 Jul 1996, J Wunsch wrote: > 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. Hmmm, okay... Just don't know why it worked then... Vince