[openssh-commits] [openssh] 02/06: upstream: Move setting of user, service and style earlier since

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Feb 9 04:37:55 AEDT 2026


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

dtucker pushed a commit to branch master
in repository openssh.

commit 8605ed26334b9ae704b8abe51940b61bdfe1e974
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Sun Feb 8 00:16:34 2026 +0000

    upstream: Move setting of user, service and style earlier since
    
    -portable needs to use these when setting up PAM.  Removes two diffs vs
    portable.
    
    OpenBSD-Commit-ID: 8db130d42a3581b7a1eaed65917673d4474fc4fe
---
 auth2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/auth2.c b/auth2.c
index a9d76a59a..2e6808152 100644
--- a/auth2.c
+++ b/auth2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2.c,v 1.171 2026/02/07 17:04:22 dtucker Exp $ */
+/* $OpenBSD: auth2.c,v 1.172 2026/02/08 00:16:34 dtucker Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -293,6 +293,8 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh)
 		/* setup auth context */
 		authctxt->pw = mm_getpwnamallow(ssh, user);
 		authctxt->user = xstrdup(user);
+		authctxt->service = xstrdup(service);
+		authctxt->style = style ? xstrdup(style) : NULL;
 		if (authctxt->pw && strcmp(service, "ssh-connection")==0) {
 			authctxt->valid = 1;
 			debug2_f("setting up authctxt for %s", user);
@@ -311,8 +313,6 @@ input_userauth_request(int type, u_int32_t seq, struct ssh *ssh)
 		ssh_packet_set_log_preamble(ssh, "%suser %s",
 		    authctxt->valid ? "authenticating " : "invalid ", user);
 		setproctitle("%s [net]", authctxt->valid ? user : "unknown");
-		authctxt->service = xstrdup(service);
-		authctxt->style = style ? xstrdup(style) : NULL;
 		mm_inform_authserv(service, style);
 		userauth_banner(ssh);
 		if ((r = kex_server_update_ext_info(ssh)) != 0)

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


More information about the openssh-commits mailing list