From 777253458775aab7eccc00bda846ffa999d26009 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Thu, 22 Jan 2026 17:39:19 -0600 Subject: [PATCH] krb5: Add missing hunk for #1204 (fix #1305) --- lib/krb5/changepw.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/krb5/changepw.c b/lib/krb5/changepw.c index d040380c2..cf4c631c0 100644 --- a/lib/krb5/changepw.c +++ b/lib/krb5/changepw.c @@ -650,9 +650,23 @@ change_password_loop (krb5_context context, continue; } - ret = krb5_krbhst_get_addrinfo(context, hi, &ai); - if (ret) - continue; + if (context->socks4a_proxy) { + /* + * Refuse anything but TCP connections when we have a + * SOCKS4a proxy configured. + */ + if (hi->proto != KRB5_KRBHST_TCP) + continue; + + /* + * Make a connection to the proxy's addrinfo. + */ + ai = proxy_ai; + } else { + ret = krb5_krbhst_get_addrinfo(context, hi, &ai); + if (ret) + continue; + } for (a = ai; !done && a != NULL; a = a->ai_next) { int replied = 0;