From 785ba71778a2b0b8e49c942d0f916a6d05637341 Mon Sep 17 00:00:00 2001 From: nsayer Date: Thu, 5 Apr 2001 14:09:15 +0000 Subject: [PATCH] Reactivate SRA. Make handling of SIGINT and SIGQUIT follow SIGTSTP in TerminalNewMode(). This allows people to break out of SRA authentication if they wish to. git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@75236 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- telnet/sys_bsd.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/telnet/sys_bsd.c b/telnet/sys_bsd.c index aac7c6a..1d63c22 100644 --- a/telnet/sys_bsd.c +++ b/telnet/sys_bsd.c @@ -616,6 +616,12 @@ TerminalNewMode(f) } if (f != -1) { +#ifdef SIGINT + SIG_FUNC_RET intr(); +#endif /* SIGINT */ +#ifdef SIGQUIT + SIG_FUNC_RET intr2(); +#endif /* SIGQUIT */ #ifdef SIGTSTP SIG_FUNC_RET susp(); #endif /* SIGTSTP */ @@ -623,6 +629,12 @@ TerminalNewMode(f) SIG_FUNC_RET ayt(); #endif +#ifdef SIGINT + (void) signal(SIGINT, intr); +#endif +#ifdef SIGQUIT + (void) signal(SIGQUIT, intr2); +#endif #ifdef SIGTSTP (void) signal(SIGTSTP, susp); #endif /* SIGTSTP */ @@ -673,6 +685,12 @@ TerminalNewMode(f) (void) signal(SIGINFO, ayt_status); #endif +#ifdef SIGINT + (void) signal(SIGINT, SIG_DFL); +#endif +#ifdef SIGQUIT + (void) signal(SIGQUIT, SIG_DFL); +#endif #ifdef SIGTSTP (void) signal(SIGTSTP, SIG_DFL); # ifndef SOLARIS