summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2020-07-03 06:46:41 +0000
committerDamien Miller <djm@mindrot.org>2020-07-03 17:03:54 +1000
commitc8935081db35d73ee6355999142fa0776a2af912 (patch)
tree1bf5f1086d43b9087b8604a7a5d8f20d3eca788e /session.c
parent183c4aaef944af3a1a909ffa01058c65bac55748 (diff)
upstream: when redirecting sshd's log output to a file, undo this
redirection after the session child process is forked(); ok dtucker@ OpenBSD-Commit-ID: 6df86dd653c91f5bc8ac1916e7680d9d24690865
Diffstat (limited to 'session.c')
-rw-r--r--session.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/session.c b/session.c
index f6193b98e..a37eb4ae2 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.320 2020/06/26 04:45:11 dtucker Exp $ */ 1/* $OpenBSD: session.c,v 1.321 2020/07/03 06:46:41 djm Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -1501,6 +1501,9 @@ child_close_fds(struct ssh *ssh)
1501 */ 1501 */
1502 endpwent(); 1502 endpwent();
1503 1503
1504 /* Stop directing logs to a high-numbered fd before we close it */
1505 log_redirect_stderr_to(NULL);
1506
1504 /* 1507 /*
1505 * Close any extra open file descriptors so that we don't have them 1508 * Close any extra open file descriptors so that we don't have them
1506 * hanging around in clients. Note that we want to do this after 1509 * hanging around in clients. Note that we want to do this after