diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-12-05 20:41:21 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-12-25 21:29:11 -0500 |
commit | 4e53a3fb98d3d5c2941d2e7199dab317a9d4ead3 (patch) | |
tree | c3485a826f33e4b6f18b603a475a1bfef7bb7986 /fs/cifs/connect.c | |
parent | 55162dec9371a6f6ac63ff546c182cc6144a649e (diff) |
cifs: have calc_lanman_hash take more granular args
cifs: have calc_lanman_hash take more granular args
We need to use this routine to encrypt passwords associated with the
tcon too. Don't assume that the password will be attached to the
smb_session.
Also, make some of the values in the lower encryption functions
const since they aren't changed.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 6107ee42b093..3a84a375cb6f 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -3533,7 +3533,10 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
3533 | #ifdef CONFIG_CIFS_WEAK_PW_HASH | 3533 | #ifdef CONFIG_CIFS_WEAK_PW_HASH |
3534 | if ((extended_security & CIFSSEC_MAY_LANMAN) && | 3534 | if ((extended_security & CIFSSEC_MAY_LANMAN) && |
3535 | (ses->server->secType == LANMAN)) | 3535 | (ses->server->secType == LANMAN)) |
3536 | calc_lanman_hash(ses, bcc_ptr); | 3536 | calc_lanman_hash(ses->password, ses->server->cryptKey, |
3537 | ses->server->secMode & | ||
3538 | SECMODE_PW_ENCRYPT ? true : false, | ||
3539 | bcc_ptr); | ||
3537 | else | 3540 | else |
3538 | #endif /* CIFS_WEAK_PW_HASH */ | 3541 | #endif /* CIFS_WEAK_PW_HASH */ |
3539 | SMBNTencrypt(ses->password, | 3542 | SMBNTencrypt(ses->password, |