Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Feb 2004 12:24:21 -0600
From:      "Jacques A. Vidrine" <nectar@FreeBSD.org>
To:        Andre Oppermann <andre@freebsd.org>
Cc:        Ken Smith <kensmith@cse.Buffalo.EDU>
Subject:   Re: cvs commit: src/kerberos5/lib/libroken Makefile
Message-ID:  <20040203182421.GB80532@madman.celabo.org>
In-Reply-To: <20040203170652.GA80415@madman.celabo.org>
References:  <200402030932.i139WBpQ054113@repoman.freebsd.org> <20040203112824.01dfdc99@localhost> <20040203163214.GD17960@electra.cse.Buffalo.EDU> <401FD252.7F56765E@freebsd.org> <401FD43E.174A6839@freebsd.org> <20040203170652.GA80415@madman.celabo.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 03, 2004 at 11:06:52AM -0600, Jacques A. Vidrine wrote:
> On Tue, Feb 03, 2004 at 06:02:54PM +0100, Andre Oppermann wrote:
> > Hmm...  getlogin might be the problem (from perl man page):
> > 
> >  getlogin
> > 
> >     Implements the C library function of the same name, which on most systems
> >     returns the current login from /etc/utmp, if any. If null, use getpwuid.
> 
> Only that's not correct for most systems :-)
> 
> getlogin(2) returns what was previously passed to setlogin(2) (usually
> by login(1)).  But this could indeed be a part of the problem,
> especially since there is a known bug in ssh involving a missing
> setsid() ...
> 
> Sorry to tease and run, but I have an appointment right *now*.
> Will follow-up when I return.

No, after reviewing my notes, I don't think it is ssh after all.  In
4.x, an ifdef'd out setsid (sshd.c:1402) leaves sshd subprocesses
[1] sharing the same `struct session' as the master sshd process.
However, the login shell or other commands that are executed will get
their own `struct session', so this is just cosmetic.

Still, I'd recommend removing that `getlogin' invocation.

Cheers,
-- 
Jacques Vidrine   NTT/Verio SME      FreeBSD UNIX       Heimdal
nectar@celabo.org jvidrine@verio.net nectar@freebsd.org nectar@kth.se

[1] The ones that look like `sshd: nectar [priv] (sshd)' and
    `sshd: nectar@notty (sshd)'.



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