Mailing List Archive

[Bug 1424] Cannot signal a process over a channel (rfc 4254, section 6.9)
https://bugzilla.mindrot.org/show_bug.cgi?id=1424





--- Comment #1 from Darren Tucker <dtucker@zip.com.au> 2008-01-01 10:31:47 ---
Created an attachment (id=1432)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=1432)
Implement "signal" channel request type, server and client.

Please try this patch, which is based on the one posted by Markus.

The client interace is not documented, but it's an escape sequence
command line:

[CR]~C (should give you the "ssh> " prompt, then
-SHUP

--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 1424] Cannot signal a process over a channel (rfc 4254, section 6.9) [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=1424





--- Comment #2 from Daniel Azuma <dazuma@gmail.com> 2008-01-08 08:40:43 ---
(In reply to comment #1)
> Created an attachment (id=1432)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=1432) [details]
> Implement "signal" channel request type, server and client.
>
> Please try this patch, which is based on the one posted by Markus.
>
> The client interace is not documented, but it's an escape sequence
> command line:
>
> [CR]~C (should give you the "ssh> " prompt, then
> -SHUP

I haven't tested the client, but the server side of your patch appears
to work. I applied it to the CVS head (as of about noon -0800 on 07 Jan
2008), and compiled and ran sshd on a Fedora 8 i386 box. Sending the
TERM signal from my custom client (based on ruby Net::SSH) now appears
to work as expected.

To get it to compile, I did have to modify your patch to add the
following line to misc.c:

#include <signal.h>

Thanks! Looking forward to seeing this in the release version.

--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 1424] Cannot signal a process over a channel (rfc 4254, section 6.9) [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=1424





--- Comment #3 from Daniel Azuma <dazuma@gmail.com> 2008-01-08 09:19:35 ---
(In reply to comment #2)
> I haven't tested the client, but the server side of your patch appears
> to work. I applied it to the CVS head (as of about noon -0800 on 07 Jan
> 2008), and compiled and ran sshd on a Fedora 8 i386 box. Sending the
> TERM signal from my custom client (based on ruby Net::SSH) now appears
> to work as expected.

Sorry, a little (probably unnecessary) clarification... my "applied to
cvs head" != "checked in". I'm not a maintainer. Just mentioning that
the patch seems to work against my test case. I'd still like to see it
get into cvs and an official release, though, since I'd rather wait for
it to trickle into the package management of our linux distribution
before installing onto our production servers.

--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 1424] Cannot signal a process over a channel (rfc 4254, section 6.9) [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=1424


Darren Tucker <dtucker@zip.com.au> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #1432 is|0 |1
obsolete| |




--- Comment #4 from Darren Tucker <dtucker@zip.com.au> 2008-01-08 13:16:30 ---
Created an attachment (id=1438)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=1438)
Move signo2name functions to channels.c

Minor tweak to the patch: move the signal no -> name functions to
channels.c. This saves ~120 bytes in some of the other programs the
link in misc.o via libssh.a but don't actually need those channel name
functions.

--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 1424] Cannot signal a process over a channel (rfc 4254, section 6.9) [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=1424





--- Comment #5 from Damien Miller <djm@mindrot.org> 2008-01-20 06:42:12 ---
(From update of attachment 1438)
>+} no2name[] = {
>+ { SIGABRT, "ABRT" },
>+ { SIGALRM, "ALRM" },
>+ { SIGFPE, "FPE" },
>+ { SIGHUP, "HUP" },
>+ { SIGILL, "ILL" },
>+ { SIGINT, "INT" },
>+ { SIGKILL, "KILL" },
>+ { SIGPIPE, "PIPE" },
>+ { SIGQUIT, "QUIT" },
>+ { SIGSEGV, "SEGV" },
>+ { SIGTERM, "TERM" },
>+ { SIGUSR1, "USR1" },
>+ { SIGUSR2, "USR2" },

I don't think it makes sense to automatically pass some of these from
the client to the server. E.g. SIGSEGV, SIGFPE, SIGILL, SIGBUS,
SIGPIPE, SIGALRM and SIGABRT should be considered "internal" and never
passed (or acted upon by the server).

--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[Bug 1424] Cannot signal a process over a channel (rfc 4254, section 6.9) [ In reply to ]
https://bugzilla.mindrot.org/show_bug.cgi?id=1424


Darren Tucker <dtucker@zip.com.au> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |dtucker@zip.com.au




--- Comment #6 from Darren Tucker <dtucker@zip.com.au> 2008-01-20 09:50:33 ---
(In reply to comment #5)
> I don't think it makes sense to automatically pass some of these from
> the client to the server. E.g. SIGSEGV, SIGFPE, SIGILL, SIGBUS,
> SIGPIPE, SIGALRM and SIGABRT should be considered "internal" and never
> passed (or acted upon by the server).

The list of signals is specified in the RFC, but while we can generate
(and process) all of these, only the ones for which the client has a
signal handler will be automatically passed on.

I'm not entirely happy with the client interface, but it worked for
testing. (Should also interop test with at least one other
implementation, I think PuTTY has it these days.)

--
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs