Changeset 740 for vendor/current/source3/rpc_client/cli_lsarpc.c
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified vendor/current/source3/rpc_client/cli_lsarpc.c ¶
r414 r740 24 24 25 25 #include "includes.h" 26 #include "../librpc/gen_ndr/cli_lsa.h" 26 #include "rpc_client/rpc_client.h" 27 #include "../librpc/gen_ndr/ndr_lsa_c.h" 28 #include "rpc_client/cli_lsarpc.h" 29 #include "rpc_client/init_lsa.h" 30 #include "../libcli/security/security.h" 27 31 28 32 /** @defgroup lsa LSA - Local Security Architecture … … 39 43 **/ 40 44 41 /** Open a LSA policy handle 42 * 43 * @param cli Handle on an initialised SMB connection */ 44 45 NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli, 45 NTSTATUS dcerpc_lsa_open_policy(struct dcerpc_binding_handle *h, 46 46 TALLOC_CTX *mem_ctx, 47 bool sec_qos, uint32 des_access, 48 struct policy_handle *pol) 47 bool sec_qos, 48 uint32_t des_access, 49 struct policy_handle *pol, 50 NTSTATUS *result) 49 51 { 50 52 struct lsa_ObjectAttribute attr; … … 65 67 } 66 68 67 return rpccli_lsa_OpenPolicy(cli, mem_ctx, 69 return dcerpc_lsa_OpenPolicy(h, 70 mem_ctx, 68 71 &system_name, 69 72 &attr, 70 73 des_access, 71 pol); 74 pol, 75 result); 72 76 } 73 77 74 78 /** Open a LSA policy handle 75 * 76 * @param cli Handle on an initialised SMB connection 77 */ 78 79 NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli, 80 TALLOC_CTX *mem_ctx, bool sec_qos, 81 uint32 des_access, struct policy_handle *pol) 79 * 80 * @param cli Handle on an initialised SMB connection */ 81 82 NTSTATUS rpccli_lsa_open_policy(struct rpc_pipe_client *cli, 83 TALLOC_CTX *mem_ctx, 84 bool sec_qos, uint32 des_access, 85 struct policy_handle *pol) 86 { 87 NTSTATUS status; 88 NTSTATUS result = NT_STATUS_UNSUCCESSFUL; 89 90 status = dcerpc_lsa_open_policy(cli->binding_handle, 91 mem_ctx, 92 sec_qos, 93 des_access, 94 pol, 95 &result); 96 if (!NT_STATUS_IS_OK(status)) { 97 return status; 98 } 99 100 return result; 101 } 102 103 NTSTATUS dcerpc_lsa_open_policy2(struct dcerpc_binding_handle *h, 104 TALLOC_CTX *mem_ctx, 105 const char *srv_name_slash, 106 bool sec_qos, 107 uint32_t des_access, 108 struct policy_handle *pol, 109 NTSTATUS *result) 82 110 { 83 111 struct lsa_ObjectAttribute attr; … … 97 125 } 98 126 99 return rpccli_lsa_OpenPolicy2(cli, mem_ctx, 100 cli->srv_name_slash, 127 return dcerpc_lsa_OpenPolicy2(h, 128 mem_ctx, 129 srv_name_slash, 101 130 &attr, 102 131 des_access, 103 pol); 132 pol, 133 result); 134 } 135 136 /** Open a LSA policy handle 137 * 138 * @param cli Handle on an initialised SMB connection 139 */ 140 141 NTSTATUS rpccli_lsa_open_policy2(struct rpc_pipe_client *cli, 142 TALLOC_CTX *mem_ctx, bool sec_qos, 143 uint32 des_access, struct policy_handle *pol) 144 { 145 NTSTATUS status; 146 NTSTATUS result = NT_STATUS_UNSUCCESSFUL; 147 148 status = dcerpc_lsa_open_policy2(cli->binding_handle, 149 mem_ctx, 150 cli->srv_name_slash, 151 sec_qos, 152 des_access, 153 pol, 154 &result); 155 if (!NT_STATUS_IS_OK(status)) { 156 return status; 157 } 158 159 return result; 104 160 } 105 161 … … 107 163 * 108 164 * internal version withOUT memory allocation of the target arrays. 109 * this assumes suff ciently sized arrays to store domains, names and types. */110 111 static NTSTATUS rpccli_lsa_lookup_sids_noalloc(struct rpc_pipe_client *cli,165 * this assumes sufficiently sized arrays to store domains, names and types. */ 166 167 static NTSTATUS dcerpc_lsa_lookup_sids_noalloc(struct dcerpc_binding_handle *h, 112 168 TALLOC_CTX *mem_ctx, 113 169 struct policy_handle *pol, 114 170 int num_sids, 115 const DOM_SID*sids,171 const struct dom_sid *sids, 116 172 char **domains, 117 173 char **names, 118 174 enum lsa_SidType *types, 119 bool use_lookupsids3 )120 { 121 NTSTATUS result = NT_STATUS_OK; 122 TALLOC_CTX *tmp_ctx = NULL;123 int i;175 bool use_lookupsids3, 176 NTSTATUS *presult) 177 { 178 NTSTATUS status = NT_STATUS_OK; 179 NTSTATUS result = NT_STATUS_UNSUCCESSFUL; 124 180 struct lsa_SidArray sid_array; 125 181 struct lsa_RefDomainList *ref_domains = NULL; 126 182 struct lsa_TransNameArray lsa_names; 183 enum lsa_LookupNamesLevel level = LSA_LOOKUP_NAMES_ALL; 127 184 uint32_t count = 0; 128 uint16_t level = 1;185 int i; 129 186 130 187 ZERO_STRUCT(lsa_names); 131 132 tmp_ctx = talloc_new(mem_ctx);133 if (!tmp_ctx) {134 DEBUG(0, ("rpccli_lsa_lookup_sids_noalloc: out of memory!\n"));135 result = NT_STATUS_UNSUCCESSFUL;136 goto done;137 }138 188 139 189 sid_array.num_sids = num_sids; 140 190 sid_array.sids = TALLOC_ARRAY(mem_ctx, struct lsa_SidPtr, num_sids); 141 if ( !sid_array.sids) {191 if (sid_array.sids == NULL) { 142 192 return NT_STATUS_NO_MEMORY; 143 193 } 144 194 145 195 for (i = 0; i<num_sids; i++) { 146 sid_array.sids[i].sid = sid_dup_talloc(mem_ctx, &sids[i]);196 sid_array.sids[i].sid = dom_sid_dup(mem_ctx, &sids[i]); 147 197 if (!sid_array.sids[i].sid) { 148 198 return NT_STATUS_NO_MEMORY; … … 156 206 ZERO_STRUCT(lsa_names2); 157 207 158 result = rpccli_lsa_LookupSids3(cli, mem_ctx, 208 status = dcerpc_lsa_LookupSids3(h, 209 mem_ctx, 159 210 &sid_array, 160 211 &ref_domains, … … 162 213 level, 163 214 &count, 164 0, 165 0); 166 167 if (!NT_STATUS_IS_ERR(result)) { 168 lsa_names.count = lsa_names2.count; 169 lsa_names.names = talloc_array(mem_ctx, struct lsa_TranslatedName, lsa_names.count); 170 if (!lsa_names.names) { 215 LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES, 216 LSA_CLIENT_REVISION_2, 217 &result); 218 if (!NT_STATUS_IS_OK(status)) { 219 return status; 220 } 221 222 if(!NT_STATUS_IS_ERR(result)) { 223 lsa_names.count = lsa_names2.count; 224 lsa_names.names = talloc_array(mem_ctx, 225 struct lsa_TranslatedName, 226 lsa_names.count); 227 if (lsa_names.names == NULL) { 171 228 return NT_STATUS_NO_MEMORY; 172 229 } … … 179 236 180 237 } else { 181 result = rpccli_lsa_LookupSids(cli, mem_ctx, 238 status = dcerpc_lsa_LookupSids(h, 239 mem_ctx, 182 240 pol, 183 241 &sid_array, … … 185 243 &lsa_names, 186 244 level, 187 &count); 188 } 189 190 DEBUG(10, ("LSA_LOOKUPSIDS returned '%s', mapped count = %d'\n", 191 nt_errstr(result), count)); 245 &count, 246 &result); 247 } 248 249 DEBUG(10, ("LSA_LOOKUPSIDS returned status: '%s', result: '%s', " 250 "mapped count = %d'\n", 251 nt_errstr(status), nt_errstr(result), count)); 252 253 if (!NT_STATUS_IS_OK(status)) { 254 return status; 255 } 192 256 193 257 if (!NT_STATUS_IS_OK(result) && … … 195 259 !NT_STATUS_EQUAL(result, STATUS_SOME_UNMAPPED)) 196 260 { 197 /* An actual error occured */198 goto done;261 *presult = result; 262 return status; 199 263 } 200 264 201 265 /* Return output parameters */ 202 203 266 if (NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED) || 204 267 (count == 0)) … … 209 272 (types)[i] = SID_NAME_UNKNOWN; 210 273 } 211 result = NT_STATUS_NONE_MAPPED;212 goto done;274 *presult = NT_STATUS_NONE_MAPPED; 275 return status; 213 276 } 214 277 … … 225 288 226 289 if (name) { 227 (names)[i] = talloc_strdup( mem_ctx, name);290 (names)[i] = talloc_strdup(names, name); 228 291 if ((names)[i] == NULL) { 229 292 DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n")); 230 result = NT_STATUS_UNSUCCESSFUL;231 goto done;293 *presult = NT_STATUS_UNSUCCESSFUL; 294 return status; 232 295 } 233 296 } else { 234 297 (names)[i] = NULL; 235 298 } 236 domains[i] = talloc_strdup( 237 mem_ctx,dom_name ? dom_name : "");299 domains[i] = talloc_strdup(domains, 300 dom_name ? dom_name : ""); 238 301 (types)[i] = lsa_names.names[i].sid_type; 239 302 if (((domains)[i] == NULL)) { 240 303 DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n")); 241 result = NT_STATUS_UNSUCCESSFUL;242 goto done;304 *presult = NT_STATUS_UNSUCCESSFUL; 305 return status; 243 306 } 244 307 … … 250 313 } 251 314 252 done: 253 TALLOC_FREE(tmp_ctx); 254 return result; 315 *presult = NT_STATUS_OK; 316 return status; 255 317 } 256 318 … … 267 329 #define LOOKUP_SIDS_HUNK_SIZE 1000 268 330 269 static NTSTATUS rpccli_lsa_lookup_sids_generic(struct rpc_pipe_client *cli,331 static NTSTATUS dcerpc_lsa_lookup_sids_generic(struct dcerpc_binding_handle *h, 270 332 TALLOC_CTX *mem_ctx, 271 333 struct policy_handle *pol, 272 334 int num_sids, 273 const DOM_SID*sids,335 const struct dom_sid *sids, 274 336 char ***pdomains, 275 337 char ***pnames, 276 338 enum lsa_SidType **ptypes, 277 bool use_lookupsids3) 278 { 339 bool use_lookupsids3, 340 NTSTATUS *presult) 341 { 342 NTSTATUS status = NT_STATUS_OK; 279 343 NTSTATUS result = NT_STATUS_OK; 280 344 int sids_left = 0; 281 345 int sids_processed = 0; 282 const DOM_SID*hunk_sids = sids;346 const struct dom_sid *hunk_sids = sids; 283 347 char **hunk_domains; 284 348 char **hunk_names; … … 287 351 char **names = NULL; 288 352 enum lsa_SidType *types = NULL; 353 bool have_mapped = false; 354 bool have_unmapped = false; 289 355 290 356 if (num_sids) { 291 357 if (!(domains = TALLOC_ARRAY(mem_ctx, char *, num_sids))) { 292 358 DEBUG(0, ("rpccli_lsa_lookup_sids(): out of memory\n")); 293 result= NT_STATUS_NO_MEMORY;359 status = NT_STATUS_NO_MEMORY; 294 360 goto fail; 295 361 } … … 297 363 if (!(names = TALLOC_ARRAY(mem_ctx, char *, num_sids))) { 298 364 DEBUG(0, ("rpccli_lsa_lookup_sids(): out of memory\n")); 299 result= NT_STATUS_NO_MEMORY;365 status = NT_STATUS_NO_MEMORY; 300 366 goto fail; 301 367 } … … 303 369 if (!(types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_sids))) { 304 370 DEBUG(0, ("rpccli_lsa_lookup_sids(): out of memory\n")); 305 result= NT_STATUS_NO_MEMORY;371 status = NT_STATUS_NO_MEMORY; 306 372 goto fail; 307 373 } … … 315 381 while (sids_left > 0) { 316 382 int hunk_num_sids; 317 NTSTATUS hunk_result = NT_STATUS_ OK;383 NTSTATUS hunk_result = NT_STATUS_UNSUCCESSFUL; 318 384 319 385 hunk_num_sids = ((sids_left > LOOKUP_SIDS_HUNK_SIZE) … … 327 393 num_sids)); 328 394 329 hunk_result = rpccli_lsa_lookup_sids_noalloc(cli, 330 mem_ctx, 331 pol, 332 hunk_num_sids, 333 hunk_sids, 334 hunk_domains, 335 hunk_names, 336 hunk_types, 337 use_lookupsids3); 395 status = dcerpc_lsa_lookup_sids_noalloc(h, 396 mem_ctx, 397 pol, 398 hunk_num_sids, 399 hunk_sids, 400 hunk_domains, 401 hunk_names, 402 hunk_types, 403 use_lookupsids3, 404 &hunk_result); 405 if (!NT_STATUS_IS_OK(status)) { 406 goto fail; 407 } 338 408 339 409 if (!NT_STATUS_IS_OK(hunk_result) && … … 342 412 { 343 413 /* An actual error occured */ 344 result = hunk_result;414 *presult = hunk_result; 345 415 goto fail; 346 416 } 347 417 348 /* adapt overall result */ 349 if (( NT_STATUS_IS_OK(result) && 350 !NT_STATUS_IS_OK(hunk_result)) 351 || 352 ( NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED) && 353 !NT_STATUS_EQUAL(hunk_result, NT_STATUS_NONE_MAPPED))) 354 { 355 result = STATUS_SOME_UNMAPPED; 418 if (NT_STATUS_IS_OK(hunk_result)) { 419 have_mapped = true; 420 } 421 if (NT_STATUS_EQUAL(hunk_result, NT_STATUS_NONE_MAPPED)) { 422 have_unmapped = true; 423 } 424 if (NT_STATUS_EQUAL(hunk_result, STATUS_SOME_UNMAPPED)) { 425 int i; 426 for (i=0; i<hunk_num_sids; i++) { 427 if (hunk_types[i] == SID_NAME_UNKNOWN) { 428 have_unmapped = true; 429 } else { 430 have_mapped = true; 431 } 432 } 356 433 } 357 434 … … 367 444 *pnames = names; 368 445 *ptypes = types; 369 return result; 446 447 if (!have_mapped) { 448 result = NT_STATUS_NONE_MAPPED; 449 } 450 if (have_unmapped) { 451 result = STATUS_SOME_UNMAPPED; 452 } 453 *presult = result; 454 455 return status; 370 456 371 457 fail: … … 373 459 TALLOC_FREE(names); 374 460 TALLOC_FREE(types); 375 return result; 461 462 return status; 463 } 464 465 NTSTATUS dcerpc_lsa_lookup_sids(struct dcerpc_binding_handle *h, 466 TALLOC_CTX *mem_ctx, 467 struct policy_handle *pol, 468 int num_sids, 469 const struct dom_sid *sids, 470 char ***pdomains, 471 char ***pnames, 472 enum lsa_SidType **ptypes, 473 NTSTATUS *result) 474 { 475 return dcerpc_lsa_lookup_sids_generic(h, 476 mem_ctx, 477 pol, 478 num_sids, 479 sids, 480 pdomains, 481 pnames, 482 ptypes, 483 false, 484 result); 376 485 } 377 486 … … 380 489 struct policy_handle *pol, 381 490 int num_sids, 382 const DOM_SID*sids,491 const struct dom_sid *sids, 383 492 char ***pdomains, 384 493 char ***pnames, 385 494 enum lsa_SidType **ptypes) 386 495 { 387 return rpccli_lsa_lookup_sids_generic(cli, mem_ctx, pol, num_sids, sids, 388 pdomains, pnames, ptypes, false); 496 NTSTATUS status; 497 NTSTATUS result = NT_STATUS_UNSUCCESSFUL; 498 499 status = dcerpc_lsa_lookup_sids_generic(cli->binding_handle, 500 mem_ctx, 501 pol, 502 num_sids, 503 sids, 504 pdomains, 505 pnames, 506 ptypes, 507 false, 508 &result); 509 if (!NT_STATUS_IS_OK(status)) { 510 return status; 511 } 512 513 return result; 514 } 515 516 NTSTATUS dcerpc_lsa_lookup_sids3(struct dcerpc_binding_handle *h, 517 TALLOC_CTX *mem_ctx, 518 struct policy_handle *pol, 519 int num_sids, 520 const struct dom_sid *sids, 521 char ***pdomains, 522 char ***pnames, 523 enum lsa_SidType **ptypes, 524 NTSTATUS *result) 525 { 526 return dcerpc_lsa_lookup_sids_generic(h, 527 mem_ctx, 528 pol, 529 num_sids, 530 sids, 531 pdomains, 532 pnames, 533 ptypes, 534 true, 535 result); 389 536 } 390 537 … … 393 540 struct policy_handle *pol, 394 541 int num_sids, 395 const DOM_SID*sids,542 const struct dom_sid *sids, 396 543 char ***pdomains, 397 544 char ***pnames, 398 545 enum lsa_SidType **ptypes) 399 546 { 400 return rpccli_lsa_lookup_sids_generic(cli, mem_ctx, pol, num_sids, sids, 401 pdomains, pnames, ptypes, true); 547 NTSTATUS status; 548 NTSTATUS result = NT_STATUS_UNSUCCESSFUL; 549 550 status = dcerpc_lsa_lookup_sids_generic(cli->binding_handle, 551 mem_ctx, 552 pol, 553 num_sids, 554 sids, 555 pdomains, 556 pnames, 557 ptypes, 558 true, 559 &result); 560 if (!NT_STATUS_IS_OK(status)) { 561 return status; 562 } 563 564 return result; 402 565 } 403 566 404 567 /** Lookup a list of names */ 405 568 406 static NTSTATUS rpccli_lsa_lookup_names_generic(struct rpc_pipe_client *cli,569 static NTSTATUS dcerpc_lsa_lookup_names_generic(struct dcerpc_binding_handle *h, 407 570 TALLOC_CTX *mem_ctx, 408 struct policy_handle *pol, int num_names, 571 struct policy_handle *pol, 572 uint32_t num_names, 409 573 const char **names, 410 574 const char ***dom_names, 411 intlevel,412 DOM_SID**sids,575 enum lsa_LookupNamesLevel level, 576 struct dom_sid **sids, 413 577 enum lsa_SidType **types, 414 bool use_lookupnames4 )415 { 416 NTSTATUS result; 417 int i;578 bool use_lookupnames4, 579 NTSTATUS *presult) 580 { 581 NTSTATUS status; 418 582 struct lsa_String *lsa_names = NULL; 419 583 struct lsa_RefDomainList *domains = NULL; … … 421 585 struct lsa_TransSidArray3 sid_array3; 422 586 uint32_t count = 0; 587 uint32_t i; 423 588 424 589 ZERO_STRUCT(sid_array); … … 426 591 427 592 lsa_names = TALLOC_ARRAY(mem_ctx, struct lsa_String, num_names); 428 if ( !lsa_names) {593 if (lsa_names == NULL) { 429 594 return NT_STATUS_NO_MEMORY; 430 595 } 431 596 432 for (i =0; i<num_names; i++) {597 for (i = 0; i < num_names; i++) { 433 598 init_lsa_String(&lsa_names[i], names[i]); 434 599 } 435 600 436 601 if (use_lookupnames4) { 437 result = rpccli_lsa_LookupNames4(cli, mem_ctx, 602 status = dcerpc_lsa_LookupNames4(h, 603 mem_ctx, 438 604 num_names, 439 605 lsa_names, … … 442 608 level, 443 609 &count, 444 0, 445 0); 610 LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES, 611 LSA_CLIENT_REVISION_2, 612 presult); 446 613 } else { 447 result = rpccli_lsa_LookupNames(cli, mem_ctx, 448 pol, 614 status = dcerpc_lsa_LookupNames(h, 615 mem_ctx, 616 pol, 449 617 num_names, 450 618 lsa_names, … … 452 620 &sid_array, 453 621 level, 454 &count); 455 } 456 457 if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) != 458 NT_STATUS_V(STATUS_SOME_UNMAPPED)) { 459 622 &count, 623 presult); 624 } 625 if (!NT_STATUS_IS_OK(status)) { 626 goto done; 627 } 628 629 if (!NT_STATUS_IS_OK(*presult) && 630 !NT_STATUS_EQUAL(*presult, STATUS_SOME_UNMAPPED)) { 460 631 /* An actual error occured */ 461 462 632 goto done; 463 633 } 464 634 465 635 /* Return output parameters */ 466 467 636 if (count == 0) { 468 result = NT_STATUS_NONE_MAPPED;637 *presult = NT_STATUS_NONE_MAPPED; 469 638 goto done; 470 639 } 471 640 472 641 if (num_names) { 473 if (!((*sids = TALLOC_ARRAY(mem_ctx, DOM_SID, num_names)))) {642 if (!((*sids = TALLOC_ARRAY(mem_ctx, struct dom_sid, num_names)))) { 474 643 DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); 475 result = NT_STATUS_NO_MEMORY;644 *presult = NT_STATUS_NO_MEMORY; 476 645 goto done; 477 646 } … … 479 648 if (!((*types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_names)))) { 480 649 DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); 481 result = NT_STATUS_NO_MEMORY;650 *presult = NT_STATUS_NO_MEMORY; 482 651 goto done; 483 652 } … … 487 656 if (*dom_names == NULL) { 488 657 DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); 489 result = NT_STATUS_NO_MEMORY;658 *presult = NT_STATUS_NO_MEMORY; 490 659 goto done; 491 660 } … … 501 670 for (i = 0; i < num_names; i++) { 502 671 uint32_t dom_idx; 503 DOM_SID*sid = &(*sids)[i];672 struct dom_sid *sid = &(*sids)[i]; 504 673 505 674 if (use_lookupnames4) { … … 538 707 539 708 done: 540 541 return result; 709 return status; 710 } 711 712 NTSTATUS dcerpc_lsa_lookup_names(struct dcerpc_binding_handle *h, 713 TALLOC_CTX *mem_ctx, 714 struct policy_handle *pol, 715 uint32_t num_names, 716 const char **names, 717 const char ***dom_names, 718 enum lsa_LookupNamesLevel level, 719 struct dom_sid **sids, 720 enum lsa_SidType **types, 721 NTSTATUS *result) 722 { 723 return dcerpc_lsa_lookup_names_generic(h, 724 mem_ctx, 725 pol, 726 num_names, 727 names, 728 dom_names, 729 level, 730 sids, 731 types, 732 false, 733 result); 542 734 } 543 735 544 736 NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli, 545 737 TALLOC_CTX *mem_ctx, 546 struct policy_handle *pol, int num_names, 738 struct policy_handle *pol, 739 int num_names, 547 740 const char **names, 548 741 const char ***dom_names, 549 742 int level, 550 DOM_SID**sids,743 struct dom_sid **sids, 551 744 enum lsa_SidType **types) 552 745 { 553 return rpccli_lsa_lookup_names_generic(cli, mem_ctx, pol, num_names, 554 names, dom_names, level, sids, 555 types, false); 746 NTSTATUS status; 747 NTSTATUS result = NT_STATUS_UNSUCCESSFUL; 748 749 status = dcerpc_lsa_lookup_names(cli->binding_handle, 750 mem_ctx, 751 pol, 752 num_names, 753 names, 754 dom_names, 755 level, 756 sids, 757 types, 758 &result); 759 if (!NT_STATUS_IS_OK(status)) { 760 return status; 761 } 762 763 return result; 764 } 765 766 NTSTATUS dcerpc_lsa_lookup_names4(struct dcerpc_binding_handle *h, 767 TALLOC_CTX *mem_ctx, 768 struct policy_handle *pol, 769 uint32_t num_names, 770 const char **names, 771 const char ***dom_names, 772 enum lsa_LookupNamesLevel level, 773 struct dom_sid **sids, 774 enum lsa_SidType **types, 775 NTSTATUS *result) 776 { 777 return dcerpc_lsa_lookup_names_generic(h, 778 mem_ctx, 779 pol, 780 num_names, 781 names, 782 dom_names, 783 level, 784 sids, 785 types, 786 true, 787 result); 556 788 } 557 789 558 790 NTSTATUS rpccli_lsa_lookup_names4(struct rpc_pipe_client *cli, 559 791 TALLOC_CTX *mem_ctx, 560 struct policy_handle *pol, int num_names, 792 struct policy_handle *pol, 793 int num_names, 561 794 const char **names, 562 795 const char ***dom_names, 563 796 int level, 564 DOM_SID**sids,797 struct dom_sid **sids, 565 798 enum lsa_SidType **types) 566 799 { 567 return rpccli_lsa_lookup_names_generic(cli, mem_ctx, pol, num_names, 568 names, dom_names, level, sids, 569 types, true); 570 } 800 NTSTATUS status; 801 NTSTATUS result = NT_STATUS_UNSUCCESSFUL; 802 803 status = dcerpc_lsa_lookup_names4(cli->binding_handle, 804 mem_ctx, 805 pol, 806 num_names, 807 names, 808 dom_names, 809 level, 810 sids, 811 types, 812 &result); 813 if (!NT_STATUS_IS_OK(status)) { 814 return status; 815 } 816 817 return result; 818 }
Note:
See TracChangeset
for help on using the changeset viewer.