[openssh-commits] [openssh] 03/06: upstream: make -E a no-op in sshd-auth. Redirecting logging to a

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Aug 18 13:56:49 AEST 2025


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 80b5ffd22abd4093201939e31d1ea6dc8cc7913a
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Mon Aug 18 01:59:53 2025 +0000

    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
---
 sshd-auth.c | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

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,

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list