Mailing List Archive

Slackware 4.0: wtmp and pty.c problems
Hello all,

I use a Slackware 4.0 based system (libc5 based, with glibc2.07 runtime
support).


I've configured OpenSSH using:
./configure --sysconfdir=/etc/ssh --without-pam
--with-default-path=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbi
n:/sbin

NOTE: yes, --with-default-path DOES work, since pre24 (pre 22 did not)

When I try to compile OpenSSH-1.2.1pre25 (or pre24 or pre22), I get the
following error messages:

gcc -g -O2 -Wall -I/usr/local/ssl/include -DETCDIR=\"/etc/ssh\"
-DSSH_PROGRAM=\"/usr/local/bin/ssh\"
-DSSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh/ssh-askpass\"
-DHAVE_CONFIG_H -c pty.c -o pty.o
pty.c: In function `pty_allocate':
pty.c:100: warning: implicit declaration of function `grantpt'
pty.c:104: warning: implicit declaration of function `unlockpt'
pty.c:108: warning: implicit declaration of function `ptsname'
pty.c:108: warning: assignment makes pointer from integer without a cast
pty.c:122: `I_PUSH' undeclared (first use this function)
pty.c:122: (Each undeclared identifier is reported only once
pty.c:122: for each function it appears in.)
make: *** [pty.o] Error 1

If I then edit pty.c and add a line after the test, unconditionally
undefining HAVE_DEV_PTMX like this:

/* Pty allocated with _getpty gets broken if we do I_PUSH:es to it. */
#if defined(HAVE__GETPTY) || defined(HAVE_OPENPTY)
#undef HAVE_DEV_PTMX
#endif

#undef HAVE_DEV_PTMX

Then everything compiles, installs and functions ALMOST normally.

However, /var/log/wtmp is NOT updated.

Login messages appear in syslog quite normally, /var/run/utmp appears to be
updated properly, but /var/log/wtmp is not updated on login/logpout using
openSSH.

I also note that, on the same setup, /var/log/wtmp IS updated correctly
when using commercial SSH (version 1.2.26).

Any suggestions how I should investigate this problem further? My C skills
are basically limited to messing with Makefiles and sundry to get programs
to compile, and I'm NOT competent to plunge into the code and post a diff
to the list.

Also, I note that ssh -V always returns
SSH Version OpenSSH-1.2.1, protocol version 1.5

Not that this is a real problem, but it makes it difficult to see what
preXX version I'm actually running. Would adding this to the version output
cause problems elesewhere?

Thanks for any and all pointers!

John

__________________________________________________________________
John Seifarth http://www.waw.be/waw/
Words & Wires SPRL john@waw.be
Computer Consulting & Language Services Voice: (+) 32-2-660-3943
1160 Brussels, Belgium Fax: (+) 32-2-675-3922
Re: Slackware 4.0: wtmp and pty.c problems [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 7 Jan 2000, John Seifarth wrote:

> Hello all,
>
> I use a Slackware 4.0 based system (libc5 based, with glibc2.07 runtime
> support).
>
>
> I've configured OpenSSH using:
> ./configure --sysconfdir=/etc/ssh --without-pam
> --with-default-path=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbi
> n:/sbin
>
> NOTE: yes, --with-default-path DOES work, since pre24 (pre 22 did not)
>
> When I try to compile OpenSSH-1.2.1pre25 (or pre24 or pre22), I get the
> following error messages:
>

[error message snipped]

> If I then edit pty.c and add a line after the test, unconditionally
> undefining HAVE_DEV_PTMX like this:

It looks like you are running a 2.2.x kernel or at least have the
Unix98 pty device nodes., but are lacking the openpty() function
in your libc.

> /* Pty allocated with _getpty gets broken if we do I_PUSH:es to it. */
> #if defined(HAVE__GETPTY) || defined(HAVE_OPENPTY)
> #undef HAVE_DEV_PTMX
> #endif
>
> #undef HAVE_DEV_PTMX
>
> Then everything compiles, installs and functions ALMOST normally.
>
> However, /var/log/wtmp is NOT updated.
>
> Login messages appear in syslog quite normally, /var/run/utmp
> appears to be updated properly, but /var/log/wtmp is not updated on
> login/logpout using openSSH.
>
> I also note that, on the same setup, /var/log/wtmp IS updated correctly
> when using commercial SSH (version 1.2.26).
>
> Any suggestions how I should investigate this problem further? My C
> skills are basically limited to messing with Makefiles and sundry to
> get programs to compile, and I'm NOT competent to plunge into the
> code and post a diff to the list.

Could you send me a copy of the output of ./configure and the
config.h file it generates?

> Also, I note that ssh -V always returns
> SSH Version OpenSSH-1.2.1, protocol version 1.5
>
> Not that this is a real problem, but it makes it difficult to see
> what preXX version I'm actually running. Would adding this to the
> version output cause problems elesewhere?

I will consider this.

Regards,
Damien Miller

- --
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.mindrot.org/
| Email: djm@mindrot.org (home) -or- djm@ibs.com.au (work)


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE4dmw/ormJ9RG1dI8RAlWHAKCFnyEqpDM5yQjZcNmY9AXH8iZLZACgjK26
VJ4yd9XQboQyR3pNgJXcSMs=
=F7k+
-----END PGP SIGNATURE-----
Re: Slackware 4.0: wtmp and pty.c problems [ In reply to ]
On Sat, Jan 08, 2000 at 09:44:12AM +1100, Damien Miller wrote:
> > If I then edit pty.c and add a line after the test, unconditionally
> > undefining HAVE_DEV_PTMX like this:
>
> It looks like you are running a 2.2.x kernel or at least have the
> Unix98 pty device nodes., but are lacking the openpty() function
> in your libc.
>
> > /* Pty allocated with _getpty gets broken if we do I_PUSH:es to it. */
> > #if defined(HAVE__GETPTY) || defined(HAVE_OPENPTY)
> > #undef HAVE_DEV_PTMX
> > #endif
> >
> > #undef HAVE_DEV_PTMX
> >
> > Then everything compiles, installs and functions ALMOST normally.

Sorry if this message is innapropriate for the list;

Anyhow, I don't know if it matters / if it's related, but I get a similar
behavior under Slack 7.0 with GNU Screen 3.9.4.. I start it up and it
terminates complaining about I_PUSH stuff.. [ie: can't make it work on
slack7 boxes]. Would slack's glibc screwed up?

--
Benjamin Charron (bcharron@bigfoot.com)
[ICQ : 2097711]
PGP Fingerprint : 251D AB92 35E4 BE76 9A24 F08C 26A4 84D1 FB04 077A

Dyslexics have more fnu.