I'm using openssh-3.7.1p2 on Linux. I keep getting setlogin errors in /var/log/messages: Oct 26 18:44:22 giediprime sshd[7774]: Accepted publickey for root from 127.0.0.1 port 39310 ssh2 Oct 26 18:44:22 giediprime sshd[7776]: error: setlogin failed: Function not implemented Running LFS 4.0. Happens both on 2.6.0-test8 and 2.4.22-ac1. When configuring openssh I get this in config.log: configure:6557: checking for setlogin configure:6594: gcc -o conftest -g -O2 -Wall -Wpointer-arith -Wno-uninitialized conftest.c -lutil -lz -lnsl >&5 /tmp/cc4nGZCj.o: In function `main': /tmp/build/openssh-3.7.1p2/configure:6585: warning: setlogin is not implemented and will always fail configure:6597: $? = 0 configure:6600: test -s conftest configure:6603: $? = 0 configure:6613: result: yes Also noting that there is no #if defined(HAVE_SETLOGIN) or similar surrounding the offending call at session.c:1259; if (setlogin(pw->pw_name) < 0) error("setlogin failed: %s", strerror(errno)); Please CC me on replies.. EMH
Eivind Magnus Hvidevold wrote:> > I'm using openssh-3.7.1p2 on Linux. > > I keep getting setlogin errors in /var/log/messages: > Oct 26 18:44:22 giediprime sshd[7774]: Accepted publickey for root from 127.0.0.1 port 39310 ssh2 > Oct 26 18:44:22 giediprime sshd[7776]: error: setlogin failed: Function not implementedYour C library has a setlogin function so sshd uses it. It doesn't work and ssh reports this as an error because, well, it's an error. Remove HAVE_SETLOGIN from config.h or complain to whoever wrote the C library.> Running LFS 4.0. Happens both on 2.6.0-test8 and 2.4.22-ac1.The kernel version is probably irrelevant, it's the version of the C library that matters.> Also noting that there is no #if defined(HAVE_SETLOGIN) or similar > surrounding the offending call at session.c:1259On platforms without their own setlogin() the replacement in openbsd-compat/bsd-misc.c (an empty stub) is used, since libopenbsd-compat is ahead of libc in the link order. -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Eivind Magnus Hvidevold wrote:> When configuring openssh I get this in config.log: > configure:6557: checking for setlogin > configure:6594: gcc -o conftest -g -O2 -Wall -Wpointer-arith -Wno-uninitialized conftest.c -lutil -lz -lnsl >&5 > /tmp/cc4nGZCj.o: In function `main': > /tmp/build/openssh-3.7.1p2/configure:6585: warning: setlogin is not implemented and will always failOne other thing: maybe configure could test for errno == ENOSYS when checking for setlogin? -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.