summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharath SM <bharathsm@microsoft.com>2025-03-17 15:57:27 +0530
committerSteve French <stfrench@microsoft.com>2025-06-18 13:27:45 -0500
commit306cb65bb0cb243389fcbd0a66907d5bdea07d1e (patch)
treec62e2c2601142b749a3c44711c0a8b04892129fb
parente04c78d86a9699d136910cfc0bdcf01087e3267e (diff)
smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels
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>
-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 ec0db32c7d98..330bc3d25bad 100644
--- a/fs/smb/client/sess.c
+++ b/fs/smb/client/sess.c
@@ -498,8 +498,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;