summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharath SM <bharathsm@microsoft.com>2025-03-17 15:57:27 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-27 11:11:41 +0100
commit9411a9909e9dac48b9560a6dbba95048d1895d58 (patch)
treeae9b3be8b12b185a98304fc487698db358e5d322
parent3c44ebad5aed3c64c7421908f7ee7c82dac6bc6d (diff)
smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels
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>
-rw-r--r--fs/smb/client/sess.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
index d4f4145802cf..10d82d0dc6a9 100644
--- a/fs/smb/client/sess.c
+++ b/fs/smb/client/sess.c
@@ -526,8 +526,7 @@ cifs_ses_add_channel(struct cifs_ses *ses,
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;