diff options
author | Steve French <smfrench@gmail.com> | 2015-03-26 20:23:20 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2015-04-01 01:01:46 -0400 |
commit | f3a31a2bbbfe22db0313a4e270c7ba91baa7b630 (patch) | |
tree | 13b3fcfd35466602e87ecea7c9ff73099ce47852 /fs | |
parent | 75fdfc849ae0636853add4b7dbdc5753160ad0cb (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/connect.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 4cb8450e081b..cdb1aaf295b1 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -3696,6 +3696,12 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses, | |||
3696 | #endif /* CIFS_WEAK_PW_HASH */ | 3696 | #endif /* CIFS_WEAK_PW_HASH */ |
3697 | rc = SMBNTencrypt(tcon->password, ses->server->cryptkey, | 3697 | rc = SMBNTencrypt(tcon->password, ses->server->cryptkey, |
3698 | bcc_ptr, nls_codepage); | 3698 | bcc_ptr, nls_codepage); |
3699 | if (rc) { | ||
3700 | cifs_dbg(FYI, "%s Can't generate NTLM rsp. Error: %d\n", | ||
3701 | __func__, rc); | ||
3702 | cifs_buf_release(smb_buffer); | ||
3703 | return rc; | ||
3704 | } | ||
3699 | 3705 | ||
3700 | bcc_ptr += CIFS_AUTH_RESP_SIZE; | 3706 | bcc_ptr += CIFS_AUTH_RESP_SIZE; |
3701 | if (ses->capabilities & CAP_UNICODE) { | 3707 | if (ses->capabilities & CAP_UNICODE) { |