diff options
author | djm@openbsd.org <djm@openbsd.org> | 2022-07-01 02:36:30 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2022-07-01 02:37:46 +0200 |
commit | 96faa0de6c673a2ce84736eba37fc9fb723d9e5c (patch) | |
tree | 636a35e90a0fef469a2e169a531c88d359f2bf22 /ssh.c | |
parent | upstream: reflect the update to -D arg name in usage(); (diff) | |
download | openssh-96faa0de6c673a2ce84736eba37fc9fb723d9e5c.tar.xz openssh-96faa0de6c673a2ce84736eba37fc9fb723d9e5c.zip |
upstream: ignore SIGPIPE earlier in main(), specifically before
muxclient() which performs operations that could cause one; Reported by Noam
Lewis via bz3454, ok dtucker@
OpenBSD-Commit-ID: 63d8e13276869eebac6d7a05d5a96307f9026e47
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.574 2022/03/30 04:33:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.575 2022/07/01 00:36:30 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1124,6 +1124,8 @@ main(int ac, char **av) } } + ssh_signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE early */ + /* * Initialize "log" output. Since we are the client all output * goes to stderr unless otherwise specified by -y or -E. @@ -1652,7 +1654,6 @@ main(int ac, char **av) options.num_system_hostfiles); tilde_expand_paths(options.user_hostfiles, options.num_user_hostfiles); - ssh_signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE early */ ssh_signal(SIGCHLD, main_sigchld_handler); /* Log into the remote system. Never returns if the login fails. */ |