[PATCH 3/3] smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Bharath SM <bharathsm@xxxxxxxxxxxxx>
Reported-by: xfuren <xfuren@xxxxxxxxx>
Link: https://bugzilla.samba.org/show_bug.cgi?id=15824
---
 fs/smb/client/sess.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c
index b45b46b1b792..f2ab8513c3ed 100644
--- a/fs/smb/client/sess.c
+++ b/fs/smb/client/sess.c
@@ -494,8 +494,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;
-- 
2.43.0





[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux