]> www.infradead.org Git - users/hch/misc.git/commit
smb: client: fix regression with guest option
authorPaulo Alcantara <pc@manguebit.com>
Wed, 12 Mar 2025 13:51:31 +0000 (10:51 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 13 Mar 2025 13:40:24 +0000 (08:40 -0500)
commitfc99045effa81fdf509c2a97cbb7e6e8f2fd4443
treeaf73a611917067242d622645eba5808e644644cb
parent80e54e84911a923c40d7bee33a34c1b4be148d7a
smb: client: fix regression with guest option

When mounting a CIFS share with 'guest' mount option, mount.cifs(8)
will set empty password= and password2= options.  Currently we only
handle empty strings from user= and password= options, so the mount
will fail with

cifs: Bad value for 'password2'

Fix this by handling empty string from password2= option as well.

Link: https://bbs.archlinux.org/viewtopic.php?id=303927
Reported-by: Adam Williamson <awilliam@redhat.com>
Closes: https://lore.kernel.org/r/83c00b5fea81c07f6897a5dd3ef50fd3b290f56c.camel@redhat.com
Fixes: 35f834265e0d ("smb3: fix broken reconnect when password changing on the server by allowing password rotation")
Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/fs_context.c