diff options
author | djm@openbsd.org <djm@openbsd.org> | 2017-06-24 05:24:11 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2017-06-24 16:48:39 +1000 |
commit | 8904ffce057b80a7472955f1ec00d7d5c250076c (patch) | |
tree | 7ebc9f076806ac403175836dc243beab436d97ce | |
parent | e238645d789cd7eb47541b66aea2a887ea122c9b (diff) |
upstream commit
no need to call log_init to reinitialise logged PID in
child sessions, since we haven't called openlog() in log_init() since 1999;
ok markus@
Upstream-ID: 0906e4002af5d83d3d544df75e1187c932a3cf2e
-rw-r--r-- | session.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.288 2017/05/31 09:15:42 deraadt Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.289 2017/06/24 05:24:11 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 |
@@ -134,7 +134,6 @@ static int session_pty_req(Session *); | |||
134 | /* import */ | 134 | /* import */ |
135 | extern ServerOptions options; | 135 | extern ServerOptions options; |
136 | extern char *__progname; | 136 | extern char *__progname; |
137 | extern int log_stderr; | ||
138 | extern int debug_flag; | 137 | extern int debug_flag; |
139 | extern u_int utmp_len; | 138 | extern u_int utmp_len; |
140 | extern int startup_pipe; | 139 | extern int startup_pipe; |
@@ -364,10 +363,6 @@ do_exec_no_pty(Session *s, const char *command) | |||
364 | case 0: | 363 | case 0: |
365 | is_child = 1; | 364 | is_child = 1; |
366 | 365 | ||
367 | /* Child. Reinitialize the log since the pid has changed. */ | ||
368 | log_init(__progname, options.log_level, | ||
369 | options.log_facility, log_stderr); | ||
370 | |||
371 | /* | 366 | /* |
372 | * Create a new session and process group since the 4.4BSD | 367 | * Create a new session and process group since the 4.4BSD |
373 | * setlogin() affects the entire process group. | 368 | * setlogin() affects the entire process group. |
@@ -522,9 +517,6 @@ do_exec_pty(Session *s, const char *command) | |||
522 | close(fdout); | 517 | close(fdout); |
523 | close(ptymaster); | 518 | close(ptymaster); |
524 | 519 | ||
525 | /* Child. Reinitialize the log because the pid has changed. */ | ||
526 | log_init(__progname, options.log_level, | ||
527 | options.log_facility, log_stderr); | ||
528 | /* Close the master side of the pseudo tty. */ | 520 | /* Close the master side of the pseudo tty. */ |
529 | close(ptyfd); | 521 | close(ptyfd); |
530 | 522 | ||