summaryrefslogtreecommitdiff
path: root/debian/patches/backport-do-not-resend-username-to-pam.patch
blob: 00ace37f18713e9272f90151b0df978156089066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 5b83c6a466b2a7fe6aaf50e082c58fe63592e211 Mon Sep 17 00:00:00 2001
From: Damien Miller <djm@mindrot.org>
Date: Tue, 11 Aug 2015 13:33:24 +1000
Subject: Don't resend username to PAM; it already has it.

Pointed out by Moritz Jodeit; ok dtucker@

Origin: upstream, https://anongit.mindrot.org/openssh.git/commit/?id=d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
Forwarded: not-needed
Last-Update: 2015-08-19

Patch-Name: backport-do-not-resend-username-to-pam.patch
---
 monitor.c      | 2 --
 monitor_wrap.c | 1 -
 2 files changed, 3 deletions(-)

diff --git a/monitor.c b/monitor.c
index 12ed6fd..870a6b9 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1143,9 +1143,7 @@ extern KbdintDevice sshpam_device;
 int
 mm_answer_pam_init_ctx(int sock, Buffer *m)
 {
-
 	debug3("%s", __func__);
-	authctxt->user = buffer_get_string(m, NULL);
 	sshpam_ctxt = (sshpam_device.init_ctx)(authctxt);
 	sshpam_authok = NULL;
 	buffer_clear(m);
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 2a0fe9b..e2fcf75 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -632,7 +632,6 @@ mm_sshpam_init_ctx(Authctxt *authctxt)
 
 	debug3("%s", __func__);
 	buffer_init(&m);
-	buffer_put_cstring(&m, authctxt->user);
 	mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_INIT_CTX, &m);
 	debug3("%s: waiting for MONITOR_ANS_PAM_INIT_CTX", __func__);
 	mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_INIT_CTX, &m);