]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: make -E a no-op in sshd-auth. Redirecting logging to a
authordjm@openbsd.org <djm@openbsd.org>
Mon, 18 Aug 2025 01:59:53 +0000 (01:59 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 18 Aug 2025 03:50:29 +0000 (13:50 +1000)
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

index 5de06a5baa49ccebd54a0ca0b9332e46e554addc..6bf596e7a5fa1d6ce3952719d109ea422eb14a03 100644 (file)
@@ -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,