aboutsummaryrefslogtreecommitdiffstats
path: root/queue-6.12/smb-fix-secondary-channel-creation-issue-with-kerberos-by-populating-hostname-when-adding-channels.patch
diff options
Diffstat (limited to 'queue-6.12/smb-fix-secondary-channel-creation-issue-with-kerberos-by-populating-hostname-when-adding-channels.patch')
-rw-r--r--queue-6.12/smb-fix-secondary-channel-creation-issue-with-kerberos-by-populating-hostname-when-adding-channels.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/queue-6.12/smb-fix-secondary-channel-creation-issue-with-kerberos-by-populating-hostname-when-adding-channels.patch b/queue-6.12/smb-fix-secondary-channel-creation-issue-with-kerberos-by-populating-hostname-when-adding-channels.patch
new file mode 100644
index 0000000000..8f8ea5f1a1
--- /dev/null
+++ b/queue-6.12/smb-fix-secondary-channel-creation-issue-with-kerberos-by-populating-hostname-when-adding-channels.patch
@@ -0,0 +1,40 @@
+From 306cb65bb0cb243389fcbd0a66907d5bdea07d1e Mon Sep 17 00:00:00 2001
+From: Bharath SM <bharathsm@microsoft.com>
+Date: Mon, 17 Mar 2025 15:57:27 +0530
+Subject: smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels
+
+From: Bharath SM <bharathsm@microsoft.com>
+
+commit 306cb65bb0cb243389fcbd0a66907d5bdea07d1e upstream.
+
+When mounting a share with kerberos authentication with multichannel
+support, share mounts correctly, but fails to create secondary
+channels. This occurs because the hostname is not populated when
+adding the channels. The hostname is necessary for the userspace
+cifs.upcall program to retrieve the required credentials and pass
+it back to kernel, without hostname secondary channels fails
+establish.
+
+Cc: stable@vger.kernel.org
+Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
+Signed-off-by: Bharath SM <bharathsm@microsoft.com>
+Reported-by: xfuren <xfuren@gmail.com>
+Link: https://bugzilla.samba.org/show_bug.cgi?id=15824
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/smb/client/sess.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/fs/smb/client/sess.c
++++ b/fs/smb/client/sess.c
+@@ -526,8 +526,7 @@ cifs_ses_add_channel(struct cifs_ses *se
+ ctx->domainauto = ses->domainAuto;
+ ctx->domainname = ses->domainName;
+
+- /* no hostname for extra channels */
+- ctx->server_hostname = "";
++ ctx->server_hostname = ses->server->hostname;
+
+ ctx->username = ses->user_name;
+ ctx->password = ses->password;