diff options
-rw-r--r-- | crypto/openssh/session.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c index df1a241..300dc5a 100644 --- a/crypto/openssh/session.c +++ b/crypto/openssh/session.c @@ -448,8 +448,6 @@ do_exec_no_pty(Session *s, const char *command, struct passwd * pw) if (s == NULL) fatal("do_exec_no_pty: no session"); - signal(SIGPIPE, SIG_DFL); - session_proctitle(s); #ifdef USE_PAM @@ -1243,6 +1241,12 @@ do_child(const char *command, struct passwd * pw, const char *term, for (i = 3; i < getdtablesize(); i++) close(i); + /* + * Restore any signal handlers set by sshd previously that should + * be restored to their initial state. + */ + signal(SIGPIPE, SIG_DFL); + /* Change current directory to the user\'s home directory. */ if ( #ifdef __FreeBSD__ |