mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 04:40:53 +07:00
Don't ignore errors on encrypting password in SMBTcon
Although unlikely to fail (and tree connect does not commonly send a password since SECMODE_USER is the default for most servers) do not ignore errors on SMBNTEncrypt in SMB Tree Connect. Reported by Coverity (CID 1226853) Signed-off-by: Steve French <smfrench@gmail.com> Acked-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Acked-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
This commit is contained in:
parent
75fdfc849a
commit
f3a31a2bbb
@ -3696,6 +3696,12 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses,
|
||||
#endif /* CIFS_WEAK_PW_HASH */
|
||||
rc = SMBNTencrypt(tcon->password, ses->server->cryptkey,
|
||||
bcc_ptr, nls_codepage);
|
||||
if (rc) {
|
||||
cifs_dbg(FYI, "%s Can't generate NTLM rsp. Error: %d\n",
|
||||
__func__, rc);
|
||||
cifs_buf_release(smb_buffer);
|
||||
return rc;
|
||||
}
|
||||
|
||||
bcc_ptr += CIFS_AUTH_RESP_SIZE;
|
||||
if (ses->capabilities & CAP_UNICODE) {
|
||||
|
Loading…
Reference in New Issue
Block a user