openssh-2.1.0p2 ans Solaris 8

Brandon Hume hume at Den.BOFH.Halifax.NS.Ca
Mon May 29 20:02:11 EST 2000


> I have some troubles with subj and proper utmpx/wtmpx functionality.
> After successfull ssh connect to Solaris 8 box, I run

The problem arises because if you check line 154 of bsd-login.c, OpenSSH
writes out a *utmp* record into utmpx.  (Along with a variety of other nasty
things, like opening the same file twice and not closing any of them, etc...)

I think somebody already mentioned this problem on the list, and submitted a
patch.

I avoided the problem by gutting login() to look like:

void
login(utp,utx)
        struct utmp *utp;
        struct utmpx *utx;
{
        struct utmpx *old_utx;

        if((old_utx = pututxline(utx)) == NULL) {
                log("Could not update utmpx!");
        }

        updwtmpx(_PATH_WTMPX, utx);
        endutxent();
}

Obviously it destroys portability to other platforms, but it was just a quick
"make it go" fix.

-- 
Brandon Hume    - hume -> BOFH.Halifax.NS.Ca, http://WWW.BOFH.Halifax.NS.Ca/
                       -> Solaris Snob and general NOCMonkey





More information about the openssh-unix-dev mailing list