aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smbdes.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-12-05 20:41:21 -0500
committerSteve French <sfrench@us.ibm.com>2008-12-25 21:29:11 -0500
commit4e53a3fb98d3d5c2941d2e7199dab317a9d4ead3 (patch)
treec3485a826f33e4b6f18b603a475a1bfef7bb7986 /fs/cifs/smbdes.c
parent55162dec9371a6f6ac63ff546c182cc6144a649e (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/smbdes.c')
-rw-r--r--fs/cifs/smbdes.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/smbdes.c b/fs/cifs/smbdes.c
index 04943c976f98..224a1f478966 100644
--- a/fs/cifs/smbdes.c
+++ b/fs/cifs/smbdes.c
@@ -318,7 +318,8 @@ str_to_key(unsigned char *str, unsigned char *key)
318} 318}
319 319
320static void 320static void
321smbhash(unsigned char *out, unsigned char *in, unsigned char *key, int forw) 321smbhash(unsigned char *out, const unsigned char *in, unsigned char *key,
322 int forw)
322{ 323{
323 int i; 324 int i;
324 char *outb; /* outb[64] */ 325 char *outb; /* outb[64] */
@@ -363,7 +364,7 @@ E_P16(unsigned char *p14, unsigned char *p16)
363} 364}
364 365
365void 366void
366E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24) 367E_P24(unsigned char *p21, const unsigned char *c8, unsigned char *p24)
367{ 368{
368 smbhash(p24, c8, p21, 1); 369 smbhash(p24, c8, p21, 1);
369 smbhash(p24 + 8, c8, p21 + 7, 1); 370 smbhash(p24 + 8, c8, p21 + 7, 1);