summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--session.c25
2 files changed, 28 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 07699b017..ce409160f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,10 @@
27 [auth1.c auth2.c] 27 [auth1.c auth2.c]
28 auth_root_allowed() is handled by the monitor in the privsep case, 28 auth_root_allowed() is handled by the monitor in the privsep case,
29 so skip this for use_privsep, ok stevesk@, fixes bugzilla #387/325 29 so skip this for use_privsep, ok stevesk@, fixes bugzilla #387/325
30 - markus@cvs.openbsd.org 2002/08/22 21:45:41
31 [session.c]
32 send signal name (not signal number) in "exit-signal" message; noticed
33 by galb@vandyke.com
30 34
3120020820 3520020820
32 - OpenBSD CVS Sync 36 - OpenBSD CVS Sync
@@ -1568,4 +1572,4 @@
1568 - (stevesk) entropy.c: typo in debug message 1572 - (stevesk) entropy.c: typo in debug message
1569 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1573 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1570 1574
1571$Id: ChangeLog,v 1.2434 2002/09/04 06:37:26 djm Exp $ 1575$Id: ChangeLog,v 1.2435 2002/09/04 06:39:02 djm Exp $
diff --git a/session.c b/session.c
index f2a1bf015..0e78aca34 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.146 2002/07/30 17:03:55 markus Exp $"); 36RCSID("$OpenBSD: session.c,v 1.147 2002/08/22 21:45:41 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -1809,6 +1809,27 @@ session_pty_cleanup(void *session)
1809 PRIVSEP(session_pty_cleanup2(session)); 1809 PRIVSEP(session_pty_cleanup2(session));
1810} 1810}
1811 1811
1812static char *
1813sig2name(int sig)
1814{
1815#define SSH_SIG(x) if (sig == SIG ## x) return #x
1816 SSH_SIG(ABRT);
1817 SSH_SIG(ALRM);
1818 SSH_SIG(FPE);
1819 SSH_SIG(HUP);
1820 SSH_SIG(ILL);
1821 SSH_SIG(INT);
1822 SSH_SIG(KILL);
1823 SSH_SIG(PIPE);
1824 SSH_SIG(QUIT);
1825 SSH_SIG(SEGV);
1826 SSH_SIG(TERM);
1827 SSH_SIG(USR1);
1828 SSH_SIG(USR2);
1829#undef SSH_SIG
1830 return "SIG@openssh.com";
1831}
1832
1812static void 1833static void
1813session_exit_message(Session *s, int status) 1834session_exit_message(Session *s, int status)
1814{ 1835{
@@ -1826,7 +1847,7 @@ session_exit_message(Session *s, int status)
1826 packet_send(); 1847 packet_send();
1827 } else if (WIFSIGNALED(status)) { 1848 } else if (WIFSIGNALED(status)) {
1828 channel_request_start(s->chanid, "exit-signal", 0); 1849 channel_request_start(s->chanid, "exit-signal", 0);
1829 packet_put_int(WTERMSIG(status)); 1850 packet_put_cstring(sig2name(WTERMSIG(status)));
1830#ifdef WCOREDUMP 1851#ifdef WCOREDUMP
1831 packet_put_char(WCOREDUMP(status)); 1852 packet_put_char(WCOREDUMP(status));
1832#else /* WCOREDUMP */ 1853#else /* WCOREDUMP */