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>
此提交包含在:
Jeff Layton
2008-12-05 20:41:21 -05:00
提交者 Steve French
父節點 55162dec93
當前提交 4e53a3fb98
共有 7 個檔案被更改,包括 33 行新增25 行删除

查看文件

@@ -318,7 +318,8 @@ str_to_key(unsigned char *str, unsigned char *key)
}
static void
smbhash(unsigned char *out, unsigned char *in, unsigned char *key, int forw)
smbhash(unsigned char *out, const unsigned char *in, unsigned char *key,
int forw)
{
int i;
char *outb; /* outb[64] */
@@ -363,7 +364,7 @@ E_P16(unsigned char *p14, unsigned char *p16)
}
void
E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24)
E_P24(unsigned char *p21, const unsigned char *c8, unsigned char *p24)
{
smbhash(p24, c8, p21, 1);
smbhash(p24 + 8, c8, p21 + 7, 1);