root/librpc/gen_ndr/srv_dfs.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. api_dfs_GetManagerVersion
  2. api_dfs_Add
  3. api_dfs_Remove
  4. api_dfs_SetInfo
  5. api_dfs_GetInfo
  6. api_dfs_Enum
  7. api_dfs_Rename
  8. api_dfs_Move
  9. api_dfs_ManagerGetConfigInfo
  10. api_dfs_ManagerSendSiteInfo
  11. api_dfs_AddFtRoot
  12. api_dfs_RemoveFtRoot
  13. api_dfs_AddStdRoot
  14. api_dfs_RemoveStdRoot
  15. api_dfs_ManagerInitialize
  16. api_dfs_AddStdRootForced
  17. api_dfs_GetDcAddress
  18. api_dfs_SetDcAddress
  19. api_dfs_FlushFtTable
  20. api_dfs_Add2
  21. api_dfs_Remove2
  22. api_dfs_EnumEx
  23. api_dfs_SetInfo2
  24. netdfs_get_pipe_fns
  25. rpc_netdfs_dispatch
  26. rpc_netdfs_init

   1 /*
   2  * Unix SMB/CIFS implementation.
   3  * server auto-generated by pidl. DO NOT MODIFY!
   4  */
   5 
   6 #include "includes.h"
   7 #include "../librpc/gen_ndr/srv_dfs.h"
   8 
   9 static bool api_dfs_GetManagerVersion(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
  10 {
  11         const struct ndr_interface_call *call;
  12         struct ndr_pull *pull;
  13         struct ndr_push *push;
  14         enum ndr_err_code ndr_err;
  15         DATA_BLOB blob;
  16         struct dfs_GetManagerVersion *r;
  17 
  18         call = &ndr_table_netdfs.calls[NDR_DFS_GETMANAGERVERSION];
  19 
  20         r = talloc(talloc_tos(), struct dfs_GetManagerVersion);
  21         if (r == NULL) {
  22                 return false;
  23         }
  24 
  25         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
  26                 talloc_free(r);
  27                 return false;
  28         }
  29 
  30         pull = ndr_pull_init_blob(&blob, r, NULL);
  31         if (pull == NULL) {
  32                 talloc_free(r);
  33                 return false;
  34         }
  35 
  36         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
  37         ndr_err = call->ndr_pull(pull, NDR_IN, r);
  38         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
  39                 talloc_free(r);
  40                 return false;
  41         }
  42 
  43         if (DEBUGLEVEL >= 10) {
  44                 NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, r);
  45         }
  46 
  47         ZERO_STRUCT(r->out);
  48         r->out.version = talloc_zero(r, enum dfs_ManagerVersion);
  49         if (r->out.version == NULL) {
  50                 talloc_free(r);
  51                 return false;
  52         }
  53 
  54         _dfs_GetManagerVersion(p, r);
  55 
  56         if (p->rng_fault_state) {
  57                 talloc_free(r);
  58                 /* Return true here, srv_pipe_hnd.c will take care */
  59                 return true;
  60         }
  61 
  62         if (DEBUGLEVEL >= 10) {
  63                 NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, r);
  64         }
  65 
  66         push = ndr_push_init_ctx(r, NULL);
  67         if (push == NULL) {
  68                 talloc_free(r);
  69                 return false;
  70         }
  71 
  72         ndr_err = call->ndr_push(push, NDR_OUT, r);
  73         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
  74                 talloc_free(r);
  75                 return false;
  76         }
  77 
  78         blob = ndr_push_blob(push);
  79         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
  80                 talloc_free(r);
  81                 return false;
  82         }
  83 
  84         talloc_free(r);
  85 
  86         return true;
  87 }
  88 
  89 static bool api_dfs_Add(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
  90 {
  91         const struct ndr_interface_call *call;
  92         struct ndr_pull *pull;
  93         struct ndr_push *push;
  94         enum ndr_err_code ndr_err;
  95         DATA_BLOB blob;
  96         struct dfs_Add *r;
  97 
  98         call = &ndr_table_netdfs.calls[NDR_DFS_ADD];
  99 
 100         r = talloc(talloc_tos(), struct dfs_Add);
 101         if (r == NULL) {
 102                 return false;
 103         }
 104 
 105         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 106                 talloc_free(r);
 107                 return false;
 108         }
 109 
 110         pull = ndr_pull_init_blob(&blob, r, NULL);
 111         if (pull == NULL) {
 112                 talloc_free(r);
 113                 return false;
 114         }
 115 
 116         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 117         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 118         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 119                 talloc_free(r);
 120                 return false;
 121         }
 122 
 123         if (DEBUGLEVEL >= 10) {
 124                 NDR_PRINT_IN_DEBUG(dfs_Add, r);
 125         }
 126 
 127         r->out.result = _dfs_Add(p, r);
 128 
 129         if (p->rng_fault_state) {
 130                 talloc_free(r);
 131                 /* Return true here, srv_pipe_hnd.c will take care */
 132                 return true;
 133         }
 134 
 135         if (DEBUGLEVEL >= 10) {
 136                 NDR_PRINT_OUT_DEBUG(dfs_Add, r);
 137         }
 138 
 139         push = ndr_push_init_ctx(r, NULL);
 140         if (push == NULL) {
 141                 talloc_free(r);
 142                 return false;
 143         }
 144 
 145         ndr_err = call->ndr_push(push, NDR_OUT, r);
 146         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 147                 talloc_free(r);
 148                 return false;
 149         }
 150 
 151         blob = ndr_push_blob(push);
 152         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 153                 talloc_free(r);
 154                 return false;
 155         }
 156 
 157         talloc_free(r);
 158 
 159         return true;
 160 }
 161 
 162 static bool api_dfs_Remove(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 163 {
 164         const struct ndr_interface_call *call;
 165         struct ndr_pull *pull;
 166         struct ndr_push *push;
 167         enum ndr_err_code ndr_err;
 168         DATA_BLOB blob;
 169         struct dfs_Remove *r;
 170 
 171         call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE];
 172 
 173         r = talloc(talloc_tos(), struct dfs_Remove);
 174         if (r == NULL) {
 175                 return false;
 176         }
 177 
 178         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 179                 talloc_free(r);
 180                 return false;
 181         }
 182 
 183         pull = ndr_pull_init_blob(&blob, r, NULL);
 184         if (pull == NULL) {
 185                 talloc_free(r);
 186                 return false;
 187         }
 188 
 189         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 190         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 191         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 192                 talloc_free(r);
 193                 return false;
 194         }
 195 
 196         if (DEBUGLEVEL >= 10) {
 197                 NDR_PRINT_IN_DEBUG(dfs_Remove, r);
 198         }
 199 
 200         r->out.result = _dfs_Remove(p, r);
 201 
 202         if (p->rng_fault_state) {
 203                 talloc_free(r);
 204                 /* Return true here, srv_pipe_hnd.c will take care */
 205                 return true;
 206         }
 207 
 208         if (DEBUGLEVEL >= 10) {
 209                 NDR_PRINT_OUT_DEBUG(dfs_Remove, r);
 210         }
 211 
 212         push = ndr_push_init_ctx(r, NULL);
 213         if (push == NULL) {
 214                 talloc_free(r);
 215                 return false;
 216         }
 217 
 218         ndr_err = call->ndr_push(push, NDR_OUT, r);
 219         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 220                 talloc_free(r);
 221                 return false;
 222         }
 223 
 224         blob = ndr_push_blob(push);
 225         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 226                 talloc_free(r);
 227                 return false;
 228         }
 229 
 230         talloc_free(r);
 231 
 232         return true;
 233 }
 234 
 235 static bool api_dfs_SetInfo(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 236 {
 237         const struct ndr_interface_call *call;
 238         struct ndr_pull *pull;
 239         struct ndr_push *push;
 240         enum ndr_err_code ndr_err;
 241         DATA_BLOB blob;
 242         struct dfs_SetInfo *r;
 243 
 244         call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO];
 245 
 246         r = talloc(talloc_tos(), struct dfs_SetInfo);
 247         if (r == NULL) {
 248                 return false;
 249         }
 250 
 251         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 252                 talloc_free(r);
 253                 return false;
 254         }
 255 
 256         pull = ndr_pull_init_blob(&blob, r, NULL);
 257         if (pull == NULL) {
 258                 talloc_free(r);
 259                 return false;
 260         }
 261 
 262         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 263         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 264         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 265                 talloc_free(r);
 266                 return false;
 267         }
 268 
 269         if (DEBUGLEVEL >= 10) {
 270                 NDR_PRINT_IN_DEBUG(dfs_SetInfo, r);
 271         }
 272 
 273         r->out.result = _dfs_SetInfo(p, r);
 274 
 275         if (p->rng_fault_state) {
 276                 talloc_free(r);
 277                 /* Return true here, srv_pipe_hnd.c will take care */
 278                 return true;
 279         }
 280 
 281         if (DEBUGLEVEL >= 10) {
 282                 NDR_PRINT_OUT_DEBUG(dfs_SetInfo, r);
 283         }
 284 
 285         push = ndr_push_init_ctx(r, NULL);
 286         if (push == NULL) {
 287                 talloc_free(r);
 288                 return false;
 289         }
 290 
 291         ndr_err = call->ndr_push(push, NDR_OUT, r);
 292         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 293                 talloc_free(r);
 294                 return false;
 295         }
 296 
 297         blob = ndr_push_blob(push);
 298         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 299                 talloc_free(r);
 300                 return false;
 301         }
 302 
 303         talloc_free(r);
 304 
 305         return true;
 306 }
 307 
 308 static bool api_dfs_GetInfo(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 309 {
 310         const struct ndr_interface_call *call;
 311         struct ndr_pull *pull;
 312         struct ndr_push *push;
 313         enum ndr_err_code ndr_err;
 314         DATA_BLOB blob;
 315         struct dfs_GetInfo *r;
 316 
 317         call = &ndr_table_netdfs.calls[NDR_DFS_GETINFO];
 318 
 319         r = talloc(talloc_tos(), struct dfs_GetInfo);
 320         if (r == NULL) {
 321                 return false;
 322         }
 323 
 324         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 325                 talloc_free(r);
 326                 return false;
 327         }
 328 
 329         pull = ndr_pull_init_blob(&blob, r, NULL);
 330         if (pull == NULL) {
 331                 talloc_free(r);
 332                 return false;
 333         }
 334 
 335         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 336         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 337         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 338                 talloc_free(r);
 339                 return false;
 340         }
 341 
 342         if (DEBUGLEVEL >= 10) {
 343                 NDR_PRINT_IN_DEBUG(dfs_GetInfo, r);
 344         }
 345 
 346         ZERO_STRUCT(r->out);
 347         r->out.info = talloc_zero(r, union dfs_Info);
 348         if (r->out.info == NULL) {
 349                 talloc_free(r);
 350                 return false;
 351         }
 352 
 353         r->out.result = _dfs_GetInfo(p, r);
 354 
 355         if (p->rng_fault_state) {
 356                 talloc_free(r);
 357                 /* Return true here, srv_pipe_hnd.c will take care */
 358                 return true;
 359         }
 360 
 361         if (DEBUGLEVEL >= 10) {
 362                 NDR_PRINT_OUT_DEBUG(dfs_GetInfo, r);
 363         }
 364 
 365         push = ndr_push_init_ctx(r, NULL);
 366         if (push == NULL) {
 367                 talloc_free(r);
 368                 return false;
 369         }
 370 
 371         ndr_err = call->ndr_push(push, NDR_OUT, r);
 372         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 373                 talloc_free(r);
 374                 return false;
 375         }
 376 
 377         blob = ndr_push_blob(push);
 378         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 379                 talloc_free(r);
 380                 return false;
 381         }
 382 
 383         talloc_free(r);
 384 
 385         return true;
 386 }
 387 
 388 static bool api_dfs_Enum(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 389 {
 390         const struct ndr_interface_call *call;
 391         struct ndr_pull *pull;
 392         struct ndr_push *push;
 393         enum ndr_err_code ndr_err;
 394         DATA_BLOB blob;
 395         struct dfs_Enum *r;
 396 
 397         call = &ndr_table_netdfs.calls[NDR_DFS_ENUM];
 398 
 399         r = talloc(talloc_tos(), struct dfs_Enum);
 400         if (r == NULL) {
 401                 return false;
 402         }
 403 
 404         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 405                 talloc_free(r);
 406                 return false;
 407         }
 408 
 409         pull = ndr_pull_init_blob(&blob, r, NULL);
 410         if (pull == NULL) {
 411                 talloc_free(r);
 412                 return false;
 413         }
 414 
 415         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 416         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 417         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 418                 talloc_free(r);
 419                 return false;
 420         }
 421 
 422         if (DEBUGLEVEL >= 10) {
 423                 NDR_PRINT_IN_DEBUG(dfs_Enum, r);
 424         }
 425 
 426         ZERO_STRUCT(r->out);
 427         r->out.info = r->in.info;
 428         r->out.total = r->in.total;
 429         r->out.result = _dfs_Enum(p, r);
 430 
 431         if (p->rng_fault_state) {
 432                 talloc_free(r);
 433                 /* Return true here, srv_pipe_hnd.c will take care */
 434                 return true;
 435         }
 436 
 437         if (DEBUGLEVEL >= 10) {
 438                 NDR_PRINT_OUT_DEBUG(dfs_Enum, r);
 439         }
 440 
 441         push = ndr_push_init_ctx(r, NULL);
 442         if (push == NULL) {
 443                 talloc_free(r);
 444                 return false;
 445         }
 446 
 447         ndr_err = call->ndr_push(push, NDR_OUT, r);
 448         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 449                 talloc_free(r);
 450                 return false;
 451         }
 452 
 453         blob = ndr_push_blob(push);
 454         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 455                 talloc_free(r);
 456                 return false;
 457         }
 458 
 459         talloc_free(r);
 460 
 461         return true;
 462 }
 463 
 464 static bool api_dfs_Rename(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 465 {
 466         const struct ndr_interface_call *call;
 467         struct ndr_pull *pull;
 468         struct ndr_push *push;
 469         enum ndr_err_code ndr_err;
 470         DATA_BLOB blob;
 471         struct dfs_Rename *r;
 472 
 473         call = &ndr_table_netdfs.calls[NDR_DFS_RENAME];
 474 
 475         r = talloc(talloc_tos(), struct dfs_Rename);
 476         if (r == NULL) {
 477                 return false;
 478         }
 479 
 480         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 481                 talloc_free(r);
 482                 return false;
 483         }
 484 
 485         pull = ndr_pull_init_blob(&blob, r, NULL);
 486         if (pull == NULL) {
 487                 talloc_free(r);
 488                 return false;
 489         }
 490 
 491         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 492         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 493         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 494                 talloc_free(r);
 495                 return false;
 496         }
 497 
 498         if (DEBUGLEVEL >= 10) {
 499                 NDR_PRINT_IN_DEBUG(dfs_Rename, r);
 500         }
 501 
 502         r->out.result = _dfs_Rename(p, r);
 503 
 504         if (p->rng_fault_state) {
 505                 talloc_free(r);
 506                 /* Return true here, srv_pipe_hnd.c will take care */
 507                 return true;
 508         }
 509 
 510         if (DEBUGLEVEL >= 10) {
 511                 NDR_PRINT_OUT_DEBUG(dfs_Rename, r);
 512         }
 513 
 514         push = ndr_push_init_ctx(r, NULL);
 515         if (push == NULL) {
 516                 talloc_free(r);
 517                 return false;
 518         }
 519 
 520         ndr_err = call->ndr_push(push, NDR_OUT, r);
 521         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 522                 talloc_free(r);
 523                 return false;
 524         }
 525 
 526         blob = ndr_push_blob(push);
 527         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 528                 talloc_free(r);
 529                 return false;
 530         }
 531 
 532         talloc_free(r);
 533 
 534         return true;
 535 }
 536 
 537 static bool api_dfs_Move(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 538 {
 539         const struct ndr_interface_call *call;
 540         struct ndr_pull *pull;
 541         struct ndr_push *push;
 542         enum ndr_err_code ndr_err;
 543         DATA_BLOB blob;
 544         struct dfs_Move *r;
 545 
 546         call = &ndr_table_netdfs.calls[NDR_DFS_MOVE];
 547 
 548         r = talloc(talloc_tos(), struct dfs_Move);
 549         if (r == NULL) {
 550                 return false;
 551         }
 552 
 553         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 554                 talloc_free(r);
 555                 return false;
 556         }
 557 
 558         pull = ndr_pull_init_blob(&blob, r, NULL);
 559         if (pull == NULL) {
 560                 talloc_free(r);
 561                 return false;
 562         }
 563 
 564         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 565         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 566         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 567                 talloc_free(r);
 568                 return false;
 569         }
 570 
 571         if (DEBUGLEVEL >= 10) {
 572                 NDR_PRINT_IN_DEBUG(dfs_Move, r);
 573         }
 574 
 575         r->out.result = _dfs_Move(p, r);
 576 
 577         if (p->rng_fault_state) {
 578                 talloc_free(r);
 579                 /* Return true here, srv_pipe_hnd.c will take care */
 580                 return true;
 581         }
 582 
 583         if (DEBUGLEVEL >= 10) {
 584                 NDR_PRINT_OUT_DEBUG(dfs_Move, r);
 585         }
 586 
 587         push = ndr_push_init_ctx(r, NULL);
 588         if (push == NULL) {
 589                 talloc_free(r);
 590                 return false;
 591         }
 592 
 593         ndr_err = call->ndr_push(push, NDR_OUT, r);
 594         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 595                 talloc_free(r);
 596                 return false;
 597         }
 598 
 599         blob = ndr_push_blob(push);
 600         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 601                 talloc_free(r);
 602                 return false;
 603         }
 604 
 605         talloc_free(r);
 606 
 607         return true;
 608 }
 609 
 610 static bool api_dfs_ManagerGetConfigInfo(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 611 {
 612         const struct ndr_interface_call *call;
 613         struct ndr_pull *pull;
 614         struct ndr_push *push;
 615         enum ndr_err_code ndr_err;
 616         DATA_BLOB blob;
 617         struct dfs_ManagerGetConfigInfo *r;
 618 
 619         call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERGETCONFIGINFO];
 620 
 621         r = talloc(talloc_tos(), struct dfs_ManagerGetConfigInfo);
 622         if (r == NULL) {
 623                 return false;
 624         }
 625 
 626         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 627                 talloc_free(r);
 628                 return false;
 629         }
 630 
 631         pull = ndr_pull_init_blob(&blob, r, NULL);
 632         if (pull == NULL) {
 633                 talloc_free(r);
 634                 return false;
 635         }
 636 
 637         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 638         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 639         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 640                 talloc_free(r);
 641                 return false;
 642         }
 643 
 644         if (DEBUGLEVEL >= 10) {
 645                 NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, r);
 646         }
 647 
 648         r->out.result = _dfs_ManagerGetConfigInfo(p, r);
 649 
 650         if (p->rng_fault_state) {
 651                 talloc_free(r);
 652                 /* Return true here, srv_pipe_hnd.c will take care */
 653                 return true;
 654         }
 655 
 656         if (DEBUGLEVEL >= 10) {
 657                 NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, r);
 658         }
 659 
 660         push = ndr_push_init_ctx(r, NULL);
 661         if (push == NULL) {
 662                 talloc_free(r);
 663                 return false;
 664         }
 665 
 666         ndr_err = call->ndr_push(push, NDR_OUT, r);
 667         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 668                 talloc_free(r);
 669                 return false;
 670         }
 671 
 672         blob = ndr_push_blob(push);
 673         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 674                 talloc_free(r);
 675                 return false;
 676         }
 677 
 678         talloc_free(r);
 679 
 680         return true;
 681 }
 682 
 683 static bool api_dfs_ManagerSendSiteInfo(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 684 {
 685         const struct ndr_interface_call *call;
 686         struct ndr_pull *pull;
 687         struct ndr_push *push;
 688         enum ndr_err_code ndr_err;
 689         DATA_BLOB blob;
 690         struct dfs_ManagerSendSiteInfo *r;
 691 
 692         call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERSENDSITEINFO];
 693 
 694         r = talloc(talloc_tos(), struct dfs_ManagerSendSiteInfo);
 695         if (r == NULL) {
 696                 return false;
 697         }
 698 
 699         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 700                 talloc_free(r);
 701                 return false;
 702         }
 703 
 704         pull = ndr_pull_init_blob(&blob, r, NULL);
 705         if (pull == NULL) {
 706                 talloc_free(r);
 707                 return false;
 708         }
 709 
 710         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 711         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 712         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 713                 talloc_free(r);
 714                 return false;
 715         }
 716 
 717         if (DEBUGLEVEL >= 10) {
 718                 NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, r);
 719         }
 720 
 721         r->out.result = _dfs_ManagerSendSiteInfo(p, r);
 722 
 723         if (p->rng_fault_state) {
 724                 talloc_free(r);
 725                 /* Return true here, srv_pipe_hnd.c will take care */
 726                 return true;
 727         }
 728 
 729         if (DEBUGLEVEL >= 10) {
 730                 NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, r);
 731         }
 732 
 733         push = ndr_push_init_ctx(r, NULL);
 734         if (push == NULL) {
 735                 talloc_free(r);
 736                 return false;
 737         }
 738 
 739         ndr_err = call->ndr_push(push, NDR_OUT, r);
 740         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 741                 talloc_free(r);
 742                 return false;
 743         }
 744 
 745         blob = ndr_push_blob(push);
 746         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 747                 talloc_free(r);
 748                 return false;
 749         }
 750 
 751         talloc_free(r);
 752 
 753         return true;
 754 }
 755 
 756 static bool api_dfs_AddFtRoot(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 757 {
 758         const struct ndr_interface_call *call;
 759         struct ndr_pull *pull;
 760         struct ndr_push *push;
 761         enum ndr_err_code ndr_err;
 762         DATA_BLOB blob;
 763         struct dfs_AddFtRoot *r;
 764 
 765         call = &ndr_table_netdfs.calls[NDR_DFS_ADDFTROOT];
 766 
 767         r = talloc(talloc_tos(), struct dfs_AddFtRoot);
 768         if (r == NULL) {
 769                 return false;
 770         }
 771 
 772         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 773                 talloc_free(r);
 774                 return false;
 775         }
 776 
 777         pull = ndr_pull_init_blob(&blob, r, NULL);
 778         if (pull == NULL) {
 779                 talloc_free(r);
 780                 return false;
 781         }
 782 
 783         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 784         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 785         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 786                 talloc_free(r);
 787                 return false;
 788         }
 789 
 790         if (DEBUGLEVEL >= 10) {
 791                 NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, r);
 792         }
 793 
 794         ZERO_STRUCT(r->out);
 795         r->out.unknown2 = r->in.unknown2;
 796         r->out.result = _dfs_AddFtRoot(p, r);
 797 
 798         if (p->rng_fault_state) {
 799                 talloc_free(r);
 800                 /* Return true here, srv_pipe_hnd.c will take care */
 801                 return true;
 802         }
 803 
 804         if (DEBUGLEVEL >= 10) {
 805                 NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, r);
 806         }
 807 
 808         push = ndr_push_init_ctx(r, NULL);
 809         if (push == NULL) {
 810                 talloc_free(r);
 811                 return false;
 812         }
 813 
 814         ndr_err = call->ndr_push(push, NDR_OUT, r);
 815         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 816                 talloc_free(r);
 817                 return false;
 818         }
 819 
 820         blob = ndr_push_blob(push);
 821         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 822                 talloc_free(r);
 823                 return false;
 824         }
 825 
 826         talloc_free(r);
 827 
 828         return true;
 829 }
 830 
 831 static bool api_dfs_RemoveFtRoot(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 832 {
 833         const struct ndr_interface_call *call;
 834         struct ndr_pull *pull;
 835         struct ndr_push *push;
 836         enum ndr_err_code ndr_err;
 837         DATA_BLOB blob;
 838         struct dfs_RemoveFtRoot *r;
 839 
 840         call = &ndr_table_netdfs.calls[NDR_DFS_REMOVEFTROOT];
 841 
 842         r = talloc(talloc_tos(), struct dfs_RemoveFtRoot);
 843         if (r == NULL) {
 844                 return false;
 845         }
 846 
 847         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 848                 talloc_free(r);
 849                 return false;
 850         }
 851 
 852         pull = ndr_pull_init_blob(&blob, r, NULL);
 853         if (pull == NULL) {
 854                 talloc_free(r);
 855                 return false;
 856         }
 857 
 858         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 859         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 860         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 861                 talloc_free(r);
 862                 return false;
 863         }
 864 
 865         if (DEBUGLEVEL >= 10) {
 866                 NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, r);
 867         }
 868 
 869         ZERO_STRUCT(r->out);
 870         r->out.unknown = r->in.unknown;
 871         r->out.result = _dfs_RemoveFtRoot(p, r);
 872 
 873         if (p->rng_fault_state) {
 874                 talloc_free(r);
 875                 /* Return true here, srv_pipe_hnd.c will take care */
 876                 return true;
 877         }
 878 
 879         if (DEBUGLEVEL >= 10) {
 880                 NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, r);
 881         }
 882 
 883         push = ndr_push_init_ctx(r, NULL);
 884         if (push == NULL) {
 885                 talloc_free(r);
 886                 return false;
 887         }
 888 
 889         ndr_err = call->ndr_push(push, NDR_OUT, r);
 890         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 891                 talloc_free(r);
 892                 return false;
 893         }
 894 
 895         blob = ndr_push_blob(push);
 896         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 897                 talloc_free(r);
 898                 return false;
 899         }
 900 
 901         talloc_free(r);
 902 
 903         return true;
 904 }
 905 
 906 static bool api_dfs_AddStdRoot(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 907 {
 908         const struct ndr_interface_call *call;
 909         struct ndr_pull *pull;
 910         struct ndr_push *push;
 911         enum ndr_err_code ndr_err;
 912         DATA_BLOB blob;
 913         struct dfs_AddStdRoot *r;
 914 
 915         call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOT];
 916 
 917         r = talloc(talloc_tos(), struct dfs_AddStdRoot);
 918         if (r == NULL) {
 919                 return false;
 920         }
 921 
 922         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 923                 talloc_free(r);
 924                 return false;
 925         }
 926 
 927         pull = ndr_pull_init_blob(&blob, r, NULL);
 928         if (pull == NULL) {
 929                 talloc_free(r);
 930                 return false;
 931         }
 932 
 933         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
 934         ndr_err = call->ndr_pull(pull, NDR_IN, r);
 935         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 936                 talloc_free(r);
 937                 return false;
 938         }
 939 
 940         if (DEBUGLEVEL >= 10) {
 941                 NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, r);
 942         }
 943 
 944         r->out.result = _dfs_AddStdRoot(p, r);
 945 
 946         if (p->rng_fault_state) {
 947                 talloc_free(r);
 948                 /* Return true here, srv_pipe_hnd.c will take care */
 949                 return true;
 950         }
 951 
 952         if (DEBUGLEVEL >= 10) {
 953                 NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, r);
 954         }
 955 
 956         push = ndr_push_init_ctx(r, NULL);
 957         if (push == NULL) {
 958                 talloc_free(r);
 959                 return false;
 960         }
 961 
 962         ndr_err = call->ndr_push(push, NDR_OUT, r);
 963         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 964                 talloc_free(r);
 965                 return false;
 966         }
 967 
 968         blob = ndr_push_blob(push);
 969         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
 970                 talloc_free(r);
 971                 return false;
 972         }
 973 
 974         talloc_free(r);
 975 
 976         return true;
 977 }
 978 
 979 static bool api_dfs_RemoveStdRoot(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
 980 {
 981         const struct ndr_interface_call *call;
 982         struct ndr_pull *pull;
 983         struct ndr_push *push;
 984         enum ndr_err_code ndr_err;
 985         DATA_BLOB blob;
 986         struct dfs_RemoveStdRoot *r;
 987 
 988         call = &ndr_table_netdfs.calls[NDR_DFS_REMOVESTDROOT];
 989 
 990         r = talloc(talloc_tos(), struct dfs_RemoveStdRoot);
 991         if (r == NULL) {
 992                 return false;
 993         }
 994 
 995         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
 996                 talloc_free(r);
 997                 return false;
 998         }
 999 
1000         pull = ndr_pull_init_blob(&blob, r, NULL);
1001         if (pull == NULL) {
1002                 talloc_free(r);
1003                 return false;
1004         }
1005 
1006         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1007         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1008         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1009                 talloc_free(r);
1010                 return false;
1011         }
1012 
1013         if (DEBUGLEVEL >= 10) {
1014                 NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, r);
1015         }
1016 
1017         r->out.result = _dfs_RemoveStdRoot(p, r);
1018 
1019         if (p->rng_fault_state) {
1020                 talloc_free(r);
1021                 /* Return true here, srv_pipe_hnd.c will take care */
1022                 return true;
1023         }
1024 
1025         if (DEBUGLEVEL >= 10) {
1026                 NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, r);
1027         }
1028 
1029         push = ndr_push_init_ctx(r, NULL);
1030         if (push == NULL) {
1031                 talloc_free(r);
1032                 return false;
1033         }
1034 
1035         ndr_err = call->ndr_push(push, NDR_OUT, r);
1036         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1037                 talloc_free(r);
1038                 return false;
1039         }
1040 
1041         blob = ndr_push_blob(push);
1042         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1043                 talloc_free(r);
1044                 return false;
1045         }
1046 
1047         talloc_free(r);
1048 
1049         return true;
1050 }
1051 
1052 static bool api_dfs_ManagerInitialize(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
1053 {
1054         const struct ndr_interface_call *call;
1055         struct ndr_pull *pull;
1056         struct ndr_push *push;
1057         enum ndr_err_code ndr_err;
1058         DATA_BLOB blob;
1059         struct dfs_ManagerInitialize *r;
1060 
1061         call = &ndr_table_netdfs.calls[NDR_DFS_MANAGERINITIALIZE];
1062 
1063         r = talloc(talloc_tos(), struct dfs_ManagerInitialize);
1064         if (r == NULL) {
1065                 return false;
1066         }
1067 
1068         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1069                 talloc_free(r);
1070                 return false;
1071         }
1072 
1073         pull = ndr_pull_init_blob(&blob, r, NULL);
1074         if (pull == NULL) {
1075                 talloc_free(r);
1076                 return false;
1077         }
1078 
1079         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1080         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1081         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1082                 talloc_free(r);
1083                 return false;
1084         }
1085 
1086         if (DEBUGLEVEL >= 10) {
1087                 NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, r);
1088         }
1089 
1090         r->out.result = _dfs_ManagerInitialize(p, r);
1091 
1092         if (p->rng_fault_state) {
1093                 talloc_free(r);
1094                 /* Return true here, srv_pipe_hnd.c will take care */
1095                 return true;
1096         }
1097 
1098         if (DEBUGLEVEL >= 10) {
1099                 NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, r);
1100         }
1101 
1102         push = ndr_push_init_ctx(r, NULL);
1103         if (push == NULL) {
1104                 talloc_free(r);
1105                 return false;
1106         }
1107 
1108         ndr_err = call->ndr_push(push, NDR_OUT, r);
1109         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1110                 talloc_free(r);
1111                 return false;
1112         }
1113 
1114         blob = ndr_push_blob(push);
1115         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1116                 talloc_free(r);
1117                 return false;
1118         }
1119 
1120         talloc_free(r);
1121 
1122         return true;
1123 }
1124 
1125 static bool api_dfs_AddStdRootForced(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
1126 {
1127         const struct ndr_interface_call *call;
1128         struct ndr_pull *pull;
1129         struct ndr_push *push;
1130         enum ndr_err_code ndr_err;
1131         DATA_BLOB blob;
1132         struct dfs_AddStdRootForced *r;
1133 
1134         call = &ndr_table_netdfs.calls[NDR_DFS_ADDSTDROOTFORCED];
1135 
1136         r = talloc(talloc_tos(), struct dfs_AddStdRootForced);
1137         if (r == NULL) {
1138                 return false;
1139         }
1140 
1141         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1142                 talloc_free(r);
1143                 return false;
1144         }
1145 
1146         pull = ndr_pull_init_blob(&blob, r, NULL);
1147         if (pull == NULL) {
1148                 talloc_free(r);
1149                 return false;
1150         }
1151 
1152         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1153         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1154         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1155                 talloc_free(r);
1156                 return false;
1157         }
1158 
1159         if (DEBUGLEVEL >= 10) {
1160                 NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, r);
1161         }
1162 
1163         r->out.result = _dfs_AddStdRootForced(p, r);
1164 
1165         if (p->rng_fault_state) {
1166                 talloc_free(r);
1167                 /* Return true here, srv_pipe_hnd.c will take care */
1168                 return true;
1169         }
1170 
1171         if (DEBUGLEVEL >= 10) {
1172                 NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, r);
1173         }
1174 
1175         push = ndr_push_init_ctx(r, NULL);
1176         if (push == NULL) {
1177                 talloc_free(r);
1178                 return false;
1179         }
1180 
1181         ndr_err = call->ndr_push(push, NDR_OUT, r);
1182         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1183                 talloc_free(r);
1184                 return false;
1185         }
1186 
1187         blob = ndr_push_blob(push);
1188         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1189                 talloc_free(r);
1190                 return false;
1191         }
1192 
1193         talloc_free(r);
1194 
1195         return true;
1196 }
1197 
1198 static bool api_dfs_GetDcAddress(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
1199 {
1200         const struct ndr_interface_call *call;
1201         struct ndr_pull *pull;
1202         struct ndr_push *push;
1203         enum ndr_err_code ndr_err;
1204         DATA_BLOB blob;
1205         struct dfs_GetDcAddress *r;
1206 
1207         call = &ndr_table_netdfs.calls[NDR_DFS_GETDCADDRESS];
1208 
1209         r = talloc(talloc_tos(), struct dfs_GetDcAddress);
1210         if (r == NULL) {
1211                 return false;
1212         }
1213 
1214         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1215                 talloc_free(r);
1216                 return false;
1217         }
1218 
1219         pull = ndr_pull_init_blob(&blob, r, NULL);
1220         if (pull == NULL) {
1221                 talloc_free(r);
1222                 return false;
1223         }
1224 
1225         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1226         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1227         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1228                 talloc_free(r);
1229                 return false;
1230         }
1231 
1232         if (DEBUGLEVEL >= 10) {
1233                 NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, r);
1234         }
1235 
1236         ZERO_STRUCT(r->out);
1237         r->out.server_fullname = r->in.server_fullname;
1238         r->out.is_root = r->in.is_root;
1239         r->out.ttl = r->in.ttl;
1240         r->out.result = _dfs_GetDcAddress(p, r);
1241 
1242         if (p->rng_fault_state) {
1243                 talloc_free(r);
1244                 /* Return true here, srv_pipe_hnd.c will take care */
1245                 return true;
1246         }
1247 
1248         if (DEBUGLEVEL >= 10) {
1249                 NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, r);
1250         }
1251 
1252         push = ndr_push_init_ctx(r, NULL);
1253         if (push == NULL) {
1254                 talloc_free(r);
1255                 return false;
1256         }
1257 
1258         ndr_err = call->ndr_push(push, NDR_OUT, r);
1259         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1260                 talloc_free(r);
1261                 return false;
1262         }
1263 
1264         blob = ndr_push_blob(push);
1265         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1266                 talloc_free(r);
1267                 return false;
1268         }
1269 
1270         talloc_free(r);
1271 
1272         return true;
1273 }
1274 
1275 static bool api_dfs_SetDcAddress(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
1276 {
1277         const struct ndr_interface_call *call;
1278         struct ndr_pull *pull;
1279         struct ndr_push *push;
1280         enum ndr_err_code ndr_err;
1281         DATA_BLOB blob;
1282         struct dfs_SetDcAddress *r;
1283 
1284         call = &ndr_table_netdfs.calls[NDR_DFS_SETDCADDRESS];
1285 
1286         r = talloc(talloc_tos(), struct dfs_SetDcAddress);
1287         if (r == NULL) {
1288                 return false;
1289         }
1290 
1291         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1292                 talloc_free(r);
1293                 return false;
1294         }
1295 
1296         pull = ndr_pull_init_blob(&blob, r, NULL);
1297         if (pull == NULL) {
1298                 talloc_free(r);
1299                 return false;
1300         }
1301 
1302         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1303         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1304         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1305                 talloc_free(r);
1306                 return false;
1307         }
1308 
1309         if (DEBUGLEVEL >= 10) {
1310                 NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, r);
1311         }
1312 
1313         r->out.result = _dfs_SetDcAddress(p, r);
1314 
1315         if (p->rng_fault_state) {
1316                 talloc_free(r);
1317                 /* Return true here, srv_pipe_hnd.c will take care */
1318                 return true;
1319         }
1320 
1321         if (DEBUGLEVEL >= 10) {
1322                 NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, r);
1323         }
1324 
1325         push = ndr_push_init_ctx(r, NULL);
1326         if (push == NULL) {
1327                 talloc_free(r);
1328                 return false;
1329         }
1330 
1331         ndr_err = call->ndr_push(push, NDR_OUT, r);
1332         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1333                 talloc_free(r);
1334                 return false;
1335         }
1336 
1337         blob = ndr_push_blob(push);
1338         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1339                 talloc_free(r);
1340                 return false;
1341         }
1342 
1343         talloc_free(r);
1344 
1345         return true;
1346 }
1347 
1348 static bool api_dfs_FlushFtTable(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
1349 {
1350         const struct ndr_interface_call *call;
1351         struct ndr_pull *pull;
1352         struct ndr_push *push;
1353         enum ndr_err_code ndr_err;
1354         DATA_BLOB blob;
1355         struct dfs_FlushFtTable *r;
1356 
1357         call = &ndr_table_netdfs.calls[NDR_DFS_FLUSHFTTABLE];
1358 
1359         r = talloc(talloc_tos(), struct dfs_FlushFtTable);
1360         if (r == NULL) {
1361                 return false;
1362         }
1363 
1364         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1365                 talloc_free(r);
1366                 return false;
1367         }
1368 
1369         pull = ndr_pull_init_blob(&blob, r, NULL);
1370         if (pull == NULL) {
1371                 talloc_free(r);
1372                 return false;
1373         }
1374 
1375         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1376         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1377         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1378                 talloc_free(r);
1379                 return false;
1380         }
1381 
1382         if (DEBUGLEVEL >= 10) {
1383                 NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, r);
1384         }
1385 
1386         r->out.result = _dfs_FlushFtTable(p, r);
1387 
1388         if (p->rng_fault_state) {
1389                 talloc_free(r);
1390                 /* Return true here, srv_pipe_hnd.c will take care */
1391                 return true;
1392         }
1393 
1394         if (DEBUGLEVEL >= 10) {
1395                 NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, r);
1396         }
1397 
1398         push = ndr_push_init_ctx(r, NULL);
1399         if (push == NULL) {
1400                 talloc_free(r);
1401                 return false;
1402         }
1403 
1404         ndr_err = call->ndr_push(push, NDR_OUT, r);
1405         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1406                 talloc_free(r);
1407                 return false;
1408         }
1409 
1410         blob = ndr_push_blob(push);
1411         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1412                 talloc_free(r);
1413                 return false;
1414         }
1415 
1416         talloc_free(r);
1417 
1418         return true;
1419 }
1420 
1421 static bool api_dfs_Add2(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
1422 {
1423         const struct ndr_interface_call *call;
1424         struct ndr_pull *pull;
1425         struct ndr_push *push;
1426         enum ndr_err_code ndr_err;
1427         DATA_BLOB blob;
1428         struct dfs_Add2 *r;
1429 
1430         call = &ndr_table_netdfs.calls[NDR_DFS_ADD2];
1431 
1432         r = talloc(talloc_tos(), struct dfs_Add2);
1433         if (r == NULL) {
1434                 return false;
1435         }
1436 
1437         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1438                 talloc_free(r);
1439                 return false;
1440         }
1441 
1442         pull = ndr_pull_init_blob(&blob, r, NULL);
1443         if (pull == NULL) {
1444                 talloc_free(r);
1445                 return false;
1446         }
1447 
1448         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1449         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1450         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1451                 talloc_free(r);
1452                 return false;
1453         }
1454 
1455         if (DEBUGLEVEL >= 10) {
1456                 NDR_PRINT_IN_DEBUG(dfs_Add2, r);
1457         }
1458 
1459         r->out.result = _dfs_Add2(p, r);
1460 
1461         if (p->rng_fault_state) {
1462                 talloc_free(r);
1463                 /* Return true here, srv_pipe_hnd.c will take care */
1464                 return true;
1465         }
1466 
1467         if (DEBUGLEVEL >= 10) {
1468                 NDR_PRINT_OUT_DEBUG(dfs_Add2, r);
1469         }
1470 
1471         push = ndr_push_init_ctx(r, NULL);
1472         if (push == NULL) {
1473                 talloc_free(r);
1474                 return false;
1475         }
1476 
1477         ndr_err = call->ndr_push(push, NDR_OUT, r);
1478         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1479                 talloc_free(r);
1480                 return false;
1481         }
1482 
1483         blob = ndr_push_blob(push);
1484         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1485                 talloc_free(r);
1486                 return false;
1487         }
1488 
1489         talloc_free(r);
1490 
1491         return true;
1492 }
1493 
1494 static bool api_dfs_Remove2(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
1495 {
1496         const struct ndr_interface_call *call;
1497         struct ndr_pull *pull;
1498         struct ndr_push *push;
1499         enum ndr_err_code ndr_err;
1500         DATA_BLOB blob;
1501         struct dfs_Remove2 *r;
1502 
1503         call = &ndr_table_netdfs.calls[NDR_DFS_REMOVE2];
1504 
1505         r = talloc(talloc_tos(), struct dfs_Remove2);
1506         if (r == NULL) {
1507                 return false;
1508         }
1509 
1510         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1511                 talloc_free(r);
1512                 return false;
1513         }
1514 
1515         pull = ndr_pull_init_blob(&blob, r, NULL);
1516         if (pull == NULL) {
1517                 talloc_free(r);
1518                 return false;
1519         }
1520 
1521         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1522         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1523         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1524                 talloc_free(r);
1525                 return false;
1526         }
1527 
1528         if (DEBUGLEVEL >= 10) {
1529                 NDR_PRINT_IN_DEBUG(dfs_Remove2, r);
1530         }
1531 
1532         r->out.result = _dfs_Remove2(p, r);
1533 
1534         if (p->rng_fault_state) {
1535                 talloc_free(r);
1536                 /* Return true here, srv_pipe_hnd.c will take care */
1537                 return true;
1538         }
1539 
1540         if (DEBUGLEVEL >= 10) {
1541                 NDR_PRINT_OUT_DEBUG(dfs_Remove2, r);
1542         }
1543 
1544         push = ndr_push_init_ctx(r, NULL);
1545         if (push == NULL) {
1546                 talloc_free(r);
1547                 return false;
1548         }
1549 
1550         ndr_err = call->ndr_push(push, NDR_OUT, r);
1551         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1552                 talloc_free(r);
1553                 return false;
1554         }
1555 
1556         blob = ndr_push_blob(push);
1557         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1558                 talloc_free(r);
1559                 return false;
1560         }
1561 
1562         talloc_free(r);
1563 
1564         return true;
1565 }
1566 
1567 static bool api_dfs_EnumEx(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
1568 {
1569         const struct ndr_interface_call *call;
1570         struct ndr_pull *pull;
1571         struct ndr_push *push;
1572         enum ndr_err_code ndr_err;
1573         DATA_BLOB blob;
1574         struct dfs_EnumEx *r;
1575 
1576         call = &ndr_table_netdfs.calls[NDR_DFS_ENUMEX];
1577 
1578         r = talloc(talloc_tos(), struct dfs_EnumEx);
1579         if (r == NULL) {
1580                 return false;
1581         }
1582 
1583         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1584                 talloc_free(r);
1585                 return false;
1586         }
1587 
1588         pull = ndr_pull_init_blob(&blob, r, NULL);
1589         if (pull == NULL) {
1590                 talloc_free(r);
1591                 return false;
1592         }
1593 
1594         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1595         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1596         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1597                 talloc_free(r);
1598                 return false;
1599         }
1600 
1601         if (DEBUGLEVEL >= 10) {
1602                 NDR_PRINT_IN_DEBUG(dfs_EnumEx, r);
1603         }
1604 
1605         ZERO_STRUCT(r->out);
1606         r->out.info = r->in.info;
1607         r->out.total = r->in.total;
1608         r->out.result = _dfs_EnumEx(p, r);
1609 
1610         if (p->rng_fault_state) {
1611                 talloc_free(r);
1612                 /* Return true here, srv_pipe_hnd.c will take care */
1613                 return true;
1614         }
1615 
1616         if (DEBUGLEVEL >= 10) {
1617                 NDR_PRINT_OUT_DEBUG(dfs_EnumEx, r);
1618         }
1619 
1620         push = ndr_push_init_ctx(r, NULL);
1621         if (push == NULL) {
1622                 talloc_free(r);
1623                 return false;
1624         }
1625 
1626         ndr_err = call->ndr_push(push, NDR_OUT, r);
1627         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1628                 talloc_free(r);
1629                 return false;
1630         }
1631 
1632         blob = ndr_push_blob(push);
1633         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1634                 talloc_free(r);
1635                 return false;
1636         }
1637 
1638         talloc_free(r);
1639 
1640         return true;
1641 }
1642 
1643 static bool api_dfs_SetInfo2(pipes_struct *p)
     /* [<][>][^][v][top][bottom][index][help] */
