From: djm@openbsd.org Date: Mon, 18 Aug 2025 01:59:53 +0000 (+0000) Subject: upstream: make -E a no-op in sshd-auth. Redirecting logging to a X-Git-Tag: V_10_1_P1~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80b5ffd22abd4093201939e31d1ea6dc8cc7913a;p=thirdparty%2Fopenssh-portable.git upstream: make -E a no-op in sshd-auth. Redirecting logging to a file doesn't work in this program as logging already goes via the parent sshd-session process. ok dtucker@ OpenBSD-Commit-ID: 73325b9e69364117c18305f896c620a3abcf4f87 --- diff --git a/sshd-auth.c b/sshd-auth.c index 5de06a5ba..6bf596e7a 100644 --- a/sshd-auth.c +++ b/sshd-auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd-auth.c,v 1.4 2025/05/06 05:40:56 djm Exp $ */ +/* $OpenBSD: sshd-auth.c,v 1.5 2025/08/18 01:59:53 djm Exp $ */ /* * SSH2 implementation: * Privilege Separation: @@ -445,7 +445,7 @@ main(int ac, char **av) extern int optind; int r, opt, have_key = 0; int sock_in = -1, sock_out = -1, rexeced_flag = 0; - char *line, *logfile = NULL; + char *line; u_int i; mode_t new_umask; Authctxt *authctxt; @@ -508,11 +508,7 @@ main(int ac, char **av) options.log_level++; break; case 'D': - /* ignore */ - break; case 'E': - logfile = optarg; - /* FALLTHROUGH */ case 'e': /* ignore */ break; @@ -601,19 +597,6 @@ main(int ac, char **av) OpenSSL_add_all_algorithms(); #endif - /* If requested, redirect the logs to the specified logfile. */ - if (logfile != NULL) { - char *cp, pid_s[32]; - - snprintf(pid_s, sizeof(pid_s), "%ld", (unsigned long)getpid()); - cp = percent_expand(logfile, - "p", pid_s, - "P", "sshd-auth", - (char *)NULL); - log_redirect_stderr_to(cp); - free(cp); - } - log_init(__progname, options.log_level == SYSLOG_LEVEL_NOT_SET ? SYSLOG_LEVEL_INFO : options.log_level,