OpenSSH-2.1: FROM in 'w' empty?
Pekka Savola
pekkas at netcore.fi
Thu May 11 23:01:37 EST 2000
> > 2.0beta1 was the one I used before, and that printed FROM field properly.
> > Now, every connection gets '-'.
>
> It works for me. Can you describe your environment some more?
This is heavily updated (from src.rpm's) Redhat Linux 5.1 running 2.2.15
kernel.
I tried to diagnose this a bit, some results below. I hope all of you
forgive me for spamming the list. Hopefully these are of any use. ;)
When running 2.0beta and 2.1 in debug mode, the following differences came
up:
--- Non-working 2.1: ---
[...]
Accepted password for pekkas from 10.0.0.1 port 1022
debug: PAM setting rhost to "other.box"
debug: session_new: init
debug: session_new: session 0
debug: Allocating pty.
debug: Received request for X11 forwarding with auth spoofing.
debug: bind port 6010: Address already in use
debug: fd 7 setting O_NONBLOCK [extra]
debug: channel 0: new [X11 inet listener]
debug: PAM setting tty to "/dev/ttyp3"
debug: PAM establishing creds
debug: Entering interactive session.
debug: Setting controlling tty using TIOCSCTTY.
debug: server_init_dispatch_13
debug: server_init_dispatch_15
debug: tvp!=NULL kid 0 mili 10
[...]
--- Working 2.0beta: ---
Accepted password for pekkas from 10.0.0.1 port 1022
debug: PAM setting rhost to "other.box"
debug: session_new: init
debug: session_new: session 0
debug: Allocating pty.
debug: Received request for X11 forwarding with auth spoofing.
debug: bind port 6010: Address already in use
debug: channel 0: new [X11 inet listener]
debug: PAM setting tty to "/dev/ttyp3"
debug: PAM establishing creds
debug: Entering interactive session.
debug: server_init_dispatch_13
debug: server_init_dispatch_15
debug: Setting controlling tty using TIOCSCTTY.
debug: tvp!=NULL kid 0 mili 10
[...]
---
Note: setver_init_dispatch was done before setting controlling
tty. Also, O_NONBLOCK wasn't used in 2.0beta.
Because I fear this won't help any, I did some stracing with command:
'strace -v -f -otmp.log ./sshd -d -p 2022' and diagnosed the logs.
General overview (I concentrated on wtmp/utmp -- wtmp seemed fine):
----- 'grep utmp tmp.log' on non-working 2.1 -----
9895 open("/var/run/utmp", O_RDWR) = 10
9895 open("/var/run/utmp", O_RDWR) = 10
9903 open("/var/run/utmp", O_RDWR) = 5
9915 open("/var/run/utmp", O_RDWR) = -1 EACCES (Permission denied)
9915 open("/var/run/utmp", O_RDONLY) = 3
9918 open("/var/run/utmp", O_RDWR) = -1 EACCES (Permission denied)
9918 open("/var/run/utmp", O_RDONLY) = 5
9918 open("/var/run/utmp", O_RDWR) = -1 EACCES (Permission denied)
9918 open("/var/run/utmp", O_RDONLY) = 6
9895 open("/var/run/utmp", O_RDWR) = 5
-----
----- 'grep utmp tmp.log' on working 2.0beta -----
11939 open("/var/run/utmp", O_RDWR) = 10
11939 open("/var/run/utmp", O_RDWR) = 10
11941 open("/var/run/utmp", O_RDWR) = 5
11953 open("/var/run/utmp", O_RDWR) = -1 EACCES (Permission denied)
11953 open("/var/run/utmp", O_RDONLY) = 3
11939 open("/var/run/utmp", O_RDWR) = 5
-----
And respective 'grep -2 utmp tmp.log' outputs:
----- non-working 2.1 -----
9895 stat("/dev/ttyp2", {st_dev=makedev(8, 5), st_ino=386210, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=501, st_gid=5, st_blksize=4096, st_blocks=0, st_rdev=makedev(3, 2), st_atime=2000/05/11-14:54:08, st_mtime=2000/05/11-14:54:14, st_ctime=2000/05/11-14:50:46}) = 0
9895 close(10) = 0
9895 open("/var/run/utmp", O_RDWR) = 10
9895 lseek(10, 0, SEEK_SET) = 0
9895 fcntl(10, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
--
9895 stat("/dev/ttyp2", {st_dev=makedev(8, 5), st_ino=386210, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=501, st_gid=5, st_blksize=4096, st_blocks=0, st_rdev=makedev(3, 2), st_atime=2000/05/11-14:54:08, st_mtime=2000/05/11-14:54:14, st_ctime=2000/05/11-14:50:46}) = 0
9895 close(10) = 0
9895 open("/var/run/utmp", O_RDWR) = 10
9895 lseek(10, 0, SEEK_SET) = 0
9895 fcntl(10, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
--
9903 stat("/dev/ttyp3", {st_dev=makedev(8, 5), st_ino=386211, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=501, st_gid=5, st_blksize=4096, st_blocks=0, st_rdev=makedev(3, 3), st_atime=2000/05/11-14:52:30, st_mtime=2000/05/11-14:52:30, st_ctime=2000/05/11-14:54:14}) = 0
9903 close(5) = 0
9903 open("/var/run/utmp", O_RDWR) = 5
9903 lseek(5, 0, SEEK_SET) = 0
9903 fcntl(5, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
--
9915 stat("/dev/ttyp3", {st_dev=makedev(8, 5), st_ino=386211, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=501, st_gid=5, st_blksize=4096, st_blocks=0, st_rdev=makedev(3, 3), st_atime=2000/05/11-14:52:30, st_mtime=2000/05/11-14:54:15, st_ctime=2000/05/11-14:54:14}) = 0
9915 close(3) = 0
9915 open("/var/run/utmp", O_RDWR) = -1 EACCES (Permission denied)
9915 open("/var/run/utmp", O_RDONLY) = 3
9915 lseek(3, 0, SEEK_SET) = 0
9915 fcntl(3, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
--
9918 lseek(3, 0, SEEK_SET) = 0
9918 read(3, "531883.40 525611.77\n", 1023) = 20
9918 open("/var/run/utmp", O_RDWR) = -1 EACCES (Permission denied)
9918 open("/var/run/utmp", O_RDONLY) = 5
9918 lseek(5, 0, SEEK_SET) = 0
9918 fcntl(5, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
--
9895 write(2, "debug: tvp!=NULL kid 0 mili 10\n", 31) = 31
9895 select(9, [6 7 8], [], NULL, {0, 10000} <unfinished ...>
9918 open("/var/run/utmp", O_RDWR) = -1 EACCES (Permission denied)
9895 <... select resumed> ) = 0 (Timeout)
9895 select(9, [6 7 8], [6], NULL, NULL) = 1 (out [6])
9895 write(6, "\0\0\0\227\304m\244\221\3320\t]\221\2567\222:\213\232\237"..., 156) = 156
9895 select(9, [6 7 8], [], NULL, NULL <unfinished ...>
9918 open("/var/run/utmp", O_RDONLY) = 6
9918 lseek(6, 0, SEEK_SET) = 0
9918 fcntl(6, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
--
9895 write(2, "debug: Received exit confirmatio"..., 35) = 35
9895 write(2, "debug: session_pty_cleanup: sess"..., 57) = 57
9895 open("/var/run/utmp", O_RDWR) = 5
9895 lseek(5, 0, SEEK_SET) = 0
9895 fcntl(5, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
-----
----- working 2.0 beta -----
11939 stat("/dev/ttyp2", {st_dev=makedev(8, 5), st_ino=386210, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=501, st_gid=5, st_blksize=4096, st_blocks=0, st_rdev=makedev(3, 2), st_atime=2000/05/11-15:04:16, st_mtime=2000/05/11-15:04:23, st_ctime=2000/05/11-14:50:46}) = 0
11939 close(10) = 0
11939 open("/var/run/utmp", O_RDWR) = 10
11939 lseek(10, 0, SEEK_SET) = 0
11939 fcntl(10, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
--
11939 stat("/dev/ttyp2", {st_dev=makedev(8, 5), st_ino=386210, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=501, st_gid=5, st_blksize=4096, st_blocks=0, st_rdev=makedev(3, 2), st_atime=2000/05/11-15:04:16, st_mtime=2000/05/11-15:04:23, st_ctime=2000/05/11-14:50:46}) = 0
11939 close(10) = 0
11939 open("/var/run/utmp", O_RDWR) = 10
11939 lseek(10, 0, SEEK_SET) = 0
11939 fcntl(10, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
--
11941 stat("/dev/ttyp3", {st_dev=makedev(8, 5), st_ino=386211, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=501, st_gid=5, st_blksize=4096, st_blocks=0, st_rdev=makedev(3, 3), st_atime=2000/05/11-15:01:08, st_mtime=2000/05/11-15:01:08, st_ctime=2000/05/11-15:04:23}) = 0
11941 close(5) = 0
11941 open("/var/run/utmp", O_RDWR) = 5
11941 lseek(5, 0, SEEK_SET) = 0
11941 fcntl(5, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
--
11953 stat("/dev/ttyp3", {st_dev=makedev(8, 5), st_ino=386211, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=501, st_gid=5, st_blksize=4096, st_blocks=0, st_rdev=makedev(3, 3), st_atime=2000/05/11-15:01:08, st_mtime=2000/05/11-15:04:24, st_ctime=2000/05/11-15:04:23}) = 0
11953 close(3) = 0
11953 open("/var/run/utmp", O_RDWR) = -1 EACCES (Permission denied)
11953 open("/var/run/utmp", O_RDONLY) = 3
11953 lseek(3, 0, SEEK_SET) = 0
11953 fcntl(3, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
--
11939 write(2, "debug: Received exit confirmatio"..., 35) = 35
11939 write(2, "debug: session_pty_cleanup: sess"..., 57) = 57
11939 open("/var/run/utmp", O_RDWR) = 5
11939 lseek(5, 0, SEEK_SET) = 0
11939 fcntl(5, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
-----
HTH, Regards
--
Pekka Savola "Tell me of difficulties surmounted,
Pekka.Savola at netcore.fi not those you stumble over and fall"
More information about the openssh-unix-dev
mailing list