summaryrefslogtreecommitdiffstats
path: root/usr.bin/rlogin
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>2002-02-27 22:45:10 +0000
committerfenner <fenner@FreeBSD.org>2002-02-27 22:45:10 +0000
commiteab8ad1bb3cecafed8a645c53e4b66bfe5ce868c (patch)
tree86d5fe98aeeac3d4632bd1acd41f34484440b931 /usr.bin/rlogin
parent70babecdeb63ee03698281e46c371f3734fc0f15 (diff)
downloadFreeBSD-src-eab8ad1bb3cecafed8a645c53e4b66bfe5ce868c.zip
FreeBSD-src-eab8ad1bb3cecafed8a645c53e4b66bfe5ce868c.tar.gz
Use SIGUSR1 to propogate SIGURG to the child; security measures prevent
the parent from sending SIGURG itself to the child. This fixes the problem of occasionally failing to pass the window size.
Diffstat (limited to 'usr.bin/rlogin')
-rw-r--r--usr.bin/rlogin/rlogin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c
index 13782b4..9bbf2a4 100644
--- a/usr.bin/rlogin/rlogin.c
+++ b/usr.bin/rlogin/rlogin.c
@@ -773,6 +773,7 @@ reader(omask)
#endif
(void)signal(SIGTTOU, SIG_IGN);
(void)signal(SIGURG, oob);
+ (void)signal(SIGUSR1, oob); /* When propogating SIGURG from parent */
ppid = getppid();
(void)fcntl(rem, F_SETOWN, pid);
(void)setjmp(rcvtop);
@@ -864,12 +865,12 @@ lostpeer(signo)
done(1);
}
-/* copy SIGURGs to the child process. */
+/* copy SIGURGs to the child process via SIGUSR1. */
void
copytochild(signo)
int signo;
{
- (void)kill(child, SIGURG);
+ (void)kill(child, SIGUSR1);
}
void
OpenPOWER on IntegriCloud