1644 {
1645         const struct ndr_interface_call *call;
1646         struct ndr_pull *pull;
1647         struct ndr_push *push;
1648         enum ndr_err_code ndr_err;
1649         DATA_BLOB blob;
1650         struct dfs_SetInfo2 *r;
1651 
1652         call = &ndr_table_netdfs.calls[NDR_DFS_SETINFO2];
1653 
1654         r = talloc(talloc_tos(), struct dfs_SetInfo2);
1655         if (r == NULL) {
1656                 return false;
1657         }
1658 
1659         if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1660                 talloc_free(r);
1661                 return false;
1662         }
1663 
1664         pull = ndr_pull_init_blob(&blob, r, NULL);
1665         if (pull == NULL) {
1666                 talloc_free(r);
1667                 return false;
1668         }
1669 
1670         pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1671         ndr_err = call->ndr_pull(pull, NDR_IN, r);
1672         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1673                 talloc_free(r);
1674                 return false;
1675         }
1676 
1677         if (DEBUGLEVEL >= 10) {
1678                 NDR_PRINT_IN_DEBUG(dfs_SetInfo2, r);
1679         }
1680 
1681         r->out.result = _dfs_SetInfo2(p, r);
1682 
1683         if (p->rng_fault_state) {
1684                 talloc_free(r);
1685                 /* Return true here, srv_pipe_hnd.c will take care */
1686                 return true;
1687         }
1688 
1689         if (DEBUGLEVEL >= 10) {
1690                 NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, r);
1691         }
1692 
1693         push = ndr_push_init_ctx(r, NULL);
1694         if (push == NULL) {
1695                 talloc_free(r);
1696                 return false;
1697         }
1698 
1699         ndr_err = call->ndr_push(push, NDR_OUT, r);
1700         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1701                 talloc_free(r);
1702                 return false;
1703         }
1704 
1705         blob = ndr_push_blob(push);
1706         if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1707                 talloc_free(r);
1708                 return false;
1709         }
1710 
1711         talloc_free(r);
1712 
1713         return true;
1714 }
1715 
1716 
1717 /* Tables */
1718 static struct api_struct api_netdfs_cmds[] = 
1719 {
1720         {"DFS_GETMANAGERVERSION", NDR_DFS_GETMANAGERVERSION, api_dfs_GetManagerVersion},
1721         {"DFS_ADD", NDR_DFS_ADD, api_dfs_Add},
1722         {"DFS_REMOVE", NDR_DFS_REMOVE, api_dfs_Remove},
1723         {"DFS_SETINFO", NDR_DFS_SETINFO, api_dfs_SetInfo},
1724         {"DFS_GETINFO", NDR_DFS_GETINFO, api_dfs_GetInfo},
1725         {"DFS_ENUM", NDR_DFS_ENUM, api_dfs_Enum},
1726         {"DFS_RENAME", NDR_DFS_RENAME, api_dfs_Rename},
1727         {"DFS_MOVE", NDR_DFS_MOVE, api_dfs_Move},
1728         {"DFS_MANAGERGETCONFIGINFO", NDR_DFS_MANAGERGETCONFIGINFO, api_dfs_ManagerGetConfigInfo},
1729         {"DFS_MANAGERSENDSITEINFO", NDR_DFS_MANAGERSENDSITEINFO, api_dfs_ManagerSendSiteInfo},
1730         {"DFS_ADDFTROOT", NDR_DFS_ADDFTROOT, api_dfs_AddFtRoot},
1731         {"DFS_REMOVEFTROOT", NDR_DFS_REMOVEFTROOT, api_dfs_RemoveFtRoot},
1732         {"DFS_ADDSTDROOT", NDR_DFS_ADDSTDROOT, api_dfs_AddStdRoot},
1733         {"DFS_REMOVESTDROOT", NDR_DFS_REMOVESTDROOT, api_dfs_RemoveStdRoot},
1734         {"DFS_MANAGERINITIALIZE", NDR_DFS_MANAGERINITIALIZE, api_dfs_ManagerInitialize},
1735         {"DFS_ADDSTDROOTFORCED", NDR_DFS_ADDSTDROOTFORCED, api_dfs_AddStdRootForced},
1736         {"DFS_GETDCADDRESS", NDR_DFS_GETDCADDRESS, api_dfs_GetDcAddress},
1737         {"DFS_SETDCADDRESS", NDR_DFS_SETDCADDRESS, api_dfs_SetDcAddress},
1738         {"DFS_FLUSHFTTABLE", NDR_DFS_FLUSHFTTABLE, api_dfs_FlushFtTable},
1739         {"DFS_ADD2", NDR_DFS_ADD2, api_dfs_Add2},
1740         {"DFS_REMOVE2", NDR_DFS_REMOVE2, api_dfs_Remove2},
1741         {"DFS_ENUMEX", NDR_DFS_ENUMEX, api_dfs_EnumEx},
1742         {"DFS_SETINFO2", NDR_DFS_SETINFO2, api_dfs_SetInfo2},
1743 };
1744 
1745 void netdfs_get_pipe_fns(struct api_struct **fns, int *n_fns)
     /* [<][>][^][v][top][bottom][index][help] */
