[session.c sshd.c]
     ignore SIGPIPE, restore in child, fixes x11-fwd crashes; with djm@
This commit is contained in:
Ben Lindstrom 2001-03-24 00:43:26 +00:00
parent 7527f8b52d
commit de71cda078
3 changed files with 13 additions and 3 deletions

View File

@ -10,6 +10,9 @@
- markus@cvs.openbsd.org 2001/03/23 13:10:57
[sftp-int.c]
fix put, upload to _absolute_ path, ok djm@
- markus@cvs.openbsd.org 2001/03/23 14:28:32
[session.c sshd.c]
ignore SIGPIPE, restore in child, fixes x11-fwd crashes; with djm@
20010323
- OpenBSD CVS Sync
@ -4701,4 +4704,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
$Id: ChangeLog,v 1.1013 2001/03/24 00:39:12 mouring Exp $
$Id: ChangeLog,v 1.1014 2001/03/24 00:43:26 mouring Exp $

View File

@ -33,7 +33,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: session.c,v 1.66 2001/03/21 21:06:30 markus Exp $");
RCSID("$OpenBSD: session.c,v 1.67 2001/03/23 14:28:32 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@ -1427,6 +1427,10 @@ do_child(Session *s, const char *command)
else
cp = shell;
}
/* restore SIGPIPE for child */
signal(SIGPIPE, SIG_DFL);
/*
* If we have no command, execute the shell. In this case, the shell
* name to be passed in argv[0] is preceded by '-' to indicate that

5
sshd.c
View File

@ -40,7 +40,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: sshd.c,v 1.177 2001/03/23 11:04:07 djm Exp $");
RCSID("$OpenBSD: sshd.c,v 1.178 2001/03/23 14:28:32 markus Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@ -809,6 +809,9 @@ main(int ac, char **av)
/* Chdir to the root directory so that the current disk can be
unmounted if desired. */
chdir("/");
/* ignore SIGPIPE */
signal(SIGPIPE, SIG_IGN);
/* Start listening for a socket, unless started from inetd. */
if (inetd_flag) {