]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Mar 2025 19:54:25 +0000 (12:54 -0700)
commitb9004fe6887885afd46d44b2bb80b23639ef076b
treea77d5c24b7aa42ba06b244dbbca6e8253054ea13
parent9721f3a79345926d856a862d4fa507d5cd2785e9
smb: client: fix regression with guest option

commit fc99045effa81fdf509c2a97cbb7e6e8f2fd4443 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/fs_context.c