Changeset 587 for vendor/current/libcli
- Timestamp:
- Jun 29, 2011, 7:36:41 AM (14 years ago)
- Location:
- vendor/current/libcli/auth
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/libcli/auth/credentials.c
r414 r587 25 25 #include "../lib/crypto/crypto.h" 26 26 #include "libcli/auth/libcli_auth.h" 27 #include "../libcli/security/dom_sid.h" 27 28 28 29 static void netlogon_creds_step_crypt(struct netlogon_creds_CredentialState *creds, … … 203 204 uint32_t negotiate_flags) 204 205 { 205 struct netlogon_creds_CredentialState *creds = talloc (mem_ctx, struct netlogon_creds_CredentialState);206 struct netlogon_creds_CredentialState *creds = talloc_zero(mem_ctx, struct netlogon_creds_CredentialState); 206 207 207 208 if (!creds) { … … 454 455 } 455 456 457 /* 458 copy a netlogon_creds_CredentialState struct 459 */ 460 461 struct netlogon_creds_CredentialState *netlogon_creds_copy(TALLOC_CTX *mem_ctx, 462 struct netlogon_creds_CredentialState *creds_in) 463 { 464 struct netlogon_creds_CredentialState *creds = talloc_zero(mem_ctx, struct netlogon_creds_CredentialState); 465 466 if (!creds) { 467 return NULL; 468 } 469 470 creds->sequence = creds_in->sequence; 471 creds->negotiate_flags = creds_in->negotiate_flags; 472 creds->secure_channel_type = creds_in->secure_channel_type; 473 474 creds->computer_name = talloc_strdup(creds, creds_in->computer_name); 475 if (!creds->computer_name) { 476 talloc_free(creds); 477 return NULL; 478 } 479 creds->account_name = talloc_strdup(creds, creds_in->account_name); 480 if (!creds->account_name) { 481 talloc_free(creds); 482 return NULL; 483 } 484 485 if (creds_in->sid) { 486 creds->sid = dom_sid_dup(creds, creds_in->sid); 487 if (!creds->sid) { 488 talloc_free(creds); 489 return NULL; 490 } 491 } 492 493 memcpy(creds->session_key, creds_in->session_key, sizeof(creds->session_key)); 494 memcpy(creds->seed.data, creds_in->seed.data, sizeof(creds->seed.data)); 495 memcpy(creds->client.data, creds_in->client.data, sizeof(creds->client.data)); 496 memcpy(creds->server.data, creds_in->server.data, sizeof(creds->server.data)); 497 498 return creds; 499 } -
vendor/current/libcli/auth/proto.h
r414 r587 36 36 bool netlogon_creds_client_check(struct netlogon_creds_CredentialState *creds, 37 37 const struct netr_Credential *received_credentials); 38 struct netlogon_creds_CredentialState *netlogon_creds_copy(TALLOC_CTX *mem_ctx, 39 struct netlogon_creds_CredentialState *creds_in); 38 40 39 41 /*****************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.