aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsencrypt.c
diff options
context:
space:
mode:
authorCyril Gorcunov <gorcunov@gmail.com>2007-10-14 13:58:43 -0400
committerSteve French <sfrench@us.ibm.com>2007-10-14 13:58:43 -0400
commit8f2376adfb57d95973b64ecdf016937f436b9bf0 (patch)
tree830a7f20af90be883a684fddc71a18f7c11df2b6 /fs/cifs/cifsencrypt.c
parent516897a208bc1423d561ce2ccce0624c3b652275 (diff)
[CIFS] Fix endian conversion problem in posix mkdir
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsencrypt.c')
-rw-r--r--fs/cifs/cifsencrypt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index 36272293027d..632070b4275d 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -345,7 +345,7 @@ static int calc_ntlmv2_hash(struct cifsSesInfo *ses,
345 user = kmalloc(2 + (len * 2), GFP_KERNEL); 345 user = kmalloc(2 + (len * 2), GFP_KERNEL);
346 if (user == NULL) 346 if (user == NULL)
347 goto calc_exit_2; 347 goto calc_exit_2;
348 len = cifs_strtoUCS(user, ses->userName, len, nls_cp); 348 len = cifs_strtoUCS((__le16 *)user, ses->userName, len, nls_cp);
349 UniStrupr(user); 349 UniStrupr(user);
350 hmac_md5_update((char *)user, 2*len, pctxt); 350 hmac_md5_update((char *)user, 2*len, pctxt);
351 351
@@ -356,7 +356,8 @@ static int calc_ntlmv2_hash(struct cifsSesInfo *ses,
356 domain = kmalloc(2 + (len * 2), GFP_KERNEL); 356 domain = kmalloc(2 + (len * 2), GFP_KERNEL);
357 if (domain == NULL) 357 if (domain == NULL)
358 goto calc_exit_1; 358 goto calc_exit_1;
359 len = cifs_strtoUCS(domain, ses->domainName, len, nls_cp); 359 len = cifs_strtoUCS((__le16 *)domain, ses->domainName, len,
360 nls_cp);
360 /* the following line was removed since it didn't work well 361 /* the following line was removed since it didn't work well
361 with lower cased domain name that passed as an option. 362 with lower cased domain name that passed as an option.
362 Maybe converting the domain name earlier makes sense */ 363 Maybe converting the domain name earlier makes sense */