hmac_md5_final(ses->mac_signing_key,&ctx); 
hmac_md5_final(ses->server->mac_signing_key,&ctx); 
int CalcNTLMv2_partial_mac_key(struct cifsSesInfo * ses, struct nls_table * nls_info){	char temp_hash[16];	struct HMACMD5Context ctx;	char * ucase_buf;	wchar_t * unicode_buf;	unsigned int i,user_name_len,dom_name_len;	if(ses == NULL)		return -EINVAL;	E_md4hash(ses->password, temp_hash);	hmac_md5_init_limK_to_64(temp_hash, 16, &ctx);	user_name_len = strlen(ses->userName);	if(user_name_len > MAX_USERNAME_SIZE)		return -EINVAL;	dom_name_len = strlen(ses->domainName);	if(dom_name_len > MAX_USERNAME_SIZE)		return -EINVAL;  	ucase_buf = kmalloc((MAX_USERNAME_SIZE+1), GFP_KERNEL);	if(ucase_buf == NULL)		return -ENOMEM;	unicode_buf = kmalloc((MAX_USERNAME_SIZE+1)*4, GFP_KERNEL);	if(unicode_buf == NULL) {		kfree(ucase_buf);		return -ENOMEM;	}   	for(i=0;i<user_name_len;i++)		ucase_buf[i] = nls_info->charset2upper[(int)ses->userName[i]];	ucase_buf[i] = 0;	user_name_len = cifs_strtoUCS(unicode_buf, ucase_buf, MAX_USERNAME_SIZE*2, nls_info);	unicode_buf[user_name_len] = 0;	user_name_len++;	for(i=0;i<dom_name_len;i++)		ucase_buf[i] = nls_info->charset2upper[(int)ses->domainName[i]];	ucase_buf[i] = 0;	dom_name_len = cifs_strtoUCS(unicode_buf+user_name_len, ucase_buf, MAX_USERNAME_SIZE*2, nls_info);	unicode_buf[user_name_len + dom_name_len] = 0;	hmac_md5_update((const unsigned char *) unicode_buf,		(user_name_len+dom_name_len)*2,&ctx);	hmac_md5_final(ses->mac_signing_key,&ctx);	kfree(ucase_buf);	kfree(unicode_buf);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ad009ac96509e005d9978d0ae9e9ec4d63ad2990/cifsencrypt.c/buggy/fs/cifs/cifsencrypt.c