aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsencrypt.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2012-01-18 23:32:33 -0500
committerSteve French <sfrench@us.ibm.com>2012-01-18 23:32:33 -0500
commitacbbb76a26648dfae6fed0989879e40d75692bfc (patch)
tree509620f02e6d86444ea426bc188ba943381e5815 /fs/cifs/cifsencrypt.c
parentc56001879bc091eee0c7a8e6e94ea0bea63c3012 (diff)
CIFS: Rename *UCS* functions to *UTF16*
to reflect the unicode encoding used by CIFS protocol. Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Acked-by: Jeff Layton <jlayton@samba.org> Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Diffstat (limited to 'fs/cifs/cifsencrypt.c')
-rw-r--r--fs/cifs/cifsencrypt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index bce99e6a4950..63c460e503b6 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -327,7 +327,7 @@ build_avpair_blob(struct cifs_ses *ses, const struct nls_table *nls_cp)
327 attrptr->type = cpu_to_le16(NTLMSSP_AV_NB_DOMAIN_NAME); 327 attrptr->type = cpu_to_le16(NTLMSSP_AV_NB_DOMAIN_NAME);
328 attrptr->length = cpu_to_le16(2 * dlen); 328 attrptr->length = cpu_to_le16(2 * dlen);
329 blobptr = (unsigned char *)attrptr + sizeof(struct ntlmssp2_name); 329 blobptr = (unsigned char *)attrptr + sizeof(struct ntlmssp2_name);
330 cifs_strtoUCS((__le16 *)blobptr, ses->domainName, dlen, nls_cp); 330 cifs_strtoUTF16((__le16 *)blobptr, ses->domainName, dlen, nls_cp);
331 331
332 return 0; 332 return 0;
333} 333}
@@ -376,7 +376,7 @@ find_domain_name(struct cifs_ses *ses, const struct nls_table *nls_cp)
376 kmalloc(attrsize + 1, GFP_KERNEL); 376 kmalloc(attrsize + 1, GFP_KERNEL);
377 if (!ses->domainName) 377 if (!ses->domainName)
378 return -ENOMEM; 378 return -ENOMEM;
379 cifs_from_ucs2(ses->domainName, 379 cifs_from_utf16(ses->domainName,
380 (__le16 *)blobptr, attrsize, attrsize, 380 (__le16 *)blobptr, attrsize, attrsize,
381 nls_cp, false); 381 nls_cp, false);
382 break; 382 break;
@@ -429,7 +429,7 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
429 } 429 }
430 430
431 if (len) { 431 if (len) {
432 len = cifs_strtoUCS((__le16 *)user, ses->user_name, len, nls_cp); 432 len = cifs_strtoUTF16((__le16 *)user, ses->user_name, len, nls_cp);
433 UniStrupr(user); 433 UniStrupr(user);
434 } else { 434 } else {
435 memset(user, '\0', 2); 435 memset(user, '\0', 2);
@@ -453,8 +453,8 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
453 rc = -ENOMEM; 453 rc = -ENOMEM;
454 return rc; 454 return rc;
455 } 455 }
456 len = cifs_strtoUCS((__le16 *)domain, ses->domainName, len, 456 len = cifs_strtoUTF16((__le16 *)domain, ses->domainName, len,
457 nls_cp); 457 nls_cp);
458 rc = 458 rc =
459 crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash, 459 crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash,
460 (char *)domain, 2 * len); 460 (char *)domain, 2 * len);
@@ -473,7 +473,7 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
473 rc = -ENOMEM; 473 rc = -ENOMEM;
474 return rc; 474 return rc;
475 } 475 }
476 len = cifs_strtoUCS((__le16 *)server, ses->serverName, len, 476 len = cifs_strtoUTF16((__le16 *)server, ses->serverName, len,
477 nls_cp); 477 nls_cp);
478 rc = 478 rc =
479 crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash, 479 crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash,