Skip to content

Commit 2f6f19c

Browse files
Ronnie Sahlbergsmfrench
authored andcommitted
cifs: fix regression in very old smb1 mounts
BZ: 215375 Fixes: 76a3c92 ("cifs: remove support for NTLM and weaker authentication algorithms") Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 780614c commit 2f6f19c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

fs/cifs/connect.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3922,12 +3922,11 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses,
39223922
pSMB->AndXCommand = 0xFF;
39233923
pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO);
39243924
bcc_ptr = &pSMB->Password[0];
3925-
if (tcon->pipe || (ses->server->sec_mode & SECMODE_USER)) {
3926-
pSMB->PasswordLength = cpu_to_le16(1); /* minimum */
3927-
*bcc_ptr = 0; /* password is null byte */
3928-
bcc_ptr++; /* skip password */
3929-
/* already aligned so no need to do it below */
3930-
}
3925+
3926+
pSMB->PasswordLength = cpu_to_le16(1); /* minimum */
3927+
*bcc_ptr = 0; /* password is null byte */
3928+
bcc_ptr++; /* skip password */
3929+
/* already aligned so no need to do it below */
39313930

39323931
if (ses->server->sign)
39333932
smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;

0 commit comments

Comments
 (0)