I just built world from RELENG_7 sources csup'd this morning, and it appears the change to src/lib/libc/stdlib/grantpt.c has broken sshd. I see the following when I attempt to login: Oct 28 12:32:34 pflog sshd[78236]: fatal: openpty returns device for which ttyname fails. Oct 28 12:32:34 pflog sshd[78236]: error: chown 0 0 failed: No such file or directory Oct 28 12:32:34 pflog sshd[78236]: error: chmod 0666 failed: No such file or directory If I back out the changes committed on 10/26 to grantpt.c, rebuild libc and restart sshd, I can login again properly. Here are the pty/tty related options in my kernel config: device pty # Pseudo-ttys (telnet etc) Note that I do not have: options COMPAT_43TTY Is COMPAT_43TTY necessary after this commit? Thanks, Josh
Josh Carroll
2008-Oct-28 17:19 UTC
[SOLVED] Re: src/lib/libc/stdlib/grantpt.c commit broke sshd
On Tue, Oct 28, 2008 at 12:56 PM, Josh Carroll <josh.carroll@gmail.com> wrote:> I just built world from RELENG_7 sources csup'd this morning, and it > appears the change to src/lib/libc/stdlib/grantpt.c has broken sshd. > > I see the following when I attempt to login: > > Oct 28 12:32:34 pflog sshd[78236]: fatal: openpty returns device for > which ttyname fails. > Oct 28 12:32:34 pflog sshd[78236]: error: chown 0 0 failed: No such > file or directory > Oct 28 12:32:34 pflog sshd[78236]: error: chmod 0666 failed: No such > file or directoryLooks like libutil did not get built for some reason. Rebuilding libutil fixed the problem. Sorry for the noise! Josh
Hello Josh, The commits I made two days ago were a little tricky. I made some modifications to libc and libutil at the same time. Unfortunately, due to a small case of API misuse in libutil, I couldn't keep older versions of libutil compatible with the new version of libc. Below is a small table with libutil vs libc versions: | libutil <= 26/10 | libutil > 26/10 | --------------+------------------+------------------+ libc <= 26/10 | Works | Works | libc > 26/10 | Doesn't work | Works | --------------+------------------+------------------+ I suspect you are running a new libc, but forgot to update libutil to the latest version as well. Keep in mind that such a setup is not really supported. Ah, right after I finished typing this message, Wesley Shields mentioned an older version of libutil was indeed your problem. Well, to others out there experiencing the same problem: make sure you update libutil as well. Thanks! -- Ed Schouten <ed@80386.nl> WWW: http://80386.nl/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20081028/126b2181/attachment.pgp
> I suspect you are running a new libc, but forgot to update libutil to > the latest version as well. Keep in mind that such a setup is not really > supported.Yes, exactly my problem. The mystery on my end is now how I managed to build libc but not libutil. :)> Ah, right after I finished typing this message, Wesley Shields mentioned > an older version of libutil was indeed your problem. Well, to others out > there experiencing the same problem: make sure you update libutil as > well. Thanks!Yes, Wesley suggested I check whether libutil had been updated, and that did the trick. Thanks Ed/Wesley! Josh