1/* 2 * Unix SMB/CIFS implementation. 3 * client auto-generated by pidl. DO NOT MODIFY! 4 */ 5 6#include "includes.h" 7#include "librpc/gen_ndr/cli_wbint.h" 8 9struct rpccli_wbint_Ping_state { 10 struct wbint_Ping orig; 11 struct wbint_Ping tmp; 12 TALLOC_CTX *out_mem_ctx; 13 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 14}; 15 16static void rpccli_wbint_Ping_done(struct tevent_req *subreq); 17 18struct tevent_req *rpccli_wbint_Ping_send(TALLOC_CTX *mem_ctx, 19 struct tevent_context *ev, 20 struct rpc_pipe_client *cli, 21 uint32_t _in_data /* [in] */, 22 uint32_t *_out_data /* [out] [ref] */) 23{ 24 struct tevent_req *req; 25 struct rpccli_wbint_Ping_state *state; 26 struct tevent_req *subreq; 27 28 req = tevent_req_create(mem_ctx, &state, 29 struct rpccli_wbint_Ping_state); 30 if (req == NULL) { 31 return NULL; 32 } 33 state->out_mem_ctx = NULL; 34 state->dispatch_recv = cli->dispatch_recv; 35 36 /* In parameters */ 37 state->orig.in.in_data = _in_data; 38 39 /* Out parameters */ 40 state->orig.out.out_data = _out_data; 41 42 state->out_mem_ctx = talloc_named_const(state, 0, 43 "rpccli_wbint_Ping_out_memory"); 44 if (tevent_req_nomem(state->out_mem_ctx, req)) { 45 return tevent_req_post(req, ev); 46 } 47 48 /* make a temporary copy, that we pass to the dispatch function */ 49 state->tmp = state->orig; 50 51 subreq = cli->dispatch_send(state, ev, cli, 52 &ndr_table_wbint, 53 NDR_WBINT_PING, 54 &state->tmp); 55 if (tevent_req_nomem(subreq, req)) { 56 return tevent_req_post(req, ev); 57 } 58 tevent_req_set_callback(subreq, rpccli_wbint_Ping_done, req); 59 return req; 60} 61 62static void rpccli_wbint_Ping_done(struct tevent_req *subreq) 63{ 64 struct tevent_req *req = tevent_req_callback_data( 65 subreq, struct tevent_req); 66 struct rpccli_wbint_Ping_state *state = tevent_req_data( 67 req, struct rpccli_wbint_Ping_state); 68 NTSTATUS status; 69 TALLOC_CTX *mem_ctx; 70 71 if (state->out_mem_ctx) { 72 mem_ctx = state->out_mem_ctx; 73 } else { 74 mem_ctx = state; 75 } 76 77 status = state->dispatch_recv(subreq, mem_ctx); 78 TALLOC_FREE(subreq); 79 if (!NT_STATUS_IS_OK(status)) { 80 tevent_req_nterror(req, status); 81 return; 82 } 83 84 /* Copy out parameters */ 85 *state->orig.out.out_data = *state->tmp.out.out_data; 86 87 /* Reset temporary structure */ 88 ZERO_STRUCT(state->tmp); 89 90 tevent_req_done(req); 91} 92 93NTSTATUS rpccli_wbint_Ping_recv(struct tevent_req *req, 94 TALLOC_CTX *mem_ctx) 95{ 96 struct rpccli_wbint_Ping_state *state = tevent_req_data( 97 req, struct rpccli_wbint_Ping_state); 98 NTSTATUS status; 99 100 if (tevent_req_is_nterror(req, &status)) { 101 tevent_req_received(req); 102 return status; 103 } 104 105 /* Steal possbile out parameters to the callers context */ 106 talloc_steal(mem_ctx, state->out_mem_ctx); 107 108 tevent_req_received(req); 109 return NT_STATUS_OK; 110} 111 112NTSTATUS rpccli_wbint_Ping(struct rpc_pipe_client *cli, 113 TALLOC_CTX *mem_ctx, 114 uint32_t in_data /* [in] */, 115 uint32_t *out_data /* [out] [ref] */) 116{ 117 struct wbint_Ping r; 118 NTSTATUS status; 119 120 /* In parameters */ 121 r.in.in_data = in_data; 122 123 status = cli->dispatch(cli, 124 mem_ctx, 125 &ndr_table_wbint, 126 NDR_WBINT_PING, 127 &r); 128 129 if (!NT_STATUS_IS_OK(status)) { 130 return status; 131 } 132 133 if (NT_STATUS_IS_ERR(status)) { 134 return status; 135 } 136 137 /* Return variables */ 138 *out_data = *r.out.out_data; 139 140 /* Return result */ 141 return NT_STATUS_OK; 142} 143 144struct rpccli_wbint_LookupSid_state { 145 struct wbint_LookupSid orig; 146 struct wbint_LookupSid tmp; 147 TALLOC_CTX *out_mem_ctx; 148 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 149}; 150 151static void rpccli_wbint_LookupSid_done(struct tevent_req *subreq); 152 153struct tevent_req *rpccli_wbint_LookupSid_send(TALLOC_CTX *mem_ctx, 154 struct tevent_context *ev, 155 struct rpc_pipe_client *cli, 156 struct dom_sid *_sid /* [in] [ref] */, 157 enum lsa_SidType *_type /* [out] [ref] */, 158 const char **_domain /* [out] [ref,charset(UTF8)] */, 159 const char **_name /* [out] [ref,charset(UTF8)] */) 160{ 161 struct tevent_req *req; 162 struct rpccli_wbint_LookupSid_state *state; 163 struct tevent_req *subreq; 164 165 req = tevent_req_create(mem_ctx, &state, 166 struct rpccli_wbint_LookupSid_state); 167 if (req == NULL) { 168 return NULL; 169 } 170 state->out_mem_ctx = NULL; 171 state->dispatch_recv = cli->dispatch_recv; 172 173 /* In parameters */ 174 state->orig.in.sid = _sid; 175 176 /* Out parameters */ 177 state->orig.out.type = _type; 178 state->orig.out.domain = _domain; 179 state->orig.out.name = _name; 180 181 /* Result */ 182 ZERO_STRUCT(state->orig.out.result); 183 184 state->out_mem_ctx = talloc_named_const(state, 0, 185 "rpccli_wbint_LookupSid_out_memory"); 186 if (tevent_req_nomem(state->out_mem_ctx, req)) { 187 return tevent_req_post(req, ev); 188 } 189 190 /* make a temporary copy, that we pass to the dispatch function */ 191 state->tmp = state->orig; 192 193 subreq = cli->dispatch_send(state, ev, cli, 194 &ndr_table_wbint, 195 NDR_WBINT_LOOKUPSID, 196 &state->tmp); 197 if (tevent_req_nomem(subreq, req)) { 198 return tevent_req_post(req, ev); 199 } 200 tevent_req_set_callback(subreq, rpccli_wbint_LookupSid_done, req); 201 return req; 202} 203 204static void rpccli_wbint_LookupSid_done(struct tevent_req *subreq) 205{ 206 struct tevent_req *req = tevent_req_callback_data( 207 subreq, struct tevent_req); 208 struct rpccli_wbint_LookupSid_state *state = tevent_req_data( 209 req, struct rpccli_wbint_LookupSid_state); 210 NTSTATUS status; 211 TALLOC_CTX *mem_ctx; 212 213 if (state->out_mem_ctx) { 214 mem_ctx = state->out_mem_ctx; 215 } else { 216 mem_ctx = state; 217 } 218 219 status = state->dispatch_recv(subreq, mem_ctx); 220 TALLOC_FREE(subreq); 221 if (!NT_STATUS_IS_OK(status)) { 222 tevent_req_nterror(req, status); 223 return; 224 } 225 226 /* Copy out parameters */ 227 *state->orig.out.type = *state->tmp.out.type; 228 *state->orig.out.domain = *state->tmp.out.domain; 229 *state->orig.out.name = *state->tmp.out.name; 230 231 /* Copy result */ 232 state->orig.out.result = state->tmp.out.result; 233 234 /* Reset temporary structure */ 235 ZERO_STRUCT(state->tmp); 236 237 tevent_req_done(req); 238} 239 240NTSTATUS rpccli_wbint_LookupSid_recv(struct tevent_req *req, 241 TALLOC_CTX *mem_ctx, 242 NTSTATUS *result) 243{ 244 struct rpccli_wbint_LookupSid_state *state = tevent_req_data( 245 req, struct rpccli_wbint_LookupSid_state); 246 NTSTATUS status; 247 248 if (tevent_req_is_nterror(req, &status)) { 249 tevent_req_received(req); 250 return status; 251 } 252 253 /* Steal possbile out parameters to the callers context */ 254 talloc_steal(mem_ctx, state->out_mem_ctx); 255 256 /* Return result */ 257 *result = state->orig.out.result; 258 259 tevent_req_received(req); 260 return NT_STATUS_OK; 261} 262 263NTSTATUS rpccli_wbint_LookupSid(struct rpc_pipe_client *cli, 264 TALLOC_CTX *mem_ctx, 265 struct dom_sid *sid /* [in] [ref] */, 266 enum lsa_SidType *type /* [out] [ref] */, 267 const char **domain /* [out] [ref,charset(UTF8)] */, 268 const char **name /* [out] [ref,charset(UTF8)] */) 269{ 270 struct wbint_LookupSid r; 271 NTSTATUS status; 272 273 /* In parameters */ 274 r.in.sid = sid; 275 276 status = cli->dispatch(cli, 277 mem_ctx, 278 &ndr_table_wbint, 279 NDR_WBINT_LOOKUPSID, 280 &r); 281 282 if (!NT_STATUS_IS_OK(status)) { 283 return status; 284 } 285 286 if (NT_STATUS_IS_ERR(status)) { 287 return status; 288 } 289 290 /* Return variables */ 291 *type = *r.out.type; 292 *domain = *r.out.domain; 293 *name = *r.out.name; 294 295 /* Return result */ 296 return r.out.result; 297} 298 299struct rpccli_wbint_LookupName_state { 300 struct wbint_LookupName orig; 301 struct wbint_LookupName tmp; 302 TALLOC_CTX *out_mem_ctx; 303 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 304}; 305 306static void rpccli_wbint_LookupName_done(struct tevent_req *subreq); 307 308struct tevent_req *rpccli_wbint_LookupName_send(TALLOC_CTX *mem_ctx, 309 struct tevent_context *ev, 310 struct rpc_pipe_client *cli, 311 const char *_domain /* [in] [ref,charset(UTF8)] */, 312 const char *_name /* [in] [ref,charset(UTF8)] */, 313 uint32_t _flags /* [in] */, 314 enum lsa_SidType *_type /* [out] [ref] */, 315 struct dom_sid *_sid /* [out] [ref] */) 316{ 317 struct tevent_req *req; 318 struct rpccli_wbint_LookupName_state *state; 319 struct tevent_req *subreq; 320 321 req = tevent_req_create(mem_ctx, &state, 322 struct rpccli_wbint_LookupName_state); 323 if (req == NULL) { 324 return NULL; 325 } 326 state->out_mem_ctx = NULL; 327 state->dispatch_recv = cli->dispatch_recv; 328 329 /* In parameters */ 330 state->orig.in.domain = _domain; 331 state->orig.in.name = _name; 332 state->orig.in.flags = _flags; 333 334 /* Out parameters */ 335 state->orig.out.type = _type; 336 state->orig.out.sid = _sid; 337 338 /* Result */ 339 ZERO_STRUCT(state->orig.out.result); 340 341 state->out_mem_ctx = talloc_named_const(state, 0, 342 "rpccli_wbint_LookupName_out_memory"); 343 if (tevent_req_nomem(state->out_mem_ctx, req)) { 344 return tevent_req_post(req, ev); 345 } 346 347 /* make a temporary copy, that we pass to the dispatch function */ 348 state->tmp = state->orig; 349 350 subreq = cli->dispatch_send(state, ev, cli, 351 &ndr_table_wbint, 352 NDR_WBINT_LOOKUPNAME, 353 &state->tmp); 354 if (tevent_req_nomem(subreq, req)) { 355 return tevent_req_post(req, ev); 356 } 357 tevent_req_set_callback(subreq, rpccli_wbint_LookupName_done, req); 358 return req; 359} 360 361static void rpccli_wbint_LookupName_done(struct tevent_req *subreq) 362{ 363 struct tevent_req *req = tevent_req_callback_data( 364 subreq, struct tevent_req); 365 struct rpccli_wbint_LookupName_state *state = tevent_req_data( 366 req, struct rpccli_wbint_LookupName_state); 367 NTSTATUS status; 368 TALLOC_CTX *mem_ctx; 369 370 if (state->out_mem_ctx) { 371 mem_ctx = state->out_mem_ctx; 372 } else { 373 mem_ctx = state; 374 } 375 376 status = state->dispatch_recv(subreq, mem_ctx); 377 TALLOC_FREE(subreq); 378 if (!NT_STATUS_IS_OK(status)) { 379 tevent_req_nterror(req, status); 380 return; 381 } 382 383 /* Copy out parameters */ 384 *state->orig.out.type = *state->tmp.out.type; 385 *state->orig.out.sid = *state->tmp.out.sid; 386 387 /* Copy result */ 388 state->orig.out.result = state->tmp.out.result; 389 390 /* Reset temporary structure */ 391 ZERO_STRUCT(state->tmp); 392 393 tevent_req_done(req); 394} 395 396NTSTATUS rpccli_wbint_LookupName_recv(struct tevent_req *req, 397 TALLOC_CTX *mem_ctx, 398 NTSTATUS *result) 399{ 400 struct rpccli_wbint_LookupName_state *state = tevent_req_data( 401 req, struct rpccli_wbint_LookupName_state); 402 NTSTATUS status; 403 404 if (tevent_req_is_nterror(req, &status)) { 405 tevent_req_received(req); 406 return status; 407 } 408 409 /* Steal possbile out parameters to the callers context */ 410 talloc_steal(mem_ctx, state->out_mem_ctx); 411 412 /* Return result */ 413 *result = state->orig.out.result; 414 415 tevent_req_received(req); 416 return NT_STATUS_OK; 417} 418 419NTSTATUS rpccli_wbint_LookupName(struct rpc_pipe_client *cli, 420 TALLOC_CTX *mem_ctx, 421 const char *domain /* [in] [ref,charset(UTF8)] */, 422 const char *name /* [in] [ref,charset(UTF8)] */, 423 uint32_t flags /* [in] */, 424 enum lsa_SidType *type /* [out] [ref] */, 425 struct dom_sid *sid /* [out] [ref] */) 426{ 427 struct wbint_LookupName r; 428 NTSTATUS status; 429 430 /* In parameters */ 431 r.in.domain = domain; 432 r.in.name = name; 433 r.in.flags = flags; 434 435 status = cli->dispatch(cli, 436 mem_ctx, 437 &ndr_table_wbint, 438 NDR_WBINT_LOOKUPNAME, 439 &r); 440 441 if (!NT_STATUS_IS_OK(status)) { 442 return status; 443 } 444 445 if (NT_STATUS_IS_ERR(status)) { 446 return status; 447 } 448 449 /* Return variables */ 450 *type = *r.out.type; 451 *sid = *r.out.sid; 452 453 /* Return result */ 454 return r.out.result; 455} 456 457struct rpccli_wbint_Sid2Uid_state { 458 struct wbint_Sid2Uid orig; 459 struct wbint_Sid2Uid tmp; 460 TALLOC_CTX *out_mem_ctx; 461 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 462}; 463 464static void rpccli_wbint_Sid2Uid_done(struct tevent_req *subreq); 465 466struct tevent_req *rpccli_wbint_Sid2Uid_send(TALLOC_CTX *mem_ctx, 467 struct tevent_context *ev, 468 struct rpc_pipe_client *cli, 469 const char *_dom_name /* [in] [unique,charset(UTF8)] */, 470 struct dom_sid *_sid /* [in] [ref] */, 471 uint64_t *_uid /* [out] [ref] */) 472{ 473 struct tevent_req *req; 474 struct rpccli_wbint_Sid2Uid_state *state; 475 struct tevent_req *subreq; 476 477 req = tevent_req_create(mem_ctx, &state, 478 struct rpccli_wbint_Sid2Uid_state); 479 if (req == NULL) { 480 return NULL; 481 } 482 state->out_mem_ctx = NULL; 483 state->dispatch_recv = cli->dispatch_recv; 484 485 /* In parameters */ 486 state->orig.in.dom_name = _dom_name; 487 state->orig.in.sid = _sid; 488 489 /* Out parameters */ 490 state->orig.out.uid = _uid; 491 492 /* Result */ 493 ZERO_STRUCT(state->orig.out.result); 494 495 state->out_mem_ctx = talloc_named_const(state, 0, 496 "rpccli_wbint_Sid2Uid_out_memory"); 497 if (tevent_req_nomem(state->out_mem_ctx, req)) { 498 return tevent_req_post(req, ev); 499 } 500 501 /* make a temporary copy, that we pass to the dispatch function */ 502 state->tmp = state->orig; 503 504 subreq = cli->dispatch_send(state, ev, cli, 505 &ndr_table_wbint, 506 NDR_WBINT_SID2UID, 507 &state->tmp); 508 if (tevent_req_nomem(subreq, req)) { 509 return tevent_req_post(req, ev); 510 } 511 tevent_req_set_callback(subreq, rpccli_wbint_Sid2Uid_done, req); 512 return req; 513} 514 515static void rpccli_wbint_Sid2Uid_done(struct tevent_req *subreq) 516{ 517 struct tevent_req *req = tevent_req_callback_data( 518 subreq, struct tevent_req); 519 struct rpccli_wbint_Sid2Uid_state *state = tevent_req_data( 520 req, struct rpccli_wbint_Sid2Uid_state); 521 NTSTATUS status; 522 TALLOC_CTX *mem_ctx; 523 524 if (state->out_mem_ctx) { 525 mem_ctx = state->out_mem_ctx; 526 } else { 527 mem_ctx = state; 528 } 529 530 status = state->dispatch_recv(subreq, mem_ctx); 531 TALLOC_FREE(subreq); 532 if (!NT_STATUS_IS_OK(status)) { 533 tevent_req_nterror(req, status); 534 return; 535 } 536 537 /* Copy out parameters */ 538 *state->orig.out.uid = *state->tmp.out.uid; 539 540 /* Copy result */ 541 state->orig.out.result = state->tmp.out.result; 542 543 /* Reset temporary structure */ 544 ZERO_STRUCT(state->tmp); 545 546 tevent_req_done(req); 547} 548 549NTSTATUS rpccli_wbint_Sid2Uid_recv(struct tevent_req *req, 550 TALLOC_CTX *mem_ctx, 551 NTSTATUS *result) 552{ 553 struct rpccli_wbint_Sid2Uid_state *state = tevent_req_data( 554 req, struct rpccli_wbint_Sid2Uid_state); 555 NTSTATUS status; 556 557 if (tevent_req_is_nterror(req, &status)) { 558 tevent_req_received(req); 559 return status; 560 } 561 562 /* Steal possbile out parameters to the callers context */ 563 talloc_steal(mem_ctx, state->out_mem_ctx); 564 565 /* Return result */ 566 *result = state->orig.out.result; 567 568 tevent_req_received(req); 569 return NT_STATUS_OK; 570} 571 572NTSTATUS rpccli_wbint_Sid2Uid(struct rpc_pipe_client *cli, 573 TALLOC_CTX *mem_ctx, 574 const char *dom_name /* [in] [unique,charset(UTF8)] */, 575 struct dom_sid *sid /* [in] [ref] */, 576 uint64_t *uid /* [out] [ref] */) 577{ 578 struct wbint_Sid2Uid r; 579 NTSTATUS status; 580 581 /* In parameters */ 582 r.in.dom_name = dom_name; 583 r.in.sid = sid; 584 585 status = cli->dispatch(cli, 586 mem_ctx, 587 &ndr_table_wbint, 588 NDR_WBINT_SID2UID, 589 &r); 590 591 if (!NT_STATUS_IS_OK(status)) { 592 return status; 593 } 594 595 if (NT_STATUS_IS_ERR(status)) { 596 return status; 597 } 598 599 /* Return variables */ 600 *uid = *r.out.uid; 601 602 /* Return result */ 603 return r.out.result; 604} 605 606struct rpccli_wbint_Sid2Gid_state { 607 struct wbint_Sid2Gid orig; 608 struct wbint_Sid2Gid tmp; 609 TALLOC_CTX *out_mem_ctx; 610 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 611}; 612 613static void rpccli_wbint_Sid2Gid_done(struct tevent_req *subreq); 614 615struct tevent_req *rpccli_wbint_Sid2Gid_send(TALLOC_CTX *mem_ctx, 616 struct tevent_context *ev, 617 struct rpc_pipe_client *cli, 618 const char *_dom_name /* [in] [unique,charset(UTF8)] */, 619 struct dom_sid *_sid /* [in] [ref] */, 620 uint64_t *_gid /* [out] [ref] */) 621{ 622 struct tevent_req *req; 623 struct rpccli_wbint_Sid2Gid_state *state; 624 struct tevent_req *subreq; 625 626 req = tevent_req_create(mem_ctx, &state, 627 struct rpccli_wbint_Sid2Gid_state); 628 if (req == NULL) { 629 return NULL; 630 } 631 state->out_mem_ctx = NULL; 632 state->dispatch_recv = cli->dispatch_recv; 633 634 /* In parameters */ 635 state->orig.in.dom_name = _dom_name; 636 state->orig.in.sid = _sid; 637 638 /* Out parameters */ 639 state->orig.out.gid = _gid; 640 641 /* Result */ 642 ZERO_STRUCT(state->orig.out.result); 643 644 state->out_mem_ctx = talloc_named_const(state, 0, 645 "rpccli_wbint_Sid2Gid_out_memory"); 646 if (tevent_req_nomem(state->out_mem_ctx, req)) { 647 return tevent_req_post(req, ev); 648 } 649 650 /* make a temporary copy, that we pass to the dispatch function */ 651 state->tmp = state->orig; 652 653 subreq = cli->dispatch_send(state, ev, cli, 654 &ndr_table_wbint, 655 NDR_WBINT_SID2GID, 656 &state->tmp); 657 if (tevent_req_nomem(subreq, req)) { 658 return tevent_req_post(req, ev); 659 } 660 tevent_req_set_callback(subreq, rpccli_wbint_Sid2Gid_done, req); 661 return req; 662} 663 664static void rpccli_wbint_Sid2Gid_done(struct tevent_req *subreq) 665{ 666 struct tevent_req *req = tevent_req_callback_data( 667 subreq, struct tevent_req); 668 struct rpccli_wbint_Sid2Gid_state *state = tevent_req_data( 669 req, struct rpccli_wbint_Sid2Gid_state); 670 NTSTATUS status; 671 TALLOC_CTX *mem_ctx; 672 673 if (state->out_mem_ctx) { 674 mem_ctx = state->out_mem_ctx; 675 } else { 676 mem_ctx = state; 677 } 678 679 status = state->dispatch_recv(subreq, mem_ctx); 680 TALLOC_FREE(subreq); 681 if (!NT_STATUS_IS_OK(status)) { 682 tevent_req_nterror(req, status); 683 return; 684 } 685 686 /* Copy out parameters */ 687 *state->orig.out.gid = *state->tmp.out.gid; 688 689 /* Copy result */ 690 state->orig.out.result = state->tmp.out.result; 691 692 /* Reset temporary structure */ 693 ZERO_STRUCT(state->tmp); 694 695 tevent_req_done(req); 696} 697 698NTSTATUS rpccli_wbint_Sid2Gid_recv(struct tevent_req *req, 699 TALLOC_CTX *mem_ctx, 700 NTSTATUS *result) 701{ 702 struct rpccli_wbint_Sid2Gid_state *state = tevent_req_data( 703 req, struct rpccli_wbint_Sid2Gid_state); 704 NTSTATUS status; 705 706 if (tevent_req_is_nterror(req, &status)) { 707 tevent_req_received(req); 708 return status; 709 } 710 711 /* Steal possbile out parameters to the callers context */ 712 talloc_steal(mem_ctx, state->out_mem_ctx); 713 714 /* Return result */ 715 *result = state->orig.out.result; 716 717 tevent_req_received(req); 718 return NT_STATUS_OK; 719} 720 721NTSTATUS rpccli_wbint_Sid2Gid(struct rpc_pipe_client *cli, 722 TALLOC_CTX *mem_ctx, 723 const char *dom_name /* [in] [unique,charset(UTF8)] */, 724 struct dom_sid *sid /* [in] [ref] */, 725 uint64_t *gid /* [out] [ref] */) 726{ 727 struct wbint_Sid2Gid r; 728 NTSTATUS status; 729 730 /* In parameters */ 731 r.in.dom_name = dom_name; 732 r.in.sid = sid; 733 734 status = cli->dispatch(cli, 735 mem_ctx, 736 &ndr_table_wbint, 737 NDR_WBINT_SID2GID, 738 &r); 739 740 if (!NT_STATUS_IS_OK(status)) { 741 return status; 742 } 743 744 if (NT_STATUS_IS_ERR(status)) { 745 return status; 746 } 747 748 /* Return variables */ 749 *gid = *r.out.gid; 750 751 /* Return result */ 752 return r.out.result; 753} 754 755struct rpccli_wbint_Uid2Sid_state { 756 struct wbint_Uid2Sid orig; 757 struct wbint_Uid2Sid tmp; 758 TALLOC_CTX *out_mem_ctx; 759 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 760}; 761 762static void rpccli_wbint_Uid2Sid_done(struct tevent_req *subreq); 763 764struct tevent_req *rpccli_wbint_Uid2Sid_send(TALLOC_CTX *mem_ctx, 765 struct tevent_context *ev, 766 struct rpc_pipe_client *cli, 767 const char *_dom_name /* [in] [unique,charset(UTF8)] */, 768 uint64_t _uid /* [in] */, 769 struct dom_sid *_sid /* [out] [ref] */) 770{ 771 struct tevent_req *req; 772 struct rpccli_wbint_Uid2Sid_state *state; 773 struct tevent_req *subreq; 774 775 req = tevent_req_create(mem_ctx, &state, 776 struct rpccli_wbint_Uid2Sid_state); 777 if (req == NULL) { 778 return NULL; 779 } 780 state->out_mem_ctx = NULL; 781 state->dispatch_recv = cli->dispatch_recv; 782 783 /* In parameters */ 784 state->orig.in.dom_name = _dom_name; 785 state->orig.in.uid = _uid; 786 787 /* Out parameters */ 788 state->orig.out.sid = _sid; 789 790 /* Result */ 791 ZERO_STRUCT(state->orig.out.result); 792 793 state->out_mem_ctx = talloc_named_const(state, 0, 794 "rpccli_wbint_Uid2Sid_out_memory"); 795 if (tevent_req_nomem(state->out_mem_ctx, req)) { 796 return tevent_req_post(req, ev); 797 } 798 799 /* make a temporary copy, that we pass to the dispatch function */ 800 state->tmp = state->orig; 801 802 subreq = cli->dispatch_send(state, ev, cli, 803 &ndr_table_wbint, 804 NDR_WBINT_UID2SID, 805 &state->tmp); 806 if (tevent_req_nomem(subreq, req)) { 807 return tevent_req_post(req, ev); 808 } 809 tevent_req_set_callback(subreq, rpccli_wbint_Uid2Sid_done, req); 810 return req; 811} 812 813static void rpccli_wbint_Uid2Sid_done(struct tevent_req *subreq) 814{ 815 struct tevent_req *req = tevent_req_callback_data( 816 subreq, struct tevent_req); 817 struct rpccli_wbint_Uid2Sid_state *state = tevent_req_data( 818 req, struct rpccli_wbint_Uid2Sid_state); 819 NTSTATUS status; 820 TALLOC_CTX *mem_ctx; 821 822 if (state->out_mem_ctx) { 823 mem_ctx = state->out_mem_ctx; 824 } else { 825 mem_ctx = state; 826 } 827 828 status = state->dispatch_recv(subreq, mem_ctx); 829 TALLOC_FREE(subreq); 830 if (!NT_STATUS_IS_OK(status)) { 831 tevent_req_nterror(req, status); 832 return; 833 } 834 835 /* Copy out parameters */ 836 *state->orig.out.sid = *state->tmp.out.sid; 837 838 /* Copy result */ 839 state->orig.out.result = state->tmp.out.result; 840 841 /* Reset temporary structure */ 842 ZERO_STRUCT(state->tmp); 843 844 tevent_req_done(req); 845} 846 847NTSTATUS rpccli_wbint_Uid2Sid_recv(struct tevent_req *req, 848 TALLOC_CTX *mem_ctx, 849 NTSTATUS *result) 850{ 851 struct rpccli_wbint_Uid2Sid_state *state = tevent_req_data( 852 req, struct rpccli_wbint_Uid2Sid_state); 853 NTSTATUS status; 854 855 if (tevent_req_is_nterror(req, &status)) { 856 tevent_req_received(req); 857 return status; 858 } 859 860 /* Steal possbile out parameters to the callers context */ 861 talloc_steal(mem_ctx, state->out_mem_ctx); 862 863 /* Return result */ 864 *result = state->orig.out.result; 865 866 tevent_req_received(req); 867 return NT_STATUS_OK; 868} 869 870NTSTATUS rpccli_wbint_Uid2Sid(struct rpc_pipe_client *cli, 871 TALLOC_CTX *mem_ctx, 872 const char *dom_name /* [in] [unique,charset(UTF8)] */, 873 uint64_t uid /* [in] */, 874 struct dom_sid *sid /* [out] [ref] */) 875{ 876 struct wbint_Uid2Sid r; 877 NTSTATUS status; 878 879 /* In parameters */ 880 r.in.dom_name = dom_name; 881 r.in.uid = uid; 882 883 status = cli->dispatch(cli, 884 mem_ctx, 885 &ndr_table_wbint, 886 NDR_WBINT_UID2SID, 887 &r); 888 889 if (!NT_STATUS_IS_OK(status)) { 890 return status; 891 } 892 893 if (NT_STATUS_IS_ERR(status)) { 894 return status; 895 } 896 897 /* Return variables */ 898 *sid = *r.out.sid; 899 900 /* Return result */ 901 return r.out.result; 902} 903 904struct rpccli_wbint_Gid2Sid_state { 905 struct wbint_Gid2Sid orig; 906 struct wbint_Gid2Sid tmp; 907 TALLOC_CTX *out_mem_ctx; 908 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 909}; 910 911static void rpccli_wbint_Gid2Sid_done(struct tevent_req *subreq); 912 913struct tevent_req *rpccli_wbint_Gid2Sid_send(TALLOC_CTX *mem_ctx, 914 struct tevent_context *ev, 915 struct rpc_pipe_client *cli, 916 const char *_dom_name /* [in] [unique,charset(UTF8)] */, 917 uint64_t _gid /* [in] */, 918 struct dom_sid *_sid /* [out] [ref] */) 919{ 920 struct tevent_req *req; 921 struct rpccli_wbint_Gid2Sid_state *state; 922 struct tevent_req *subreq; 923 924 req = tevent_req_create(mem_ctx, &state, 925 struct rpccli_wbint_Gid2Sid_state); 926 if (req == NULL) { 927 return NULL; 928 } 929 state->out_mem_ctx = NULL; 930 state->dispatch_recv = cli->dispatch_recv; 931 932 /* In parameters */ 933 state->orig.in.dom_name = _dom_name; 934 state->orig.in.gid = _gid; 935 936 /* Out parameters */ 937 state->orig.out.sid = _sid; 938 939 /* Result */ 940 ZERO_STRUCT(state->orig.out.result); 941 942 state->out_mem_ctx = talloc_named_const(state, 0, 943 "rpccli_wbint_Gid2Sid_out_memory"); 944 if (tevent_req_nomem(state->out_mem_ctx, req)) { 945 return tevent_req_post(req, ev); 946 } 947 948 /* make a temporary copy, that we pass to the dispatch function */ 949 state->tmp = state->orig; 950 951 subreq = cli->dispatch_send(state, ev, cli, 952 &ndr_table_wbint, 953 NDR_WBINT_GID2SID, 954 &state->tmp); 955 if (tevent_req_nomem(subreq, req)) { 956 return tevent_req_post(req, ev); 957 } 958 tevent_req_set_callback(subreq, rpccli_wbint_Gid2Sid_done, req); 959 return req; 960} 961 962static void rpccli_wbint_Gid2Sid_done(struct tevent_req *subreq) 963{ 964 struct tevent_req *req = tevent_req_callback_data( 965 subreq, struct tevent_req); 966 struct rpccli_wbint_Gid2Sid_state *state = tevent_req_data( 967 req, struct rpccli_wbint_Gid2Sid_state); 968 NTSTATUS status; 969 TALLOC_CTX *mem_ctx; 970 971 if (state->out_mem_ctx) { 972 mem_ctx = state->out_mem_ctx; 973 } else { 974 mem_ctx = state; 975 } 976 977 status = state->dispatch_recv(subreq, mem_ctx); 978 TALLOC_FREE(subreq); 979 if (!NT_STATUS_IS_OK(status)) { 980 tevent_req_nterror(req, status); 981 return; 982 } 983 984 /* Copy out parameters */ 985 *state->orig.out.sid = *state->tmp.out.sid; 986 987 /* Copy result */ 988 state->orig.out.result = state->tmp.out.result; 989 990 /* Reset temporary structure */ 991 ZERO_STRUCT(state->tmp); 992 993 tevent_req_done(req); 994} 995 996NTSTATUS rpccli_wbint_Gid2Sid_recv(struct tevent_req *req, 997 TALLOC_CTX *mem_ctx, 998 NTSTATUS *result) 999{ 1000 struct rpccli_wbint_Gid2Sid_state *state = tevent_req_data( 1001 req, struct rpccli_wbint_Gid2Sid_state); 1002 NTSTATUS status; 1003 1004 if (tevent_req_is_nterror(req, &status)) { 1005 tevent_req_received(req); 1006 return status; 1007 } 1008 1009 /* Steal possbile out parameters to the callers context */ 1010 talloc_steal(mem_ctx, state->out_mem_ctx); 1011 1012 /* Return result */ 1013 *result = state->orig.out.result; 1014 1015 tevent_req_received(req); 1016 return NT_STATUS_OK; 1017} 1018 1019NTSTATUS rpccli_wbint_Gid2Sid(struct rpc_pipe_client *cli, 1020 TALLOC_CTX *mem_ctx, 1021 const char *dom_name /* [in] [unique,charset(UTF8)] */, 1022 uint64_t gid /* [in] */, 1023 struct dom_sid *sid /* [out] [ref] */) 1024{ 1025 struct wbint_Gid2Sid r; 1026 NTSTATUS status; 1027 1028 /* In parameters */ 1029 r.in.dom_name = dom_name; 1030 r.in.gid = gid; 1031 1032 status = cli->dispatch(cli, 1033 mem_ctx, 1034 &ndr_table_wbint, 1035 NDR_WBINT_GID2SID, 1036 &r); 1037 1038 if (!NT_STATUS_IS_OK(status)) { 1039 return status; 1040 } 1041 1042 if (NT_STATUS_IS_ERR(status)) { 1043 return status; 1044 } 1045 1046 /* Return variables */ 1047 *sid = *r.out.sid; 1048 1049 /* Return result */ 1050 return r.out.result; 1051} 1052 1053struct rpccli_wbint_AllocateUid_state { 1054 struct wbint_AllocateUid orig; 1055 struct wbint_AllocateUid tmp; 1056 TALLOC_CTX *out_mem_ctx; 1057 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 1058}; 1059 1060static void rpccli_wbint_AllocateUid_done(struct tevent_req *subreq); 1061 1062struct tevent_req *rpccli_wbint_AllocateUid_send(TALLOC_CTX *mem_ctx, 1063 struct tevent_context *ev, 1064 struct rpc_pipe_client *cli, 1065 uint64_t *_uid /* [out] [ref] */) 1066{ 1067 struct tevent_req *req; 1068 struct rpccli_wbint_AllocateUid_state *state; 1069 struct tevent_req *subreq; 1070 1071 req = tevent_req_create(mem_ctx, &state, 1072 struct rpccli_wbint_AllocateUid_state); 1073 if (req == NULL) { 1074 return NULL; 1075 } 1076 state->out_mem_ctx = NULL; 1077 state->dispatch_recv = cli->dispatch_recv; 1078 1079 /* In parameters */ 1080 1081 /* Out parameters */ 1082 state->orig.out.uid = _uid; 1083 1084 /* Result */ 1085 ZERO_STRUCT(state->orig.out.result); 1086 1087 state->out_mem_ctx = talloc_named_const(state, 0, 1088 "rpccli_wbint_AllocateUid_out_memory"); 1089 if (tevent_req_nomem(state->out_mem_ctx, req)) { 1090 return tevent_req_post(req, ev); 1091 } 1092 1093 /* make a temporary copy, that we pass to the dispatch function */ 1094 state->tmp = state->orig; 1095 1096 subreq = cli->dispatch_send(state, ev, cli, 1097 &ndr_table_wbint, 1098 NDR_WBINT_ALLOCATEUID, 1099 &state->tmp); 1100 if (tevent_req_nomem(subreq, req)) { 1101 return tevent_req_post(req, ev); 1102 } 1103 tevent_req_set_callback(subreq, rpccli_wbint_AllocateUid_done, req); 1104 return req; 1105} 1106 1107static void rpccli_wbint_AllocateUid_done(struct tevent_req *subreq) 1108{ 1109 struct tevent_req *req = tevent_req_callback_data( 1110 subreq, struct tevent_req); 1111 struct rpccli_wbint_AllocateUid_state *state = tevent_req_data( 1112 req, struct rpccli_wbint_AllocateUid_state); 1113 NTSTATUS status; 1114 TALLOC_CTX *mem_ctx; 1115 1116 if (state->out_mem_ctx) { 1117 mem_ctx = state->out_mem_ctx; 1118 } else { 1119 mem_ctx = state; 1120 } 1121 1122 status = state->dispatch_recv(subreq, mem_ctx); 1123 TALLOC_FREE(subreq); 1124 if (!NT_STATUS_IS_OK(status)) { 1125 tevent_req_nterror(req, status); 1126 return; 1127 } 1128 1129 /* Copy out parameters */ 1130 *state->orig.out.uid = *state->tmp.out.uid; 1131 1132 /* Copy result */ 1133 state->orig.out.result = state->tmp.out.result; 1134 1135 /* Reset temporary structure */ 1136 ZERO_STRUCT(state->tmp); 1137 1138 tevent_req_done(req); 1139} 1140 1141NTSTATUS rpccli_wbint_AllocateUid_recv(struct tevent_req *req, 1142 TALLOC_CTX *mem_ctx, 1143 NTSTATUS *result) 1144{ 1145 struct rpccli_wbint_AllocateUid_state *state = tevent_req_data( 1146 req, struct rpccli_wbint_AllocateUid_state); 1147 NTSTATUS status; 1148 1149 if (tevent_req_is_nterror(req, &status)) { 1150 tevent_req_received(req); 1151 return status; 1152 } 1153 1154 /* Steal possbile out parameters to the callers context */ 1155 talloc_steal(mem_ctx, state->out_mem_ctx); 1156 1157 /* Return result */ 1158 *result = state->orig.out.result; 1159 1160 tevent_req_received(req); 1161 return NT_STATUS_OK; 1162} 1163 1164NTSTATUS rpccli_wbint_AllocateUid(struct rpc_pipe_client *cli, 1165 TALLOC_CTX *mem_ctx, 1166 uint64_t *uid /* [out] [ref] */) 1167{ 1168 struct wbint_AllocateUid r; 1169 NTSTATUS status; 1170 1171 /* In parameters */ 1172 1173 status = cli->dispatch(cli, 1174 mem_ctx, 1175 &ndr_table_wbint, 1176 NDR_WBINT_ALLOCATEUID, 1177 &r); 1178 1179 if (!NT_STATUS_IS_OK(status)) { 1180 return status; 1181 } 1182 1183 if (NT_STATUS_IS_ERR(status)) { 1184 return status; 1185 } 1186 1187 /* Return variables */ 1188 *uid = *r.out.uid; 1189 1190 /* Return result */ 1191 return r.out.result; 1192} 1193 1194struct rpccli_wbint_AllocateGid_state { 1195 struct wbint_AllocateGid orig; 1196 struct wbint_AllocateGid tmp; 1197 TALLOC_CTX *out_mem_ctx; 1198 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 1199}; 1200 1201static void rpccli_wbint_AllocateGid_done(struct tevent_req *subreq); 1202 1203struct tevent_req *rpccli_wbint_AllocateGid_send(TALLOC_CTX *mem_ctx, 1204 struct tevent_context *ev, 1205 struct rpc_pipe_client *cli, 1206 uint64_t *_gid /* [out] [ref] */) 1207{ 1208 struct tevent_req *req; 1209 struct rpccli_wbint_AllocateGid_state *state; 1210 struct tevent_req *subreq; 1211 1212 req = tevent_req_create(mem_ctx, &state, 1213 struct rpccli_wbint_AllocateGid_state); 1214 if (req == NULL) { 1215 return NULL; 1216 } 1217 state->out_mem_ctx = NULL; 1218 state->dispatch_recv = cli->dispatch_recv; 1219 1220 /* In parameters */ 1221 1222 /* Out parameters */ 1223 state->orig.out.gid = _gid; 1224 1225 /* Result */ 1226 ZERO_STRUCT(state->orig.out.result); 1227 1228 state->out_mem_ctx = talloc_named_const(state, 0, 1229 "rpccli_wbint_AllocateGid_out_memory"); 1230 if (tevent_req_nomem(state->out_mem_ctx, req)) { 1231 return tevent_req_post(req, ev); 1232 } 1233 1234 /* make a temporary copy, that we pass to the dispatch function */ 1235 state->tmp = state->orig; 1236 1237 subreq = cli->dispatch_send(state, ev, cli, 1238 &ndr_table_wbint, 1239 NDR_WBINT_ALLOCATEGID, 1240 &state->tmp); 1241 if (tevent_req_nomem(subreq, req)) { 1242 return tevent_req_post(req, ev); 1243 } 1244 tevent_req_set_callback(subreq, rpccli_wbint_AllocateGid_done, req); 1245 return req; 1246} 1247 1248static void rpccli_wbint_AllocateGid_done(struct tevent_req *subreq) 1249{ 1250 struct tevent_req *req = tevent_req_callback_data( 1251 subreq, struct tevent_req); 1252 struct rpccli_wbint_AllocateGid_state *state = tevent_req_data( 1253 req, struct rpccli_wbint_AllocateGid_state); 1254 NTSTATUS status; 1255 TALLOC_CTX *mem_ctx; 1256 1257 if (state->out_mem_ctx) { 1258 mem_ctx = state->out_mem_ctx; 1259 } else { 1260 mem_ctx = state; 1261 } 1262 1263 status = state->dispatch_recv(subreq, mem_ctx); 1264 TALLOC_FREE(subreq); 1265 if (!NT_STATUS_IS_OK(status)) { 1266 tevent_req_nterror(req, status); 1267 return; 1268 } 1269 1270 /* Copy out parameters */ 1271 *state->orig.out.gid = *state->tmp.out.gid; 1272 1273 /* Copy result */ 1274 state->orig.out.result = state->tmp.out.result; 1275 1276 /* Reset temporary structure */ 1277 ZERO_STRUCT(state->tmp); 1278 1279 tevent_req_done(req); 1280} 1281 1282NTSTATUS rpccli_wbint_AllocateGid_recv(struct tevent_req *req, 1283 TALLOC_CTX *mem_ctx, 1284 NTSTATUS *result) 1285{ 1286 struct rpccli_wbint_AllocateGid_state *state = tevent_req_data( 1287 req, struct rpccli_wbint_AllocateGid_state); 1288 NTSTATUS status; 1289 1290 if (tevent_req_is_nterror(req, &status)) { 1291 tevent_req_received(req); 1292 return status; 1293 } 1294 1295 /* Steal possbile out parameters to the callers context */ 1296 talloc_steal(mem_ctx, state->out_mem_ctx); 1297 1298 /* Return result */ 1299 *result = state->orig.out.result; 1300 1301 tevent_req_received(req); 1302 return NT_STATUS_OK; 1303} 1304 1305NTSTATUS rpccli_wbint_AllocateGid(struct rpc_pipe_client *cli, 1306 TALLOC_CTX *mem_ctx, 1307 uint64_t *gid /* [out] [ref] */) 1308{ 1309 struct wbint_AllocateGid r; 1310 NTSTATUS status; 1311 1312 /* In parameters */ 1313 1314 status = cli->dispatch(cli, 1315 mem_ctx, 1316 &ndr_table_wbint, 1317 NDR_WBINT_ALLOCATEGID, 1318 &r); 1319 1320 if (!NT_STATUS_IS_OK(status)) { 1321 return status; 1322 } 1323 1324 if (NT_STATUS_IS_ERR(status)) { 1325 return status; 1326 } 1327 1328 /* Return variables */ 1329 *gid = *r.out.gid; 1330 1331 /* Return result */ 1332 return r.out.result; 1333} 1334 1335struct rpccli_wbint_QueryUser_state { 1336 struct wbint_QueryUser orig; 1337 struct wbint_QueryUser tmp; 1338 TALLOC_CTX *out_mem_ctx; 1339 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 1340}; 1341 1342static void rpccli_wbint_QueryUser_done(struct tevent_req *subreq); 1343 1344struct tevent_req *rpccli_wbint_QueryUser_send(TALLOC_CTX *mem_ctx, 1345 struct tevent_context *ev, 1346 struct rpc_pipe_client *cli, 1347 struct dom_sid *_sid /* [in] [ref] */, 1348 struct wbint_userinfo *_info /* [out] [ref] */) 1349{ 1350 struct tevent_req *req; 1351 struct rpccli_wbint_QueryUser_state *state; 1352 struct tevent_req *subreq; 1353 1354 req = tevent_req_create(mem_ctx, &state, 1355 struct rpccli_wbint_QueryUser_state); 1356 if (req == NULL) { 1357 return NULL; 1358 } 1359 state->out_mem_ctx = NULL; 1360 state->dispatch_recv = cli->dispatch_recv; 1361 1362 /* In parameters */ 1363 state->orig.in.sid = _sid; 1364 1365 /* Out parameters */ 1366 state->orig.out.info = _info; 1367 1368 /* Result */ 1369 ZERO_STRUCT(state->orig.out.result); 1370 1371 state->out_mem_ctx = talloc_named_const(state, 0, 1372 "rpccli_wbint_QueryUser_out_memory"); 1373 if (tevent_req_nomem(state->out_mem_ctx, req)) { 1374 return tevent_req_post(req, ev); 1375 } 1376 1377 /* make a temporary copy, that we pass to the dispatch function */ 1378 state->tmp = state->orig; 1379 1380 subreq = cli->dispatch_send(state, ev, cli, 1381 &ndr_table_wbint, 1382 NDR_WBINT_QUERYUSER, 1383 &state->tmp); 1384 if (tevent_req_nomem(subreq, req)) { 1385 return tevent_req_post(req, ev); 1386 } 1387 tevent_req_set_callback(subreq, rpccli_wbint_QueryUser_done, req); 1388 return req; 1389} 1390 1391static void rpccli_wbint_QueryUser_done(struct tevent_req *subreq) 1392{ 1393 struct tevent_req *req = tevent_req_callback_data( 1394 subreq, struct tevent_req); 1395 struct rpccli_wbint_QueryUser_state *state = tevent_req_data( 1396 req, struct rpccli_wbint_QueryUser_state); 1397 NTSTATUS status; 1398 TALLOC_CTX *mem_ctx; 1399 1400 if (state->out_mem_ctx) { 1401 mem_ctx = state->out_mem_ctx; 1402 } else { 1403 mem_ctx = state; 1404 } 1405 1406 status = state->dispatch_recv(subreq, mem_ctx); 1407 TALLOC_FREE(subreq); 1408 if (!NT_STATUS_IS_OK(status)) { 1409 tevent_req_nterror(req, status); 1410 return; 1411 } 1412 1413 /* Copy out parameters */ 1414 *state->orig.out.info = *state->tmp.out.info; 1415 1416 /* Copy result */ 1417 state->orig.out.result = state->tmp.out.result; 1418 1419 /* Reset temporary structure */ 1420 ZERO_STRUCT(state->tmp); 1421 1422 tevent_req_done(req); 1423} 1424 1425NTSTATUS rpccli_wbint_QueryUser_recv(struct tevent_req *req, 1426 TALLOC_CTX *mem_ctx, 1427 NTSTATUS *result) 1428{ 1429 struct rpccli_wbint_QueryUser_state *state = tevent_req_data( 1430 req, struct rpccli_wbint_QueryUser_state); 1431 NTSTATUS status; 1432 1433 if (tevent_req_is_nterror(req, &status)) { 1434 tevent_req_received(req); 1435 return status; 1436 } 1437 1438 /* Steal possbile out parameters to the callers context */ 1439 talloc_steal(mem_ctx, state->out_mem_ctx); 1440 1441 /* Return result */ 1442 *result = state->orig.out.result; 1443 1444 tevent_req_received(req); 1445 return NT_STATUS_OK; 1446} 1447 1448NTSTATUS rpccli_wbint_QueryUser(struct rpc_pipe_client *cli, 1449 TALLOC_CTX *mem_ctx, 1450 struct dom_sid *sid /* [in] [ref] */, 1451 struct wbint_userinfo *info /* [out] [ref] */) 1452{ 1453 struct wbint_QueryUser r; 1454 NTSTATUS status; 1455 1456 /* In parameters */ 1457 r.in.sid = sid; 1458 1459 status = cli->dispatch(cli, 1460 mem_ctx, 1461 &ndr_table_wbint, 1462 NDR_WBINT_QUERYUSER, 1463 &r); 1464 1465 if (!NT_STATUS_IS_OK(status)) { 1466 return status; 1467 } 1468 1469 if (NT_STATUS_IS_ERR(status)) { 1470 return status; 1471 } 1472 1473 /* Return variables */ 1474 *info = *r.out.info; 1475 1476 /* Return result */ 1477 return r.out.result; 1478} 1479 1480struct rpccli_wbint_LookupUserAliases_state { 1481 struct wbint_LookupUserAliases orig; 1482 struct wbint_LookupUserAliases tmp; 1483 TALLOC_CTX *out_mem_ctx; 1484 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 1485}; 1486 1487static void rpccli_wbint_LookupUserAliases_done(struct tevent_req *subreq); 1488 1489struct tevent_req *rpccli_wbint_LookupUserAliases_send(TALLOC_CTX *mem_ctx, 1490 struct tevent_context *ev, 1491 struct rpc_pipe_client *cli, 1492 struct wbint_SidArray *_sids /* [in] [ref] */, 1493 struct wbint_RidArray *_rids /* [out] [ref] */) 1494{ 1495 struct tevent_req *req; 1496 struct rpccli_wbint_LookupUserAliases_state *state; 1497 struct tevent_req *subreq; 1498 1499 req = tevent_req_create(mem_ctx, &state, 1500 struct rpccli_wbint_LookupUserAliases_state); 1501 if (req == NULL) { 1502 return NULL; 1503 } 1504 state->out_mem_ctx = NULL; 1505 state->dispatch_recv = cli->dispatch_recv; 1506 1507 /* In parameters */ 1508 state->orig.in.sids = _sids; 1509 1510 /* Out parameters */ 1511 state->orig.out.rids = _rids; 1512 1513 /* Result */ 1514 ZERO_STRUCT(state->orig.out.result); 1515 1516 state->out_mem_ctx = talloc_named_const(state, 0, 1517 "rpccli_wbint_LookupUserAliases_out_memory"); 1518 if (tevent_req_nomem(state->out_mem_ctx, req)) { 1519 return tevent_req_post(req, ev); 1520 } 1521 1522 /* make a temporary copy, that we pass to the dispatch function */ 1523 state->tmp = state->orig; 1524 1525 subreq = cli->dispatch_send(state, ev, cli, 1526 &ndr_table_wbint, 1527 NDR_WBINT_LOOKUPUSERALIASES, 1528 &state->tmp); 1529 if (tevent_req_nomem(subreq, req)) { 1530 return tevent_req_post(req, ev); 1531 } 1532 tevent_req_set_callback(subreq, rpccli_wbint_LookupUserAliases_done, req); 1533 return req; 1534} 1535 1536static void rpccli_wbint_LookupUserAliases_done(struct tevent_req *subreq) 1537{ 1538 struct tevent_req *req = tevent_req_callback_data( 1539 subreq, struct tevent_req); 1540 struct rpccli_wbint_LookupUserAliases_state *state = tevent_req_data( 1541 req, struct rpccli_wbint_LookupUserAliases_state); 1542 NTSTATUS status; 1543 TALLOC_CTX *mem_ctx; 1544 1545 if (state->out_mem_ctx) { 1546 mem_ctx = state->out_mem_ctx; 1547 } else { 1548 mem_ctx = state; 1549 } 1550 1551 status = state->dispatch_recv(subreq, mem_ctx); 1552 TALLOC_FREE(subreq); 1553 if (!NT_STATUS_IS_OK(status)) { 1554 tevent_req_nterror(req, status); 1555 return; 1556 } 1557 1558 /* Copy out parameters */ 1559 *state->orig.out.rids = *state->tmp.out.rids; 1560 1561 /* Copy result */ 1562 state->orig.out.result = state->tmp.out.result; 1563 1564 /* Reset temporary structure */ 1565 ZERO_STRUCT(state->tmp); 1566 1567 tevent_req_done(req); 1568} 1569 1570NTSTATUS rpccli_wbint_LookupUserAliases_recv(struct tevent_req *req, 1571 TALLOC_CTX *mem_ctx, 1572 NTSTATUS *result) 1573{ 1574 struct rpccli_wbint_LookupUserAliases_state *state = tevent_req_data( 1575 req, struct rpccli_wbint_LookupUserAliases_state); 1576 NTSTATUS status; 1577 1578 if (tevent_req_is_nterror(req, &status)) { 1579 tevent_req_received(req); 1580 return status; 1581 } 1582 1583 /* Steal possbile out parameters to the callers context */ 1584 talloc_steal(mem_ctx, state->out_mem_ctx); 1585 1586 /* Return result */ 1587 *result = state->orig.out.result; 1588 1589 tevent_req_received(req); 1590 return NT_STATUS_OK; 1591} 1592 1593NTSTATUS rpccli_wbint_LookupUserAliases(struct rpc_pipe_client *cli, 1594 TALLOC_CTX *mem_ctx, 1595 struct wbint_SidArray *sids /* [in] [ref] */, 1596 struct wbint_RidArray *rids /* [out] [ref] */) 1597{ 1598 struct wbint_LookupUserAliases r; 1599 NTSTATUS status; 1600 1601 /* In parameters */ 1602 r.in.sids = sids; 1603 1604 status = cli->dispatch(cli, 1605 mem_ctx, 1606 &ndr_table_wbint, 1607 NDR_WBINT_LOOKUPUSERALIASES, 1608 &r); 1609 1610 if (!NT_STATUS_IS_OK(status)) { 1611 return status; 1612 } 1613 1614 if (NT_STATUS_IS_ERR(status)) { 1615 return status; 1616 } 1617 1618 /* Return variables */ 1619 *rids = *r.out.rids; 1620 1621 /* Return result */ 1622 return r.out.result; 1623} 1624 1625struct rpccli_wbint_LookupUserGroups_state { 1626 struct wbint_LookupUserGroups orig; 1627 struct wbint_LookupUserGroups tmp; 1628 TALLOC_CTX *out_mem_ctx; 1629 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 1630}; 1631 1632static void rpccli_wbint_LookupUserGroups_done(struct tevent_req *subreq); 1633 1634struct tevent_req *rpccli_wbint_LookupUserGroups_send(TALLOC_CTX *mem_ctx, 1635 struct tevent_context *ev, 1636 struct rpc_pipe_client *cli, 1637 struct dom_sid *_sid /* [in] [ref] */, 1638 struct wbint_SidArray *_sids /* [out] [ref] */) 1639{ 1640 struct tevent_req *req; 1641 struct rpccli_wbint_LookupUserGroups_state *state; 1642 struct tevent_req *subreq; 1643 1644 req = tevent_req_create(mem_ctx, &state, 1645 struct rpccli_wbint_LookupUserGroups_state); 1646 if (req == NULL) { 1647 return NULL; 1648 } 1649 state->out_mem_ctx = NULL; 1650 state->dispatch_recv = cli->dispatch_recv; 1651 1652 /* In parameters */ 1653 state->orig.in.sid = _sid; 1654 1655 /* Out parameters */ 1656 state->orig.out.sids = _sids; 1657 1658 /* Result */ 1659 ZERO_STRUCT(state->orig.out.result); 1660 1661 state->out_mem_ctx = talloc_named_const(state, 0, 1662 "rpccli_wbint_LookupUserGroups_out_memory"); 1663 if (tevent_req_nomem(state->out_mem_ctx, req)) { 1664 return tevent_req_post(req, ev); 1665 } 1666 1667 /* make a temporary copy, that we pass to the dispatch function */ 1668 state->tmp = state->orig; 1669 1670 subreq = cli->dispatch_send(state, ev, cli, 1671 &ndr_table_wbint, 1672 NDR_WBINT_LOOKUPUSERGROUPS, 1673 &state->tmp); 1674 if (tevent_req_nomem(subreq, req)) { 1675 return tevent_req_post(req, ev); 1676 } 1677 tevent_req_set_callback(subreq, rpccli_wbint_LookupUserGroups_done, req); 1678 return req; 1679} 1680 1681static void rpccli_wbint_LookupUserGroups_done(struct tevent_req *subreq) 1682{ 1683 struct tevent_req *req = tevent_req_callback_data( 1684 subreq, struct tevent_req); 1685 struct rpccli_wbint_LookupUserGroups_state *state = tevent_req_data( 1686 req, struct rpccli_wbint_LookupUserGroups_state); 1687 NTSTATUS status; 1688 TALLOC_CTX *mem_ctx; 1689 1690 if (state->out_mem_ctx) { 1691 mem_ctx = state->out_mem_ctx; 1692 } else { 1693 mem_ctx = state; 1694 } 1695 1696 status = state->dispatch_recv(subreq, mem_ctx); 1697 TALLOC_FREE(subreq); 1698 if (!NT_STATUS_IS_OK(status)) { 1699 tevent_req_nterror(req, status); 1700 return; 1701 } 1702 1703 /* Copy out parameters */ 1704 *state->orig.out.sids = *state->tmp.out.sids; 1705 1706 /* Copy result */ 1707 state->orig.out.result = state->tmp.out.result; 1708 1709 /* Reset temporary structure */ 1710 ZERO_STRUCT(state->tmp); 1711 1712 tevent_req_done(req); 1713} 1714 1715NTSTATUS rpccli_wbint_LookupUserGroups_recv(struct tevent_req *req, 1716 TALLOC_CTX *mem_ctx, 1717 NTSTATUS *result) 1718{ 1719 struct rpccli_wbint_LookupUserGroups_state *state = tevent_req_data( 1720 req, struct rpccli_wbint_LookupUserGroups_state); 1721 NTSTATUS status; 1722 1723 if (tevent_req_is_nterror(req, &status)) { 1724 tevent_req_received(req); 1725 return status; 1726 } 1727 1728 /* Steal possbile out parameters to the callers context */ 1729 talloc_steal(mem_ctx, state->out_mem_ctx); 1730 1731 /* Return result */ 1732 *result = state->orig.out.result; 1733 1734 tevent_req_received(req); 1735 return NT_STATUS_OK; 1736} 1737 1738NTSTATUS rpccli_wbint_LookupUserGroups(struct rpc_pipe_client *cli, 1739 TALLOC_CTX *mem_ctx, 1740 struct dom_sid *sid /* [in] [ref] */, 1741 struct wbint_SidArray *sids /* [out] [ref] */) 1742{ 1743 struct wbint_LookupUserGroups r; 1744 NTSTATUS status; 1745 1746 /* In parameters */ 1747 r.in.sid = sid; 1748 1749 status = cli->dispatch(cli, 1750 mem_ctx, 1751 &ndr_table_wbint, 1752 NDR_WBINT_LOOKUPUSERGROUPS, 1753 &r); 1754 1755 if (!NT_STATUS_IS_OK(status)) { 1756 return status; 1757 } 1758 1759 if (NT_STATUS_IS_ERR(status)) { 1760 return status; 1761 } 1762 1763 /* Return variables */ 1764 *sids = *r.out.sids; 1765 1766 /* Return result */ 1767 return r.out.result; 1768} 1769 1770struct rpccli_wbint_QuerySequenceNumber_state { 1771 struct wbint_QuerySequenceNumber orig; 1772 struct wbint_QuerySequenceNumber tmp; 1773 TALLOC_CTX *out_mem_ctx; 1774 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 1775}; 1776 1777static void rpccli_wbint_QuerySequenceNumber_done(struct tevent_req *subreq); 1778 1779struct tevent_req *rpccli_wbint_QuerySequenceNumber_send(TALLOC_CTX *mem_ctx, 1780 struct tevent_context *ev, 1781 struct rpc_pipe_client *cli, 1782 uint32_t *_sequence /* [out] [ref] */) 1783{ 1784 struct tevent_req *req; 1785 struct rpccli_wbint_QuerySequenceNumber_state *state; 1786 struct tevent_req *subreq; 1787 1788 req = tevent_req_create(mem_ctx, &state, 1789 struct rpccli_wbint_QuerySequenceNumber_state); 1790 if (req == NULL) { 1791 return NULL; 1792 } 1793 state->out_mem_ctx = NULL; 1794 state->dispatch_recv = cli->dispatch_recv; 1795 1796 /* In parameters */ 1797 1798 /* Out parameters */ 1799 state->orig.out.sequence = _sequence; 1800 1801 /* Result */ 1802 ZERO_STRUCT(state->orig.out.result); 1803 1804 state->out_mem_ctx = talloc_named_const(state, 0, 1805 "rpccli_wbint_QuerySequenceNumber_out_memory"); 1806 if (tevent_req_nomem(state->out_mem_ctx, req)) { 1807 return tevent_req_post(req, ev); 1808 } 1809 1810 /* make a temporary copy, that we pass to the dispatch function */ 1811 state->tmp = state->orig; 1812 1813 subreq = cli->dispatch_send(state, ev, cli, 1814 &ndr_table_wbint, 1815 NDR_WBINT_QUERYSEQUENCENUMBER, 1816 &state->tmp); 1817 if (tevent_req_nomem(subreq, req)) { 1818 return tevent_req_post(req, ev); 1819 } 1820 tevent_req_set_callback(subreq, rpccli_wbint_QuerySequenceNumber_done, req); 1821 return req; 1822} 1823 1824static void rpccli_wbint_QuerySequenceNumber_done(struct tevent_req *subreq) 1825{ 1826 struct tevent_req *req = tevent_req_callback_data( 1827 subreq, struct tevent_req); 1828 struct rpccli_wbint_QuerySequenceNumber_state *state = tevent_req_data( 1829 req, struct rpccli_wbint_QuerySequenceNumber_state); 1830 NTSTATUS status; 1831 TALLOC_CTX *mem_ctx; 1832 1833 if (state->out_mem_ctx) { 1834 mem_ctx = state->out_mem_ctx; 1835 } else { 1836 mem_ctx = state; 1837 } 1838 1839 status = state->dispatch_recv(subreq, mem_ctx); 1840 TALLOC_FREE(subreq); 1841 if (!NT_STATUS_IS_OK(status)) { 1842 tevent_req_nterror(req, status); 1843 return; 1844 } 1845 1846 /* Copy out parameters */ 1847 *state->orig.out.sequence = *state->tmp.out.sequence; 1848 1849 /* Copy result */ 1850 state->orig.out.result = state->tmp.out.result; 1851 1852 /* Reset temporary structure */ 1853 ZERO_STRUCT(state->tmp); 1854 1855 tevent_req_done(req); 1856} 1857 1858NTSTATUS rpccli_wbint_QuerySequenceNumber_recv(struct tevent_req *req, 1859 TALLOC_CTX *mem_ctx, 1860 NTSTATUS *result) 1861{ 1862 struct rpccli_wbint_QuerySequenceNumber_state *state = tevent_req_data( 1863 req, struct rpccli_wbint_QuerySequenceNumber_state); 1864 NTSTATUS status; 1865 1866 if (tevent_req_is_nterror(req, &status)) { 1867 tevent_req_received(req); 1868 return status; 1869 } 1870 1871 /* Steal possbile out parameters to the callers context */ 1872 talloc_steal(mem_ctx, state->out_mem_ctx); 1873 1874 /* Return result */ 1875 *result = state->orig.out.result; 1876 1877 tevent_req_received(req); 1878 return NT_STATUS_OK; 1879} 1880 1881NTSTATUS rpccli_wbint_QuerySequenceNumber(struct rpc_pipe_client *cli, 1882 TALLOC_CTX *mem_ctx, 1883 uint32_t *sequence /* [out] [ref] */) 1884{ 1885 struct wbint_QuerySequenceNumber r; 1886 NTSTATUS status; 1887 1888 /* In parameters */ 1889 1890 status = cli->dispatch(cli, 1891 mem_ctx, 1892 &ndr_table_wbint, 1893 NDR_WBINT_QUERYSEQUENCENUMBER, 1894 &r); 1895 1896 if (!NT_STATUS_IS_OK(status)) { 1897 return status; 1898 } 1899 1900 if (NT_STATUS_IS_ERR(status)) { 1901 return status; 1902 } 1903 1904 /* Return variables */ 1905 *sequence = *r.out.sequence; 1906 1907 /* Return result */ 1908 return r.out.result; 1909} 1910 1911struct rpccli_wbint_LookupGroupMembers_state { 1912 struct wbint_LookupGroupMembers orig; 1913 struct wbint_LookupGroupMembers tmp; 1914 TALLOC_CTX *out_mem_ctx; 1915 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 1916}; 1917 1918static void rpccli_wbint_LookupGroupMembers_done(struct tevent_req *subreq); 1919 1920struct tevent_req *rpccli_wbint_LookupGroupMembers_send(TALLOC_CTX *mem_ctx, 1921 struct tevent_context *ev, 1922 struct rpc_pipe_client *cli, 1923 struct dom_sid *_sid /* [in] [ref] */, 1924 enum lsa_SidType _type /* [in] */, 1925 struct wbint_Principals *_members /* [out] [ref] */) 1926{ 1927 struct tevent_req *req; 1928 struct rpccli_wbint_LookupGroupMembers_state *state; 1929 struct tevent_req *subreq; 1930 1931 req = tevent_req_create(mem_ctx, &state, 1932 struct rpccli_wbint_LookupGroupMembers_state); 1933 if (req == NULL) { 1934 return NULL; 1935 } 1936 state->out_mem_ctx = NULL; 1937 state->dispatch_recv = cli->dispatch_recv; 1938 1939 /* In parameters */ 1940 state->orig.in.sid = _sid; 1941 state->orig.in.type = _type; 1942 1943 /* Out parameters */ 1944 state->orig.out.members = _members; 1945 1946 /* Result */ 1947 ZERO_STRUCT(state->orig.out.result); 1948 1949 state->out_mem_ctx = talloc_named_const(state, 0, 1950 "rpccli_wbint_LookupGroupMembers_out_memory"); 1951 if (tevent_req_nomem(state->out_mem_ctx, req)) { 1952 return tevent_req_post(req, ev); 1953 } 1954 1955 /* make a temporary copy, that we pass to the dispatch function */ 1956 state->tmp = state->orig; 1957 1958 subreq = cli->dispatch_send(state, ev, cli, 1959 &ndr_table_wbint, 1960 NDR_WBINT_LOOKUPGROUPMEMBERS, 1961 &state->tmp); 1962 if (tevent_req_nomem(subreq, req)) { 1963 return tevent_req_post(req, ev); 1964 } 1965 tevent_req_set_callback(subreq, rpccli_wbint_LookupGroupMembers_done, req); 1966 return req; 1967} 1968 1969static void rpccli_wbint_LookupGroupMembers_done(struct tevent_req *subreq) 1970{ 1971 struct tevent_req *req = tevent_req_callback_data( 1972 subreq, struct tevent_req); 1973 struct rpccli_wbint_LookupGroupMembers_state *state = tevent_req_data( 1974 req, struct rpccli_wbint_LookupGroupMembers_state); 1975 NTSTATUS status; 1976 TALLOC_CTX *mem_ctx; 1977 1978 if (state->out_mem_ctx) { 1979 mem_ctx = state->out_mem_ctx; 1980 } else { 1981 mem_ctx = state; 1982 } 1983 1984 status = state->dispatch_recv(subreq, mem_ctx); 1985 TALLOC_FREE(subreq); 1986 if (!NT_STATUS_IS_OK(status)) { 1987 tevent_req_nterror(req, status); 1988 return; 1989 } 1990 1991 /* Copy out parameters */ 1992 *state->orig.out.members = *state->tmp.out.members; 1993 1994 /* Copy result */ 1995 state->orig.out.result = state->tmp.out.result; 1996 1997 /* Reset temporary structure */ 1998 ZERO_STRUCT(state->tmp); 1999 2000 tevent_req_done(req); 2001} 2002 2003NTSTATUS rpccli_wbint_LookupGroupMembers_recv(struct tevent_req *req, 2004 TALLOC_CTX *mem_ctx, 2005 NTSTATUS *result) 2006{ 2007 struct rpccli_wbint_LookupGroupMembers_state *state = tevent_req_data( 2008 req, struct rpccli_wbint_LookupGroupMembers_state); 2009 NTSTATUS status; 2010 2011 if (tevent_req_is_nterror(req, &status)) { 2012 tevent_req_received(req); 2013 return status; 2014 } 2015 2016 /* Steal possbile out parameters to the callers context */ 2017 talloc_steal(mem_ctx, state->out_mem_ctx); 2018 2019 /* Return result */ 2020 *result = state->orig.out.result; 2021 2022 tevent_req_received(req); 2023 return NT_STATUS_OK; 2024} 2025 2026NTSTATUS rpccli_wbint_LookupGroupMembers(struct rpc_pipe_client *cli, 2027 TALLOC_CTX *mem_ctx, 2028 struct dom_sid *sid /* [in] [ref] */, 2029 enum lsa_SidType type /* [in] */, 2030 struct wbint_Principals *members /* [out] [ref] */) 2031{ 2032 struct wbint_LookupGroupMembers r; 2033 NTSTATUS status; 2034 2035 /* In parameters */ 2036 r.in.sid = sid; 2037 r.in.type = type; 2038 2039 status = cli->dispatch(cli, 2040 mem_ctx, 2041 &ndr_table_wbint, 2042 NDR_WBINT_LOOKUPGROUPMEMBERS, 2043 &r); 2044 2045 if (!NT_STATUS_IS_OK(status)) { 2046 return status; 2047 } 2048 2049 if (NT_STATUS_IS_ERR(status)) { 2050 return status; 2051 } 2052 2053 /* Return variables */ 2054 *members = *r.out.members; 2055 2056 /* Return result */ 2057 return r.out.result; 2058} 2059 2060struct rpccli_wbint_QueryUserList_state { 2061 struct wbint_QueryUserList orig; 2062 struct wbint_QueryUserList tmp; 2063 TALLOC_CTX *out_mem_ctx; 2064 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 2065}; 2066 2067static void rpccli_wbint_QueryUserList_done(struct tevent_req *subreq); 2068 2069struct tevent_req *rpccli_wbint_QueryUserList_send(TALLOC_CTX *mem_ctx, 2070 struct tevent_context *ev, 2071 struct rpc_pipe_client *cli, 2072 struct wbint_userinfos *_users /* [out] [ref] */) 2073{ 2074 struct tevent_req *req; 2075 struct rpccli_wbint_QueryUserList_state *state; 2076 struct tevent_req *subreq; 2077 2078 req = tevent_req_create(mem_ctx, &state, 2079 struct rpccli_wbint_QueryUserList_state); 2080 if (req == NULL) { 2081 return NULL; 2082 } 2083 state->out_mem_ctx = NULL; 2084 state->dispatch_recv = cli->dispatch_recv; 2085 2086 /* In parameters */ 2087 2088 /* Out parameters */ 2089 state->orig.out.users = _users; 2090 2091 /* Result */ 2092 ZERO_STRUCT(state->orig.out.result); 2093 2094 state->out_mem_ctx = talloc_named_const(state, 0, 2095 "rpccli_wbint_QueryUserList_out_memory"); 2096 if (tevent_req_nomem(state->out_mem_ctx, req)) { 2097 return tevent_req_post(req, ev); 2098 } 2099 2100 /* make a temporary copy, that we pass to the dispatch function */ 2101 state->tmp = state->orig; 2102 2103 subreq = cli->dispatch_send(state, ev, cli, 2104 &ndr_table_wbint, 2105 NDR_WBINT_QUERYUSERLIST, 2106 &state->tmp); 2107 if (tevent_req_nomem(subreq, req)) { 2108 return tevent_req_post(req, ev); 2109 } 2110 tevent_req_set_callback(subreq, rpccli_wbint_QueryUserList_done, req); 2111 return req; 2112} 2113 2114static void rpccli_wbint_QueryUserList_done(struct tevent_req *subreq) 2115{ 2116 struct tevent_req *req = tevent_req_callback_data( 2117 subreq, struct tevent_req); 2118 struct rpccli_wbint_QueryUserList_state *state = tevent_req_data( 2119 req, struct rpccli_wbint_QueryUserList_state); 2120 NTSTATUS status; 2121 TALLOC_CTX *mem_ctx; 2122 2123 if (state->out_mem_ctx) { 2124 mem_ctx = state->out_mem_ctx; 2125 } else { 2126 mem_ctx = state; 2127 } 2128 2129 status = state->dispatch_recv(subreq, mem_ctx); 2130 TALLOC_FREE(subreq); 2131 if (!NT_STATUS_IS_OK(status)) { 2132 tevent_req_nterror(req, status); 2133 return; 2134 } 2135 2136 /* Copy out parameters */ 2137 *state->orig.out.users = *state->tmp.out.users; 2138 2139 /* Copy result */ 2140 state->orig.out.result = state->tmp.out.result; 2141 2142 /* Reset temporary structure */ 2143 ZERO_STRUCT(state->tmp); 2144 2145 tevent_req_done(req); 2146} 2147 2148NTSTATUS rpccli_wbint_QueryUserList_recv(struct tevent_req *req, 2149 TALLOC_CTX *mem_ctx, 2150 NTSTATUS *result) 2151{ 2152 struct rpccli_wbint_QueryUserList_state *state = tevent_req_data( 2153 req, struct rpccli_wbint_QueryUserList_state); 2154 NTSTATUS status; 2155 2156 if (tevent_req_is_nterror(req, &status)) { 2157 tevent_req_received(req); 2158 return status; 2159 } 2160 2161 /* Steal possbile out parameters to the callers context */ 2162 talloc_steal(mem_ctx, state->out_mem_ctx); 2163 2164 /* Return result */ 2165 *result = state->orig.out.result; 2166 2167 tevent_req_received(req); 2168 return NT_STATUS_OK; 2169} 2170 2171NTSTATUS rpccli_wbint_QueryUserList(struct rpc_pipe_client *cli, 2172 TALLOC_CTX *mem_ctx, 2173 struct wbint_userinfos *users /* [out] [ref] */) 2174{ 2175 struct wbint_QueryUserList r; 2176 NTSTATUS status; 2177 2178 /* In parameters */ 2179 2180 status = cli->dispatch(cli, 2181 mem_ctx, 2182 &ndr_table_wbint, 2183 NDR_WBINT_QUERYUSERLIST, 2184 &r); 2185 2186 if (!NT_STATUS_IS_OK(status)) { 2187 return status; 2188 } 2189 2190 if (NT_STATUS_IS_ERR(status)) { 2191 return status; 2192 } 2193 2194 /* Return variables */ 2195 *users = *r.out.users; 2196 2197 /* Return result */ 2198 return r.out.result; 2199} 2200 2201struct rpccli_wbint_QueryGroupList_state { 2202 struct wbint_QueryGroupList orig; 2203 struct wbint_QueryGroupList tmp; 2204 TALLOC_CTX *out_mem_ctx; 2205 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 2206}; 2207 2208static void rpccli_wbint_QueryGroupList_done(struct tevent_req *subreq); 2209 2210struct tevent_req *rpccli_wbint_QueryGroupList_send(TALLOC_CTX *mem_ctx, 2211 struct tevent_context *ev, 2212 struct rpc_pipe_client *cli, 2213 struct wbint_Principals *_groups /* [out] [ref] */) 2214{ 2215 struct tevent_req *req; 2216 struct rpccli_wbint_QueryGroupList_state *state; 2217 struct tevent_req *subreq; 2218 2219 req = tevent_req_create(mem_ctx, &state, 2220 struct rpccli_wbint_QueryGroupList_state); 2221 if (req == NULL) { 2222 return NULL; 2223 } 2224 state->out_mem_ctx = NULL; 2225 state->dispatch_recv = cli->dispatch_recv; 2226 2227 /* In parameters */ 2228 2229 /* Out parameters */ 2230 state->orig.out.groups = _groups; 2231 2232 /* Result */ 2233 ZERO_STRUCT(state->orig.out.result); 2234 2235 state->out_mem_ctx = talloc_named_const(state, 0, 2236 "rpccli_wbint_QueryGroupList_out_memory"); 2237 if (tevent_req_nomem(state->out_mem_ctx, req)) { 2238 return tevent_req_post(req, ev); 2239 } 2240 2241 /* make a temporary copy, that we pass to the dispatch function */ 2242 state->tmp = state->orig; 2243 2244 subreq = cli->dispatch_send(state, ev, cli, 2245 &ndr_table_wbint, 2246 NDR_WBINT_QUERYGROUPLIST, 2247 &state->tmp); 2248 if (tevent_req_nomem(subreq, req)) { 2249 return tevent_req_post(req, ev); 2250 } 2251 tevent_req_set_callback(subreq, rpccli_wbint_QueryGroupList_done, req); 2252 return req; 2253} 2254 2255static void rpccli_wbint_QueryGroupList_done(struct tevent_req *subreq) 2256{ 2257 struct tevent_req *req = tevent_req_callback_data( 2258 subreq, struct tevent_req); 2259 struct rpccli_wbint_QueryGroupList_state *state = tevent_req_data( 2260 req, struct rpccli_wbint_QueryGroupList_state); 2261 NTSTATUS status; 2262 TALLOC_CTX *mem_ctx; 2263 2264 if (state->out_mem_ctx) { 2265 mem_ctx = state->out_mem_ctx; 2266 } else { 2267 mem_ctx = state; 2268 } 2269 2270 status = state->dispatch_recv(subreq, mem_ctx); 2271 TALLOC_FREE(subreq); 2272 if (!NT_STATUS_IS_OK(status)) { 2273 tevent_req_nterror(req, status); 2274 return; 2275 } 2276 2277 /* Copy out parameters */ 2278 *state->orig.out.groups = *state->tmp.out.groups; 2279 2280 /* Copy result */ 2281 state->orig.out.result = state->tmp.out.result; 2282 2283 /* Reset temporary structure */ 2284 ZERO_STRUCT(state->tmp); 2285 2286 tevent_req_done(req); 2287} 2288 2289NTSTATUS rpccli_wbint_QueryGroupList_recv(struct tevent_req *req, 2290 TALLOC_CTX *mem_ctx, 2291 NTSTATUS *result) 2292{ 2293 struct rpccli_wbint_QueryGroupList_state *state = tevent_req_data( 2294 req, struct rpccli_wbint_QueryGroupList_state); 2295 NTSTATUS status; 2296 2297 if (tevent_req_is_nterror(req, &status)) { 2298 tevent_req_received(req); 2299 return status; 2300 } 2301 2302 /* Steal possbile out parameters to the callers context */ 2303 talloc_steal(mem_ctx, state->out_mem_ctx); 2304 2305 /* Return result */ 2306 *result = state->orig.out.result; 2307 2308 tevent_req_received(req); 2309 return NT_STATUS_OK; 2310} 2311 2312NTSTATUS rpccli_wbint_QueryGroupList(struct rpc_pipe_client *cli, 2313 TALLOC_CTX *mem_ctx, 2314 struct wbint_Principals *groups /* [out] [ref] */) 2315{ 2316 struct wbint_QueryGroupList r; 2317 NTSTATUS status; 2318 2319 /* In parameters */ 2320 2321 status = cli->dispatch(cli, 2322 mem_ctx, 2323 &ndr_table_wbint, 2324 NDR_WBINT_QUERYGROUPLIST, 2325 &r); 2326 2327 if (!NT_STATUS_IS_OK(status)) { 2328 return status; 2329 } 2330 2331 if (NT_STATUS_IS_ERR(status)) { 2332 return status; 2333 } 2334 2335 /* Return variables */ 2336 *groups = *r.out.groups; 2337 2338 /* Return result */ 2339 return r.out.result; 2340} 2341 2342struct rpccli_wbint_DsGetDcName_state { 2343 struct wbint_DsGetDcName orig; 2344 struct wbint_DsGetDcName tmp; 2345 TALLOC_CTX *out_mem_ctx; 2346 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 2347}; 2348 2349static void rpccli_wbint_DsGetDcName_done(struct tevent_req *subreq); 2350 2351struct tevent_req *rpccli_wbint_DsGetDcName_send(TALLOC_CTX *mem_ctx, 2352 struct tevent_context *ev, 2353 struct rpc_pipe_client *cli, 2354 const char *_domain_name /* [in] [ref,charset(UTF8)] */, 2355 struct GUID *_domain_guid /* [in] [unique] */, 2356 const char *_site_name /* [in] [unique,charset(UTF8)] */, 2357 uint32_t _flags /* [in] */, 2358 struct netr_DsRGetDCNameInfo **_dc_info /* [out] [ref] */) 2359{ 2360 struct tevent_req *req; 2361 struct rpccli_wbint_DsGetDcName_state *state; 2362 struct tevent_req *subreq; 2363 2364 req = tevent_req_create(mem_ctx, &state, 2365 struct rpccli_wbint_DsGetDcName_state); 2366 if (req == NULL) { 2367 return NULL; 2368 } 2369 state->out_mem_ctx = NULL; 2370 state->dispatch_recv = cli->dispatch_recv; 2371 2372 /* In parameters */ 2373 state->orig.in.domain_name = _domain_name; 2374 state->orig.in.domain_guid = _domain_guid; 2375 state->orig.in.site_name = _site_name; 2376 state->orig.in.flags = _flags; 2377 2378 /* Out parameters */ 2379 state->orig.out.dc_info = _dc_info; 2380 2381 /* Result */ 2382 ZERO_STRUCT(state->orig.out.result); 2383 2384 state->out_mem_ctx = talloc_named_const(state, 0, 2385 "rpccli_wbint_DsGetDcName_out_memory"); 2386 if (tevent_req_nomem(state->out_mem_ctx, req)) { 2387 return tevent_req_post(req, ev); 2388 } 2389 2390 /* make a temporary copy, that we pass to the dispatch function */ 2391 state->tmp = state->orig; 2392 2393 subreq = cli->dispatch_send(state, ev, cli, 2394 &ndr_table_wbint, 2395 NDR_WBINT_DSGETDCNAME, 2396 &state->tmp); 2397 if (tevent_req_nomem(subreq, req)) { 2398 return tevent_req_post(req, ev); 2399 } 2400 tevent_req_set_callback(subreq, rpccli_wbint_DsGetDcName_done, req); 2401 return req; 2402} 2403 2404static void rpccli_wbint_DsGetDcName_done(struct tevent_req *subreq) 2405{ 2406 struct tevent_req *req = tevent_req_callback_data( 2407 subreq, struct tevent_req); 2408 struct rpccli_wbint_DsGetDcName_state *state = tevent_req_data( 2409 req, struct rpccli_wbint_DsGetDcName_state); 2410 NTSTATUS status; 2411 TALLOC_CTX *mem_ctx; 2412 2413 if (state->out_mem_ctx) { 2414 mem_ctx = state->out_mem_ctx; 2415 } else { 2416 mem_ctx = state; 2417 } 2418 2419 status = state->dispatch_recv(subreq, mem_ctx); 2420 TALLOC_FREE(subreq); 2421 if (!NT_STATUS_IS_OK(status)) { 2422 tevent_req_nterror(req, status); 2423 return; 2424 } 2425 2426 /* Copy out parameters */ 2427 *state->orig.out.dc_info = *state->tmp.out.dc_info; 2428 2429 /* Copy result */ 2430 state->orig.out.result = state->tmp.out.result; 2431 2432 /* Reset temporary structure */ 2433 ZERO_STRUCT(state->tmp); 2434 2435 tevent_req_done(req); 2436} 2437 2438NTSTATUS rpccli_wbint_DsGetDcName_recv(struct tevent_req *req, 2439 TALLOC_CTX *mem_ctx, 2440 NTSTATUS *result) 2441{ 2442 struct rpccli_wbint_DsGetDcName_state *state = tevent_req_data( 2443 req, struct rpccli_wbint_DsGetDcName_state); 2444 NTSTATUS status; 2445 2446 if (tevent_req_is_nterror(req, &status)) { 2447 tevent_req_received(req); 2448 return status; 2449 } 2450 2451 /* Steal possbile out parameters to the callers context */ 2452 talloc_steal(mem_ctx, state->out_mem_ctx); 2453 2454 /* Return result */ 2455 *result = state->orig.out.result; 2456 2457 tevent_req_received(req); 2458 return NT_STATUS_OK; 2459} 2460 2461NTSTATUS rpccli_wbint_DsGetDcName(struct rpc_pipe_client *cli, 2462 TALLOC_CTX *mem_ctx, 2463 const char *domain_name /* [in] [ref,charset(UTF8)] */, 2464 struct GUID *domain_guid /* [in] [unique] */, 2465 const char *site_name /* [in] [unique,charset(UTF8)] */, 2466 uint32_t flags /* [in] */, 2467 struct netr_DsRGetDCNameInfo **dc_info /* [out] [ref] */) 2468{ 2469 struct wbint_DsGetDcName r; 2470 NTSTATUS status; 2471 2472 /* In parameters */ 2473 r.in.domain_name = domain_name; 2474 r.in.domain_guid = domain_guid; 2475 r.in.site_name = site_name; 2476 r.in.flags = flags; 2477 2478 status = cli->dispatch(cli, 2479 mem_ctx, 2480 &ndr_table_wbint, 2481 NDR_WBINT_DSGETDCNAME, 2482 &r); 2483 2484 if (!NT_STATUS_IS_OK(status)) { 2485 return status; 2486 } 2487 2488 if (NT_STATUS_IS_ERR(status)) { 2489 return status; 2490 } 2491 2492 /* Return variables */ 2493 *dc_info = *r.out.dc_info; 2494 2495 /* Return result */ 2496 return r.out.result; 2497} 2498 2499struct rpccli_wbint_LookupRids_state { 2500 struct wbint_LookupRids orig; 2501 struct wbint_LookupRids tmp; 2502 TALLOC_CTX *out_mem_ctx; 2503 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 2504}; 2505 2506static void rpccli_wbint_LookupRids_done(struct tevent_req *subreq); 2507 2508struct tevent_req *rpccli_wbint_LookupRids_send(TALLOC_CTX *mem_ctx, 2509 struct tevent_context *ev, 2510 struct rpc_pipe_client *cli, 2511 struct wbint_RidArray *_rids /* [in] [ref] */, 2512 const char **_domain_name /* [out] [ref,charset(UTF8)] */, 2513 struct wbint_Principals *_names /* [out] [ref] */) 2514{ 2515 struct tevent_req *req; 2516 struct rpccli_wbint_LookupRids_state *state; 2517 struct tevent_req *subreq; 2518 2519 req = tevent_req_create(mem_ctx, &state, 2520 struct rpccli_wbint_LookupRids_state); 2521 if (req == NULL) { 2522 return NULL; 2523 } 2524 state->out_mem_ctx = NULL; 2525 state->dispatch_recv = cli->dispatch_recv; 2526 2527 /* In parameters */ 2528 state->orig.in.rids = _rids; 2529 2530 /* Out parameters */ 2531 state->orig.out.domain_name = _domain_name; 2532 state->orig.out.names = _names; 2533 2534 /* Result */ 2535 ZERO_STRUCT(state->orig.out.result); 2536 2537 state->out_mem_ctx = talloc_named_const(state, 0, 2538 "rpccli_wbint_LookupRids_out_memory"); 2539 if (tevent_req_nomem(state->out_mem_ctx, req)) { 2540 return tevent_req_post(req, ev); 2541 } 2542 2543 /* make a temporary copy, that we pass to the dispatch function */ 2544 state->tmp = state->orig; 2545 2546 subreq = cli->dispatch_send(state, ev, cli, 2547 &ndr_table_wbint, 2548 NDR_WBINT_LOOKUPRIDS, 2549 &state->tmp); 2550 if (tevent_req_nomem(subreq, req)) { 2551 return tevent_req_post(req, ev); 2552 } 2553 tevent_req_set_callback(subreq, rpccli_wbint_LookupRids_done, req); 2554 return req; 2555} 2556 2557static void rpccli_wbint_LookupRids_done(struct tevent_req *subreq) 2558{ 2559 struct tevent_req *req = tevent_req_callback_data( 2560 subreq, struct tevent_req); 2561 struct rpccli_wbint_LookupRids_state *state = tevent_req_data( 2562 req, struct rpccli_wbint_LookupRids_state); 2563 NTSTATUS status; 2564 TALLOC_CTX *mem_ctx; 2565 2566 if (state->out_mem_ctx) { 2567 mem_ctx = state->out_mem_ctx; 2568 } else { 2569 mem_ctx = state; 2570 } 2571 2572 status = state->dispatch_recv(subreq, mem_ctx); 2573 TALLOC_FREE(subreq); 2574 if (!NT_STATUS_IS_OK(status)) { 2575 tevent_req_nterror(req, status); 2576 return; 2577 } 2578 2579 /* Copy out parameters */ 2580 *state->orig.out.domain_name = *state->tmp.out.domain_name; 2581 *state->orig.out.names = *state->tmp.out.names; 2582 2583 /* Copy result */ 2584 state->orig.out.result = state->tmp.out.result; 2585 2586 /* Reset temporary structure */ 2587 ZERO_STRUCT(state->tmp); 2588 2589 tevent_req_done(req); 2590} 2591 2592NTSTATUS rpccli_wbint_LookupRids_recv(struct tevent_req *req, 2593 TALLOC_CTX *mem_ctx, 2594 NTSTATUS *result) 2595{ 2596 struct rpccli_wbint_LookupRids_state *state = tevent_req_data( 2597 req, struct rpccli_wbint_LookupRids_state); 2598 NTSTATUS status; 2599 2600 if (tevent_req_is_nterror(req, &status)) { 2601 tevent_req_received(req); 2602 return status; 2603 } 2604 2605 /* Steal possbile out parameters to the callers context */ 2606 talloc_steal(mem_ctx, state->out_mem_ctx); 2607 2608 /* Return result */ 2609 *result = state->orig.out.result; 2610 2611 tevent_req_received(req); 2612 return NT_STATUS_OK; 2613} 2614 2615NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli, 2616 TALLOC_CTX *mem_ctx, 2617 struct wbint_RidArray *rids /* [in] [ref] */, 2618 const char **domain_name /* [out] [ref,charset(UTF8)] */, 2619 struct wbint_Principals *names /* [out] [ref] */) 2620{ 2621 struct wbint_LookupRids r; 2622 NTSTATUS status; 2623 2624 /* In parameters */ 2625 r.in.rids = rids; 2626 2627 status = cli->dispatch(cli, 2628 mem_ctx, 2629 &ndr_table_wbint, 2630 NDR_WBINT_LOOKUPRIDS, 2631 &r); 2632 2633 if (!NT_STATUS_IS_OK(status)) { 2634 return status; 2635 } 2636 2637 if (NT_STATUS_IS_ERR(status)) { 2638 return status; 2639 } 2640 2641 /* Return variables */ 2642 *domain_name = *r.out.domain_name; 2643 *names = *r.out.names; 2644 2645 /* Return result */ 2646 return r.out.result; 2647} 2648 2649struct rpccli_wbint_CheckMachineAccount_state { 2650 struct wbint_CheckMachineAccount orig; 2651 struct wbint_CheckMachineAccount tmp; 2652 TALLOC_CTX *out_mem_ctx; 2653 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 2654}; 2655 2656static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req *subreq); 2657 2658struct tevent_req *rpccli_wbint_CheckMachineAccount_send(TALLOC_CTX *mem_ctx, 2659 struct tevent_context *ev, 2660 struct rpc_pipe_client *cli) 2661{ 2662 struct tevent_req *req; 2663 struct rpccli_wbint_CheckMachineAccount_state *state; 2664 struct tevent_req *subreq; 2665 2666 req = tevent_req_create(mem_ctx, &state, 2667 struct rpccli_wbint_CheckMachineAccount_state); 2668 if (req == NULL) { 2669 return NULL; 2670 } 2671 state->out_mem_ctx = NULL; 2672 state->dispatch_recv = cli->dispatch_recv; 2673 2674 /* In parameters */ 2675 2676 /* Out parameters */ 2677 2678 /* Result */ 2679 ZERO_STRUCT(state->orig.out.result); 2680 2681 /* make a temporary copy, that we pass to the dispatch function */ 2682 state->tmp = state->orig; 2683 2684 subreq = cli->dispatch_send(state, ev, cli, 2685 &ndr_table_wbint, 2686 NDR_WBINT_CHECKMACHINEACCOUNT, 2687 &state->tmp); 2688 if (tevent_req_nomem(subreq, req)) { 2689 return tevent_req_post(req, ev); 2690 } 2691 tevent_req_set_callback(subreq, rpccli_wbint_CheckMachineAccount_done, req); 2692 return req; 2693} 2694 2695static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req *subreq) 2696{ 2697 struct tevent_req *req = tevent_req_callback_data( 2698 subreq, struct tevent_req); 2699 struct rpccli_wbint_CheckMachineAccount_state *state = tevent_req_data( 2700 req, struct rpccli_wbint_CheckMachineAccount_state); 2701 NTSTATUS status; 2702 TALLOC_CTX *mem_ctx; 2703 2704 if (state->out_mem_ctx) { 2705 mem_ctx = state->out_mem_ctx; 2706 } else { 2707 mem_ctx = state; 2708 } 2709 2710 status = state->dispatch_recv(subreq, mem_ctx); 2711 TALLOC_FREE(subreq); 2712 if (!NT_STATUS_IS_OK(status)) { 2713 tevent_req_nterror(req, status); 2714 return; 2715 } 2716 2717 /* Copy out parameters */ 2718 2719 /* Copy result */ 2720 state->orig.out.result = state->tmp.out.result; 2721 2722 /* Reset temporary structure */ 2723 ZERO_STRUCT(state->tmp); 2724 2725 tevent_req_done(req); 2726} 2727 2728NTSTATUS rpccli_wbint_CheckMachineAccount_recv(struct tevent_req *req, 2729 TALLOC_CTX *mem_ctx, 2730 NTSTATUS *result) 2731{ 2732 struct rpccli_wbint_CheckMachineAccount_state *state = tevent_req_data( 2733 req, struct rpccli_wbint_CheckMachineAccount_state); 2734 NTSTATUS status; 2735 2736 if (tevent_req_is_nterror(req, &status)) { 2737 tevent_req_received(req); 2738 return status; 2739 } 2740 2741 /* Steal possbile out parameters to the callers context */ 2742 talloc_steal(mem_ctx, state->out_mem_ctx); 2743 2744 /* Return result */ 2745 *result = state->orig.out.result; 2746 2747 tevent_req_received(req); 2748 return NT_STATUS_OK; 2749} 2750 2751NTSTATUS rpccli_wbint_CheckMachineAccount(struct rpc_pipe_client *cli, 2752 TALLOC_CTX *mem_ctx) 2753{ 2754 struct wbint_CheckMachineAccount r; 2755 NTSTATUS status; 2756 2757 /* In parameters */ 2758 2759 status = cli->dispatch(cli, 2760 mem_ctx, 2761 &ndr_table_wbint, 2762 NDR_WBINT_CHECKMACHINEACCOUNT, 2763 &r); 2764 2765 if (!NT_STATUS_IS_OK(status)) { 2766 return status; 2767 } 2768 2769 if (NT_STATUS_IS_ERR(status)) { 2770 return status; 2771 } 2772 2773 /* Return variables */ 2774 2775 /* Return result */ 2776 return r.out.result; 2777} 2778 2779struct rpccli_wbint_ChangeMachineAccount_state { 2780 struct wbint_ChangeMachineAccount orig; 2781 struct wbint_ChangeMachineAccount tmp; 2782 TALLOC_CTX *out_mem_ctx; 2783 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 2784}; 2785 2786static void rpccli_wbint_ChangeMachineAccount_done(struct tevent_req *subreq); 2787 2788struct tevent_req *rpccli_wbint_ChangeMachineAccount_send(TALLOC_CTX *mem_ctx, 2789 struct tevent_context *ev, 2790 struct rpc_pipe_client *cli) 2791{ 2792 struct tevent_req *req; 2793 struct rpccli_wbint_ChangeMachineAccount_state *state; 2794 struct tevent_req *subreq; 2795 2796 req = tevent_req_create(mem_ctx, &state, 2797 struct rpccli_wbint_ChangeMachineAccount_state); 2798 if (req == NULL) { 2799 return NULL; 2800 } 2801 state->out_mem_ctx = NULL; 2802 state->dispatch_recv = cli->dispatch_recv; 2803 2804 /* In parameters */ 2805 2806 /* Out parameters */ 2807 2808 /* Result */ 2809 ZERO_STRUCT(state->orig.out.result); 2810 2811 /* make a temporary copy, that we pass to the dispatch function */ 2812 state->tmp = state->orig; 2813 2814 subreq = cli->dispatch_send(state, ev, cli, 2815 &ndr_table_wbint, 2816 NDR_WBINT_CHANGEMACHINEACCOUNT, 2817 &state->tmp); 2818 if (tevent_req_nomem(subreq, req)) { 2819 return tevent_req_post(req, ev); 2820 } 2821 tevent_req_set_callback(subreq, rpccli_wbint_ChangeMachineAccount_done, req); 2822 return req; 2823} 2824 2825static void rpccli_wbint_ChangeMachineAccount_done(struct tevent_req *subreq) 2826{ 2827 struct tevent_req *req = tevent_req_callback_data( 2828 subreq, struct tevent_req); 2829 struct rpccli_wbint_ChangeMachineAccount_state *state = tevent_req_data( 2830 req, struct rpccli_wbint_ChangeMachineAccount_state); 2831 NTSTATUS status; 2832 TALLOC_CTX *mem_ctx; 2833 2834 if (state->out_mem_ctx) { 2835 mem_ctx = state->out_mem_ctx; 2836 } else { 2837 mem_ctx = state; 2838 } 2839 2840 status = state->dispatch_recv(subreq, mem_ctx); 2841 TALLOC_FREE(subreq); 2842 if (!NT_STATUS_IS_OK(status)) { 2843 tevent_req_nterror(req, status); 2844 return; 2845 } 2846 2847 /* Copy out parameters */ 2848 2849 /* Copy result */ 2850 state->orig.out.result = state->tmp.out.result; 2851 2852 /* Reset temporary structure */ 2853 ZERO_STRUCT(state->tmp); 2854 2855 tevent_req_done(req); 2856} 2857 2858NTSTATUS rpccli_wbint_ChangeMachineAccount_recv(struct tevent_req *req, 2859 TALLOC_CTX *mem_ctx, 2860 NTSTATUS *result) 2861{ 2862 struct rpccli_wbint_ChangeMachineAccount_state *state = tevent_req_data( 2863 req, struct rpccli_wbint_ChangeMachineAccount_state); 2864 NTSTATUS status; 2865 2866 if (tevent_req_is_nterror(req, &status)) { 2867 tevent_req_received(req); 2868 return status; 2869 } 2870 2871 /* Steal possbile out parameters to the callers context */ 2872 talloc_steal(mem_ctx, state->out_mem_ctx); 2873 2874 /* Return result */ 2875 *result = state->orig.out.result; 2876 2877 tevent_req_received(req); 2878 return NT_STATUS_OK; 2879} 2880 2881NTSTATUS rpccli_wbint_ChangeMachineAccount(struct rpc_pipe_client *cli, 2882 TALLOC_CTX *mem_ctx) 2883{ 2884 struct wbint_ChangeMachineAccount r; 2885 NTSTATUS status; 2886 2887 /* In parameters */ 2888 2889 status = cli->dispatch(cli, 2890 mem_ctx, 2891 &ndr_table_wbint, 2892 NDR_WBINT_CHANGEMACHINEACCOUNT, 2893 &r); 2894 2895 if (!NT_STATUS_IS_OK(status)) { 2896 return status; 2897 } 2898 2899 if (NT_STATUS_IS_ERR(status)) { 2900 return status; 2901 } 2902 2903 /* Return variables */ 2904 2905 /* Return result */ 2906 return r.out.result; 2907} 2908 2909struct rpccli_wbint_PingDc_state { 2910 struct wbint_PingDc orig; 2911 struct wbint_PingDc tmp; 2912 TALLOC_CTX *out_mem_ctx; 2913 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 2914}; 2915 2916static void rpccli_wbint_PingDc_done(struct tevent_req *subreq); 2917 2918struct tevent_req *rpccli_wbint_PingDc_send(TALLOC_CTX *mem_ctx, 2919 struct tevent_context *ev, 2920 struct rpc_pipe_client *cli) 2921{ 2922 struct tevent_req *req; 2923 struct rpccli_wbint_PingDc_state *state; 2924 struct tevent_req *subreq; 2925 2926 req = tevent_req_create(mem_ctx, &state, 2927 struct rpccli_wbint_PingDc_state); 2928 if (req == NULL) { 2929 return NULL; 2930 } 2931 state->out_mem_ctx = NULL; 2932 state->dispatch_recv = cli->dispatch_recv; 2933 2934 /* In parameters */ 2935 2936 /* Out parameters */ 2937 2938 /* Result */ 2939 ZERO_STRUCT(state->orig.out.result); 2940 2941 /* make a temporary copy, that we pass to the dispatch function */ 2942 state->tmp = state->orig; 2943 2944 subreq = cli->dispatch_send(state, ev, cli, 2945 &ndr_table_wbint, 2946 NDR_WBINT_PINGDC, 2947 &state->tmp); 2948 if (tevent_req_nomem(subreq, req)) { 2949 return tevent_req_post(req, ev); 2950 } 2951 tevent_req_set_callback(subreq, rpccli_wbint_PingDc_done, req); 2952 return req; 2953} 2954 2955static void rpccli_wbint_PingDc_done(struct tevent_req *subreq) 2956{ 2957 struct tevent_req *req = tevent_req_callback_data( 2958 subreq, struct tevent_req); 2959 struct rpccli_wbint_PingDc_state *state = tevent_req_data( 2960 req, struct rpccli_wbint_PingDc_state); 2961 NTSTATUS status; 2962 TALLOC_CTX *mem_ctx; 2963 2964 if (state->out_mem_ctx) { 2965 mem_ctx = state->out_mem_ctx; 2966 } else { 2967 mem_ctx = state; 2968 } 2969 2970 status = state->dispatch_recv(subreq, mem_ctx); 2971 TALLOC_FREE(subreq); 2972 if (!NT_STATUS_IS_OK(status)) { 2973 tevent_req_nterror(req, status); 2974 return; 2975 } 2976 2977 /* Copy out parameters */ 2978 2979 /* Copy result */ 2980 state->orig.out.result = state->tmp.out.result; 2981 2982 /* Reset temporary structure */ 2983 ZERO_STRUCT(state->tmp); 2984 2985 tevent_req_done(req); 2986} 2987 2988NTSTATUS rpccli_wbint_PingDc_recv(struct tevent_req *req, 2989 TALLOC_CTX *mem_ctx, 2990 NTSTATUS *result) 2991{ 2992 struct rpccli_wbint_PingDc_state *state = tevent_req_data( 2993 req, struct rpccli_wbint_PingDc_state); 2994 NTSTATUS status; 2995 2996 if (tevent_req_is_nterror(req, &status)) { 2997 tevent_req_received(req); 2998 return status; 2999 } 3000 3001 /* Steal possbile out parameters to the callers context */ 3002 talloc_steal(mem_ctx, state->out_mem_ctx); 3003 3004 /* Return result */ 3005 *result = state->orig.out.result; 3006 3007 tevent_req_received(req); 3008 return NT_STATUS_OK; 3009} 3010 3011NTSTATUS rpccli_wbint_PingDc(struct rpc_pipe_client *cli, 3012 TALLOC_CTX *mem_ctx) 3013{ 3014 struct wbint_PingDc r; 3015 NTSTATUS status; 3016 3017 /* In parameters */ 3018 3019 status = cli->dispatch(cli, 3020 mem_ctx, 3021 &ndr_table_wbint, 3022 NDR_WBINT_PINGDC, 3023 &r); 3024 3025 if (!NT_STATUS_IS_OK(status)) { 3026 return status; 3027 } 3028 3029 if (NT_STATUS_IS_ERR(status)) { 3030 return status; 3031 } 3032 3033 /* Return variables */ 3034 3035 /* Return result */ 3036 return r.out.result; 3037} 3038 3039struct rpccli_wbint_SetMapping_state { 3040 struct wbint_SetMapping orig; 3041 struct wbint_SetMapping tmp; 3042 TALLOC_CTX *out_mem_ctx; 3043 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 3044}; 3045 3046static void rpccli_wbint_SetMapping_done(struct tevent_req *subreq); 3047 3048struct tevent_req *rpccli_wbint_SetMapping_send(TALLOC_CTX *mem_ctx, 3049 struct tevent_context *ev, 3050 struct rpc_pipe_client *cli, 3051 struct dom_sid *_sid /* [in] [ref] */, 3052 enum wbint_IdType _type /* [in] */, 3053 uint64_t _id /* [in] */) 3054{ 3055 struct tevent_req *req; 3056 struct rpccli_wbint_SetMapping_state *state; 3057 struct tevent_req *subreq; 3058 3059 req = tevent_req_create(mem_ctx, &state, 3060 struct rpccli_wbint_SetMapping_state); 3061 if (req == NULL) { 3062 return NULL; 3063 } 3064 state->out_mem_ctx = NULL; 3065 state->dispatch_recv = cli->dispatch_recv; 3066 3067 /* In parameters */ 3068 state->orig.in.sid = _sid; 3069 state->orig.in.type = _type; 3070 state->orig.in.id = _id; 3071 3072 /* Out parameters */ 3073 3074 /* Result */ 3075 ZERO_STRUCT(state->orig.out.result); 3076 3077 /* make a temporary copy, that we pass to the dispatch function */ 3078 state->tmp = state->orig; 3079 3080 subreq = cli->dispatch_send(state, ev, cli, 3081 &ndr_table_wbint, 3082 NDR_WBINT_SETMAPPING, 3083 &state->tmp); 3084 if (tevent_req_nomem(subreq, req)) { 3085 return tevent_req_post(req, ev); 3086 } 3087 tevent_req_set_callback(subreq, rpccli_wbint_SetMapping_done, req); 3088 return req; 3089} 3090 3091static void rpccli_wbint_SetMapping_done(struct tevent_req *subreq) 3092{ 3093 struct tevent_req *req = tevent_req_callback_data( 3094 subreq, struct tevent_req); 3095 struct rpccli_wbint_SetMapping_state *state = tevent_req_data( 3096 req, struct rpccli_wbint_SetMapping_state); 3097 NTSTATUS status; 3098 TALLOC_CTX *mem_ctx; 3099 3100 if (state->out_mem_ctx) { 3101 mem_ctx = state->out_mem_ctx; 3102 } else { 3103 mem_ctx = state; 3104 } 3105 3106 status = state->dispatch_recv(subreq, mem_ctx); 3107 TALLOC_FREE(subreq); 3108 if (!NT_STATUS_IS_OK(status)) { 3109 tevent_req_nterror(req, status); 3110 return; 3111 } 3112 3113 /* Copy out parameters */ 3114 3115 /* Copy result */ 3116 state->orig.out.result = state->tmp.out.result; 3117 3118 /* Reset temporary structure */ 3119 ZERO_STRUCT(state->tmp); 3120 3121 tevent_req_done(req); 3122} 3123 3124NTSTATUS rpccli_wbint_SetMapping_recv(struct tevent_req *req, 3125 TALLOC_CTX *mem_ctx, 3126 NTSTATUS *result) 3127{ 3128 struct rpccli_wbint_SetMapping_state *state = tevent_req_data( 3129 req, struct rpccli_wbint_SetMapping_state); 3130 NTSTATUS status; 3131 3132 if (tevent_req_is_nterror(req, &status)) { 3133 tevent_req_received(req); 3134 return status; 3135 } 3136 3137 /* Steal possbile out parameters to the callers context */ 3138 talloc_steal(mem_ctx, state->out_mem_ctx); 3139 3140 /* Return result */ 3141 *result = state->orig.out.result; 3142 3143 tevent_req_received(req); 3144 return NT_STATUS_OK; 3145} 3146 3147NTSTATUS rpccli_wbint_SetMapping(struct rpc_pipe_client *cli, 3148 TALLOC_CTX *mem_ctx, 3149 struct dom_sid *sid /* [in] [ref] */, 3150 enum wbint_IdType type /* [in] */, 3151 uint64_t id /* [in] */) 3152{ 3153 struct wbint_SetMapping r; 3154 NTSTATUS status; 3155 3156 /* In parameters */ 3157 r.in.sid = sid; 3158 r.in.type = type; 3159 r.in.id = id; 3160 3161 status = cli->dispatch(cli, 3162 mem_ctx, 3163 &ndr_table_wbint, 3164 NDR_WBINT_SETMAPPING, 3165 &r); 3166 3167 if (!NT_STATUS_IS_OK(status)) { 3168 return status; 3169 } 3170 3171 if (NT_STATUS_IS_ERR(status)) { 3172 return status; 3173 } 3174 3175 /* Return variables */ 3176 3177 /* Return result */ 3178 return r.out.result; 3179} 3180 3181struct rpccli_wbint_RemoveMapping_state { 3182 struct wbint_RemoveMapping orig; 3183 struct wbint_RemoveMapping tmp; 3184 TALLOC_CTX *out_mem_ctx; 3185 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 3186}; 3187 3188static void rpccli_wbint_RemoveMapping_done(struct tevent_req *subreq); 3189 3190struct tevent_req *rpccli_wbint_RemoveMapping_send(TALLOC_CTX *mem_ctx, 3191 struct tevent_context *ev, 3192 struct rpc_pipe_client *cli, 3193 struct dom_sid *_sid /* [in] [ref] */, 3194 enum wbint_IdType _type /* [in] */, 3195 uint64_t _id /* [in] */) 3196{ 3197 struct tevent_req *req; 3198 struct rpccli_wbint_RemoveMapping_state *state; 3199 struct tevent_req *subreq; 3200 3201 req = tevent_req_create(mem_ctx, &state, 3202 struct rpccli_wbint_RemoveMapping_state); 3203 if (req == NULL) { 3204 return NULL; 3205 } 3206 state->out_mem_ctx = NULL; 3207 state->dispatch_recv = cli->dispatch_recv; 3208 3209 /* In parameters */ 3210 state->orig.in.sid = _sid; 3211 state->orig.in.type = _type; 3212 state->orig.in.id = _id; 3213 3214 /* Out parameters */ 3215 3216 /* Result */ 3217 ZERO_STRUCT(state->orig.out.result); 3218 3219 /* make a temporary copy, that we pass to the dispatch function */ 3220 state->tmp = state->orig; 3221 3222 subreq = cli->dispatch_send(state, ev, cli, 3223 &ndr_table_wbint, 3224 NDR_WBINT_REMOVEMAPPING, 3225 &state->tmp); 3226 if (tevent_req_nomem(subreq, req)) { 3227 return tevent_req_post(req, ev); 3228 } 3229 tevent_req_set_callback(subreq, rpccli_wbint_RemoveMapping_done, req); 3230 return req; 3231} 3232 3233static void rpccli_wbint_RemoveMapping_done(struct tevent_req *subreq) 3234{ 3235 struct tevent_req *req = tevent_req_callback_data( 3236 subreq, struct tevent_req); 3237 struct rpccli_wbint_RemoveMapping_state *state = tevent_req_data( 3238 req, struct rpccli_wbint_RemoveMapping_state); 3239 NTSTATUS status; 3240 TALLOC_CTX *mem_ctx; 3241 3242 if (state->out_mem_ctx) { 3243 mem_ctx = state->out_mem_ctx; 3244 } else { 3245 mem_ctx = state; 3246 } 3247 3248 status = state->dispatch_recv(subreq, mem_ctx); 3249 TALLOC_FREE(subreq); 3250 if (!NT_STATUS_IS_OK(status)) { 3251 tevent_req_nterror(req, status); 3252 return; 3253 } 3254 3255 /* Copy out parameters */ 3256 3257 /* Copy result */ 3258 state->orig.out.result = state->tmp.out.result; 3259 3260 /* Reset temporary structure */ 3261 ZERO_STRUCT(state->tmp); 3262 3263 tevent_req_done(req); 3264} 3265 3266NTSTATUS rpccli_wbint_RemoveMapping_recv(struct tevent_req *req, 3267 TALLOC_CTX *mem_ctx, 3268 NTSTATUS *result) 3269{ 3270 struct rpccli_wbint_RemoveMapping_state *state = tevent_req_data( 3271 req, struct rpccli_wbint_RemoveMapping_state); 3272 NTSTATUS status; 3273 3274 if (tevent_req_is_nterror(req, &status)) { 3275 tevent_req_received(req); 3276 return status; 3277 } 3278 3279 /* Steal possbile out parameters to the callers context */ 3280 talloc_steal(mem_ctx, state->out_mem_ctx); 3281 3282 /* Return result */ 3283 *result = state->orig.out.result; 3284 3285 tevent_req_received(req); 3286 return NT_STATUS_OK; 3287} 3288 3289NTSTATUS rpccli_wbint_RemoveMapping(struct rpc_pipe_client *cli, 3290 TALLOC_CTX *mem_ctx, 3291 struct dom_sid *sid /* [in] [ref] */, 3292 enum wbint_IdType type /* [in] */, 3293 uint64_t id /* [in] */) 3294{ 3295 struct wbint_RemoveMapping r; 3296 NTSTATUS status; 3297 3298 /* In parameters */ 3299 r.in.sid = sid; 3300 r.in.type = type; 3301 r.in.id = id; 3302 3303 status = cli->dispatch(cli, 3304 mem_ctx, 3305 &ndr_table_wbint, 3306 NDR_WBINT_REMOVEMAPPING, 3307 &r); 3308 3309 if (!NT_STATUS_IS_OK(status)) { 3310 return status; 3311 } 3312 3313 if (NT_STATUS_IS_ERR(status)) { 3314 return status; 3315 } 3316 3317 /* Return variables */ 3318 3319 /* Return result */ 3320 return r.out.result; 3321} 3322 3323struct rpccli_wbint_SetHWM_state { 3324 struct wbint_SetHWM orig; 3325 struct wbint_SetHWM tmp; 3326 TALLOC_CTX *out_mem_ctx; 3327 NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); 3328}; 3329 3330static void rpccli_wbint_SetHWM_done(struct tevent_req *subreq); 3331 3332struct tevent_req *rpccli_wbint_SetHWM_send(TALLOC_CTX *mem_ctx, 3333 struct tevent_context *ev, 3334 struct rpc_pipe_client *cli, 3335 enum wbint_IdType _type /* [in] */, 3336 uint64_t _id /* [in] */) 3337{ 3338 struct tevent_req *req; 3339 struct rpccli_wbint_SetHWM_state *state; 3340 struct tevent_req *subreq; 3341 3342 req = tevent_req_create(mem_ctx, &state, 3343 struct rpccli_wbint_SetHWM_state); 3344 if (req == NULL) { 3345 return NULL; 3346 } 3347 state->out_mem_ctx = NULL; 3348 state->dispatch_recv = cli->dispatch_recv; 3349 3350 /* In parameters */ 3351 state->orig.in.type = _type; 3352 state->orig.in.id = _id; 3353 3354 /* Out parameters */ 3355 3356 /* Result */ 3357 ZERO_STRUCT(state->orig.out.result); 3358 3359 /* make a temporary copy, that we pass to the dispatch function */ 3360 state->tmp = state->orig; 3361 3362 subreq = cli->dispatch_send(state, ev, cli, 3363 &ndr_table_wbint, 3364 NDR_WBINT_SETHWM, 3365 &state->tmp); 3366 if (tevent_req_nomem(subreq, req)) { 3367 return tevent_req_post(req, ev); 3368 } 3369 tevent_req_set_callback(subreq, rpccli_wbint_SetHWM_done, req); 3370 return req; 3371} 3372 3373static void rpccli_wbint_SetHWM_done(struct tevent_req *subreq) 3374{ 3375 struct tevent_req *req = tevent_req_callback_data( 3376 subreq, struct tevent_req); 3377 struct rpccli_wbint_SetHWM_state *state = tevent_req_data( 3378 req, struct rpccli_wbint_SetHWM_state); 3379 NTSTATUS status; 3380 TALLOC_CTX *mem_ctx; 3381 3382 if (state->out_mem_ctx) { 3383 mem_ctx = state->out_mem_ctx; 3384 } else { 3385 mem_ctx = state; 3386 } 3387 3388 status = state->dispatch_recv(subreq, mem_ctx); 3389 TALLOC_FREE(subreq); 3390 if (!NT_STATUS_IS_OK(status)) { 3391 tevent_req_nterror(req, status); 3392 return; 3393 } 3394 3395 /* Copy out parameters */ 3396 3397 /* Copy result */ 3398 state->orig.out.result = state->tmp.out.result; 3399 3400 /* Reset temporary structure */ 3401 ZERO_STRUCT(state->tmp); 3402 3403 tevent_req_done(req); 3404} 3405 3406NTSTATUS rpccli_wbint_SetHWM_recv(struct tevent_req *req, 3407 TALLOC_CTX *mem_ctx, 3408 NTSTATUS *result) 3409{ 3410 struct rpccli_wbint_SetHWM_state *state = tevent_req_data( 3411 req, struct rpccli_wbint_SetHWM_state); 3412 NTSTATUS status; 3413 3414 if (tevent_req_is_nterror(req, &status)) { 3415 tevent_req_received(req); 3416 return status; 3417 } 3418 3419 /* Steal possbile out parameters to the callers context */ 3420 talloc_steal(mem_ctx, state->out_mem_ctx); 3421 3422 /* Return result */ 3423 *result = state->orig.out.result; 3424 3425 tevent_req_received(req); 3426 return NT_STATUS_OK; 3427} 3428 3429NTSTATUS rpccli_wbint_SetHWM(struct rpc_pipe_client *cli, 3430 TALLOC_CTX *mem_ctx, 3431 enum wbint_IdType type /* [in] */, 3432 uint64_t id /* [in] */) 3433{ 3434 struct wbint_SetHWM r; 3435 NTSTATUS status; 3436 3437 /* In parameters */ 3438 r.in.type = type; 3439 r.in.id = id; 3440 3441 status = cli->dispatch(cli, 3442 mem_ctx, 3443 &ndr_table_wbint, 3444 NDR_WBINT_SETHWM, 3445 &r); 3446 3447 if (!NT_STATUS_IS_OK(status)) { 3448 return status; 3449 } 3450 3451 if (NT_STATUS_IS_ERR(status)) { 3452 return status; 3453 } 3454 3455 /* Return variables */ 3456 3457 /* Return result */ 3458 return r.out.result; 3459} 3460 3461