1746 {
1747         *fns = api_netdfs_cmds;
1748         *n_fns = sizeof(api_netdfs_cmds) / sizeof(struct api_struct);
1749 }
1750 
1751 NTSTATUS rpc_netdfs_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
     /* [<][>][^][v][top][bottom][index][help] */
1752 {
1753         if (cli->pipes_struct == NULL) {
1754                 return NT_STATUS_INVALID_PARAMETER;
1755         }
1756 
1757         switch (opnum)
1758         {
1759                 case NDR_DFS_GETMANAGERVERSION: {
1760                         struct dfs_GetManagerVersion *r = (struct dfs_GetManagerVersion *)_r;
1761                         ZERO_STRUCT(r->out);
1762                         r->out.version = talloc_zero(mem_ctx, enum dfs_ManagerVersion);
1763                         if (r->out.version == NULL) {
1764                         return NT_STATUS_NO_MEMORY;
1765                         }
1766 
1767                         _dfs_GetManagerVersion(cli->pipes_struct, r);
1768                         return NT_STATUS_OK;
1769                 }
1770 
1771                 case NDR_DFS_ADD: {
1772                         struct dfs_Add *r = (struct dfs_Add *)_r;
1773                         r->out.result = _dfs_Add(cli->pipes_struct, r);
1774                         return NT_STATUS_OK;
1775                 }
1776 
1777                 case NDR_DFS_REMOVE: {
1778                         struct dfs_Remove *r = (struct dfs_Remove *)_r;
1779                         r->out.result = _dfs_Remove(cli->pipes_struct, r);
1780                         return NT_STATUS_OK;
1781                 }
1782 
1783                 case NDR_DFS_SETINFO: {
1784                         struct dfs_SetInfo *r = (struct dfs_SetInfo *)_r;
1785                         r->out.result = _dfs_SetInfo(cli->pipes_struct, r);
1786                         return NT_STATUS_OK;
1787                 }
1788 
1789                 case NDR_DFS_GETINFO: {
1790                         struct dfs_GetInfo *r = (struct dfs_GetInfo *)_r;
1791                         ZERO_STRUCT(r->out);
1792                         r->out.info = talloc_zero(mem_ctx, union dfs_Info);
1793                         if (r->out.info == NULL) {
1794                         return NT_STATUS_NO_MEMORY;
1795                         }
1796 
1797                         r->out.result = _dfs_GetInfo(cli->pipes_struct, r);
1798                         return NT_STATUS_OK;
1799                 }
1800 
1801                 case NDR_DFS_ENUM: {
1802                         struct dfs_Enum *r = (struct dfs_Enum *)_r;
1803                         ZERO_STRUCT(r->out);
1804                         r->out.info = r->in.info;
1805                         r->out.total = r->in.total;
1806                         r->out.result = _dfs_Enum(cli->pipes_struct, r);
1807                         return NT_STATUS_OK;
1808                 }
1809 
1810                 case NDR_DFS_RENAME: {
1811                         struct dfs_Rename *r = (struct dfs_Rename *)_r;
1812                         r->out.result = _dfs_Rename(cli->pipes_struct, r);
1813                         return NT_STATUS_OK;
1814                 }
1815 
1816                 case NDR_DFS_MOVE: {
1817                         struct dfs_Move *r = (struct dfs_Move *)_r;
1818                         r->out.result = _dfs_Move(cli->pipes_struct, r);
1819                         return NT_STATUS_OK;
1820                 }
1821 
1822                 case NDR_DFS_MANAGERGETCONFIGINFO: {
1823                         struct dfs_ManagerGetConfigInfo *r = (struct dfs_ManagerGetConfigInfo *)_r;
1824                         r->out.result = _dfs_ManagerGetConfigInfo(cli->pipes_struct, r);
1825                         return NT_STATUS_OK;
1826                 }
1827 
1828                 case NDR_DFS_MANAGERSENDSITEINFO: {
1829                         struct dfs_ManagerSendSiteInfo *r = (struct dfs_ManagerSendSiteInfo *)_r;
1830                         r->out.result = _dfs_ManagerSendSiteInfo(cli->pipes_struct, r);
1831                         return NT_STATUS_OK;
1832                 }
1833 
1834                 case NDR_DFS_ADDFTROOT: {
1835                         struct dfs_AddFtRoot *r = (struct dfs_AddFtRoot *)_r;
1836                         ZERO_STRUCT(r->out);
1837                         r->out.unknown2 = r->in.unknown2;
1838                         r->out.result = _dfs_AddFtRoot(cli->pipes_struct, r);
1839                         return NT_STATUS_OK;
1840                 }
1841 
1842                 case NDR_DFS_REMOVEFTROOT: {
1843                         struct dfs_RemoveFtRoot *r = (struct dfs_RemoveFtRoot *)_r;
1844                         ZERO_STRUCT(r->out);
1845                         r->out.unknown = r->in.unknown;
1846                         r->out.result = _dfs_RemoveFtRoot(cli->pipes_struct, r);
1847                         return NT_STATUS_OK;
1848                 }
1849 
1850                 case NDR_DFS_ADDSTDROOT: {
1851                         struct dfs_AddStdRoot *r = (struct dfs_AddStdRoot *)_r;
1852                         r->out.result = _dfs_AddStdRoot(cli->pipes_struct, r);
1853                         return NT_STATUS_OK;
1854                 }
1855 
1856                 case NDR_DFS_REMOVESTDROOT: {
1857                         struct dfs_RemoveStdRoot *r = (struct dfs_RemoveStdRoot *)_r;
1858                         r->out.result = _dfs_RemoveStdRoot(cli->pipes_struct, r);
1859                         return NT_STATUS_OK;
1860                 }
1861 
1862                 case NDR_DFS_MANAGERINITIALIZE: {
1863                         struct dfs_ManagerInitialize *r = (struct dfs_ManagerInitialize *)_r;
1864                         r->out.result = _dfs_ManagerInitialize(cli->pipes_struct, r);
1865                         return NT_STATUS_OK;
1866                 }
1867 
1868                 case NDR_DFS_ADDSTDROOTFORCED: {
1869                         struct dfs_AddStdRootForced *r = (struct dfs_AddStdRootForced *)_r;
1870                         r->out.result = _dfs_AddStdRootForced(cli->pipes_struct, r);
1871                         return NT_STATUS_OK;
1872                 }
1873 
1874                 case NDR_DFS_GETDCADDRESS: {
1875                         struct dfs_GetDcAddress *r = (struct dfs_GetDcAddress *)_r;
1876                         ZERO_STRUCT(r->out);
1877                         r->out.server_fullname = r->in.server_fullname;
1878                         r->out.is_root = r->in.is_root;
1879                         r->out.ttl = r->in.ttl;
1880                         r->out.result = _dfs_GetDcAddress(cli->pipes_struct, r);
1881                         return NT_STATUS_OK;
1882                 }
1883 
1884                 case NDR_DFS_SETDCADDRESS: {
1885                         struct dfs_SetDcAddress *r = (struct dfs_SetDcAddress *)_r;
1886                         r->out.result = _dfs_SetDcAddress(cli->pipes_struct, r);
1887                         return NT_STATUS_OK;
1888                 }
1889 
1890                 case NDR_DFS_FLUSHFTTABLE: {
1891                         struct dfs_FlushFtTable *r = (struct dfs_FlushFtTable *)_r;
1892                         r->out.result = _dfs_FlushFtTable(cli->pipes_struct, r);
1893                         return NT_STATUS_OK;
1894                 }
1895 
1896                 case NDR_DFS_ADD2: {
1897                         struct dfs_Add2 *r = (struct dfs_Add2 *)_r;
1898                         r->out.result = _dfs_Add2(cli->pipes_struct, r);
1899                         return NT_STATUS_OK;
1900                 }
1901 
1902                 case NDR_DFS_REMOVE2: {
1903                         struct dfs_Remove2 *r = (struct dfs_Remove2 *)_r;
1904                         r->out.result = _dfs_Remove2(cli->pipes_struct, r);
1905                         return NT_STATUS_OK;
1906                 }
1907 
1908                 case NDR_DFS_ENUMEX: {
1909                         struct dfs_EnumEx *r = (struct dfs_EnumEx *)_r;
1910                         ZERO_STRUCT(r->out);
1911                         r->out.info = r->in.info;
1912                         r->out.total = r->in.total;
1913                         r->out.result = _dfs_EnumEx(cli->pipes_struct, r);
1914                         return NT_STATUS_OK;
1915                 }
1916 
1917                 case NDR_DFS_SETINFO2: {
1918                         struct dfs_SetInfo2 *r = (struct dfs_SetInfo2 *)_r;
1919                         r->out.result = _dfs_SetInfo2(cli->pipes_struct, r);
1920                         return NT_STATUS_OK;
1921                 }
1922 
1923                 default:
1924                         return NT_STATUS_NOT_IMPLEMENTED;
1925         }
1926 }
1927 
1928 NTSTATUS rpc_netdfs_init(void)
     /* [<][>][^][v][top][bottom][index][help] */
1929 {
1930         return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "netdfs", "netdfs", &ndr_table_netdfs, api_netdfs_cmds, sizeof(api_netdfs_cmds) / sizeof(struct api_struct));
1931 }

/* [<][>][^][v][top][bottom][index][help] */