Changeset 752 for trunk/server/libcli/auth/ntlm_check.c
- Timestamp:
- Nov 29, 2012, 2:06:31 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 746,748
- Property svn:mergeinfo changed
-
trunk/server/libcli/auth/ntlm_check.c
r745 r752 88 88 const DATA_BLOB *sec_blob, 89 89 const char *user, const char *domain, 90 bool upper_case_domain, /* should the domain be transformed into upper case? */91 90 DATA_BLOB *user_sess_key) 92 91 { … … 123 122 */ 124 123 125 if (!ntv2_owf_gen(part_passwd, user, domain, upper_case_domain,kr)) {124 if (!ntv2_owf_gen(part_passwd, user, domain, kr)) { 126 125 return false; 127 126 } … … 162 161 const DATA_BLOB *sec_blob, 163 162 const char *user, const char *domain, 164 bool upper_case_domain, /* should the domain be transformed into upper case? */165 163 DATA_BLOB *user_sess_key) 166 164 { … … 193 191 client_key_data = data_blob_talloc(mem_ctx, ntv2_response->data+16, ntv2_response->length-16); 194 192 195 if (!ntv2_owf_gen(part_passwd, user, domain, upper_case_domain,kr)) {193 if (!ntv2_owf_gen(part_passwd, user, domain, kr)) { 196 194 return false; 197 195 } … … 298 296 const static uint8_t zeros[8]; 299 297 DATA_BLOB tmp_sess_key; 298 const char *upper_client_domain = NULL; 299 300 if (client_domain != NULL) { 301 upper_client_domain = talloc_strdup_upper(mem_ctx, client_domain); 302 if (upper_client_domain == NULL) { 303 return NT_STATUS_NO_MEMORY; 304 } 305 } 300 306 301 307 if (stored_nt == NULL) { … … 349 355 use it 350 356 */ 351 DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with domain [%s]\n", client_domain)); 357 DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with domain [%s]\n", 358 client_domain ? client_domain : "<NULL>")); 352 359 if (smb_pwd_check_ntlmv2(mem_ctx, 353 360 nt_response, … … 355 362 client_username, 356 363 client_domain, 357 false,358 364 user_sess_key)) { 359 365 if (user_sess_key->length) { … … 363 369 } 364 370 365 DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with uppercased version of domain [%s]\n", client_domain)); 371 DEBUG(4,("ntlm_password_check: Checking NTLMv2 password with uppercased version of domain [%s]\n", 372 upper_client_domain ? upper_client_domain : "<NULL>")); 366 373 if (smb_pwd_check_ntlmv2(mem_ctx, 367 374 nt_response, 368 375 stored_nt->hash, challenge, 369 376 client_username, 370 client_domain, 371 true, 377 upper_client_domain, 372 378 user_sess_key)) { 373 379 if (user_sess_key->length) { … … 383 389 client_username, 384 390 "", 385 false,386 391 user_sess_key)) { 387 392 if (user_sess_key->length) { … … 471 476 - related to Win9X, legacy NAS pass-though authentication 472 477 */ 473 DEBUG(4,("ntlm_password_check: Checking LMv2 password with domain %s\n", client_domain)); 478 DEBUG(4,("ntlm_password_check: Checking LMv2 password with domain %s\n", 479 client_domain ? client_domain : "<NULL>")); 474 480 if (smb_pwd_check_ntlmv2(mem_ctx, 475 481 lm_response, … … 477 483 client_username, 478 484 client_domain, 479 false,480 485 &tmp_sess_key)) { 481 486 if (nt_response->length > 24) { … … 489 494 client_username, 490 495 client_domain, 491 false,492 496 user_sess_key); 493 497 } else { … … 501 505 } 502 506 503 DEBUG(4,("ntlm_password_check: Checking LMv2 password with upper-cased version of domain %s\n", client_domain)); 507 DEBUG(4,("ntlm_password_check: Checking LMv2 password with upper-cased version of domain %s\n", 508 upper_client_domain ? upper_client_domain : "<NULL>")); 504 509 if (smb_pwd_check_ntlmv2(mem_ctx, 505 510 lm_response, 506 511 stored_nt->hash, challenge, 507 512 client_username, 508 client_domain, 509 true, 513 upper_client_domain, 510 514 &tmp_sess_key)) { 511 515 if (nt_response->length > 24) { … … 518 522 stored_nt->hash, challenge, 519 523 client_username, 520 client_domain, 521 true, 524 upper_client_domain, 522 525 user_sess_key); 523 526 } else { … … 537 540 client_username, 538 541 "", 539 false,540 542 &tmp_sess_key)) { 541 543 if (nt_response->length > 24) { … … 549 551 client_username, 550 552 "", 551 false,552 553 user_sess_key); 553 554 } else {
Note:
See TracChangeset
for help on using the changeset viewer.