| Summary: | Privsep child continues to run after monitor killed. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Darren Tucker <dtucker> | ||||
| Component: | sshd | Assignee: | OpenSSH Bugzilla mailing list <openssh-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | normal | ||||||
| Priority: | P2 | ||||||
| Version: | -current | ||||||
| Hardware: | ix86 | ||||||
| OS: | Linux | ||||||
| URL: | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=164797 | ||||||
| Attachments: |
|
||||||
|
Description
Darren Tucker
2003-05-12 21:40:11 AEST
Created attachment 290 [details]
Pass monitor signals through to child
Attempt to fix. Dunno if this is a good idea or not.
The problem doesn't seem to happen on Solaris 8, don't know why.
OK, I think I know why the bug does not manifest on Solaris:
$ truss -p 10673 # user child
poll(0xEFFFF348, 3, -1) (sleeping...)
Received signal #1, SIGHUP, in poll() [default]
poll(0xEFFFF348, 3, -1) Err#4 EINTR
*** process killed ***
I think the reason why it doesn't happen on Solaris is because setsid() is
not called early in sshd (SSHD_ACQUIRES_CTTY is defined), so both monitor and
child have the same controlling terminal.
$ ps -eafj # Solaris 8
UID PID PPID PGID SID C STIME TTY TIME CMD
dtucker 12497 12495 12495 12495 1 22:01:54 pts/2 0:00 ./sshd -p 2022
root 2541 1 2541 2541 0 21:04:37 ? 0:00 ./sshd -p 2022
root 12495 2541 12495 12495 1 22:01:52 pts/2 0:00 ./sshd -p 2022
$ ps -eafj # Redhat 8
UID PID PPID PGID SID C STIME TTY TIME CMD
root 5052 1 5052 5052 0 21:25 ? 00:00:00 ./sshd -p 2022
root 13559 5052 13559 13559 1 22:05 ? 00:00:00 [sshd]
dtucker 13562 13559 13559 13559 0 22:05 ? 00:00:00 [sshd]
Now fixed. $ cvs log monitor.c [snip] revision 1.46 date: 2003/05/14 09:31:12; author: djm; state: Exp; lines: +18 -1 - markus@cvs.openbsd.org 2003/05/14 08:57:49 [monitor.c] http://bugzilla.mindrot.org/show_bug.cgi?id=560 Privsep child continues to run after monitor killed. Pass monitor signals through to child; Darren Tucker Mass change of RESOLVED bugs to CLOSED |