| 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_dssetup.h"
|
|---|
| 8 |
|
|---|
| 9 | static bool api_dssetup_DsRoleGetPrimaryDomainInformation(pipes_struct *p)
|
|---|
| 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 dssetup_DsRoleGetPrimaryDomainInformation *r;
|
|---|
| 17 |
|
|---|
| 18 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION];
|
|---|
| 19 |
|
|---|
| 20 | r = talloc(talloc_tos(), struct dssetup_DsRoleGetPrimaryDomainInformation);
|
|---|
| 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(dssetup_DsRoleGetPrimaryDomainInformation, r);
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | ZERO_STRUCT(r->out);
|
|---|
| 48 | r->out.info = talloc_zero(r, union dssetup_DsRoleInfo);
|
|---|
| 49 | if (r->out.info == NULL) {
|
|---|
| 50 | talloc_free(r);
|
|---|
| 51 | return false;
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| 54 | r->out.result = _dssetup_DsRoleGetPrimaryDomainInformation(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(dssetup_DsRoleGetPrimaryDomainInformation, 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_dssetup_DsRoleDnsNameToFlatName(pipes_struct *p)
|
|---|
| 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 dssetup_DsRoleDnsNameToFlatName *r;
|
|---|
| 97 |
|
|---|
| 98 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME];
|
|---|
| 99 |
|
|---|
| 100 | r = talloc(talloc_tos(), struct dssetup_DsRoleDnsNameToFlatName);
|
|---|
| 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(dssetup_DsRoleDnsNameToFlatName, r);
|
|---|
| 125 | }
|
|---|
| 126 |
|
|---|
| 127 | r->out.result = _dssetup_DsRoleDnsNameToFlatName(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(dssetup_DsRoleDnsNameToFlatName, 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_dssetup_DsRoleDcAsDc(pipes_struct *p)
|
|---|
| 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 dssetup_DsRoleDcAsDc *r;
|
|---|
| 170 |
|
|---|
| 171 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDCASDC];
|
|---|
| 172 |
|
|---|
| 173 | r = talloc(talloc_tos(), struct dssetup_DsRoleDcAsDc);
|
|---|
| 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(dssetup_DsRoleDcAsDc, r);
|
|---|
| 198 | }
|
|---|
| 199 |
|
|---|
| 200 | r->out.result = _dssetup_DsRoleDcAsDc(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(dssetup_DsRoleDcAsDc, 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_dssetup_DsRoleDcAsReplica(pipes_struct *p)
|
|---|
| 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 dssetup_DsRoleDcAsReplica *r;
|
|---|
| 243 |
|
|---|
| 244 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDCASREPLICA];
|
|---|
| 245 |
|
|---|
| 246 | r = talloc(talloc_tos(), struct dssetup_DsRoleDcAsReplica);
|
|---|
| 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(dssetup_DsRoleDcAsReplica, r);
|
|---|
| 271 | }
|
|---|
| 272 |
|
|---|
| 273 | r->out.result = _dssetup_DsRoleDcAsReplica(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(dssetup_DsRoleDcAsReplica, 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_dssetup_DsRoleDemoteDc(pipes_struct *p)
|
|---|
| 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 dssetup_DsRoleDemoteDc *r;
|
|---|
| 316 |
|
|---|
| 317 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEDEMOTEDC];
|
|---|
| 318 |
|
|---|
| 319 | r = talloc(talloc_tos(), struct dssetup_DsRoleDemoteDc);
|
|---|
| 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(dssetup_DsRoleDemoteDc, r);
|
|---|
| 344 | }
|
|---|
| 345 |
|
|---|
| 346 | r->out.result = _dssetup_DsRoleDemoteDc(p, r);
|
|---|
| 347 |
|
|---|
| 348 | if (p->rng_fault_state) {
|
|---|
| 349 | talloc_free(r);
|
|---|
| 350 | /* Return true here, srv_pipe_hnd.c will take care */
|
|---|
| 351 | return true;
|
|---|
| 352 | }
|
|---|
| 353 |
|
|---|
| 354 | if (DEBUGLEVEL >= 10) {
|
|---|
| 355 | NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDemoteDc, r);
|
|---|
| 356 | }
|
|---|
| 357 |
|
|---|
| 358 | push = ndr_push_init_ctx(r, NULL);
|
|---|
| 359 | if (push == NULL) {
|
|---|
| 360 | talloc_free(r);
|
|---|
| 361 | return false;
|
|---|
| 362 | }
|
|---|
| 363 |
|
|---|
| 364 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
|---|
| 365 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 366 | talloc_free(r);
|
|---|
| 367 | return false;
|
|---|
| 368 | }
|
|---|
| 369 |
|
|---|
| 370 | blob = ndr_push_blob(push);
|
|---|
| 371 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
|---|
| 372 | talloc_free(r);
|
|---|
| 373 | return false;
|
|---|
| 374 | }
|
|---|
| 375 |
|
|---|
| 376 | talloc_free(r);
|
|---|
| 377 |
|
|---|
| 378 | return true;
|
|---|
| 379 | }
|
|---|
| 380 |
|
|---|
| 381 | static bool api_dssetup_DsRoleGetDcOperationProgress(pipes_struct *p)
|
|---|
| 382 | {
|
|---|
| 383 | const struct ndr_interface_call *call;
|
|---|
| 384 | struct ndr_pull *pull;
|
|---|
| 385 | struct ndr_push *push;
|
|---|
| 386 | enum ndr_err_code ndr_err;
|
|---|
| 387 | DATA_BLOB blob;
|
|---|
| 388 | struct dssetup_DsRoleGetDcOperationProgress *r;
|
|---|
| 389 |
|
|---|
| 390 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS];
|
|---|
| 391 |
|
|---|
| 392 | r = talloc(talloc_tos(), struct dssetup_DsRoleGetDcOperationProgress);
|
|---|
| 393 | if (r == NULL) {
|
|---|
| 394 | return false;
|
|---|
| 395 | }
|
|---|
| 396 |
|
|---|
| 397 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
|---|
| 398 | talloc_free(r);
|
|---|
| 399 | return false;
|
|---|
| 400 | }
|
|---|
| 401 |
|
|---|
| 402 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
|---|
| 403 | if (pull == NULL) {
|
|---|
| 404 | talloc_free(r);
|
|---|
| 405 | return false;
|
|---|
| 406 | }
|
|---|
| 407 |
|
|---|
| 408 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
|---|
| 409 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
|---|
| 410 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 411 | talloc_free(r);
|
|---|
| 412 | return false;
|
|---|
| 413 | }
|
|---|
| 414 |
|
|---|
| 415 | if (DEBUGLEVEL >= 10) {
|
|---|
| 416 | NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationProgress, r);
|
|---|
| 417 | }
|
|---|
| 418 |
|
|---|
| 419 | r->out.result = _dssetup_DsRoleGetDcOperationProgress(p, r);
|
|---|
| 420 |
|
|---|
| 421 | if (p->rng_fault_state) {
|
|---|
| 422 | talloc_free(r);
|
|---|
| 423 | /* Return true here, srv_pipe_hnd.c will take care */
|
|---|
| 424 | return true;
|
|---|
| 425 | }
|
|---|
| 426 |
|
|---|
| 427 | if (DEBUGLEVEL >= 10) {
|
|---|
| 428 | NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationProgress, r);
|
|---|
| 429 | }
|
|---|
| 430 |
|
|---|
| 431 | push = ndr_push_init_ctx(r, NULL);
|
|---|
| 432 | if (push == NULL) {
|
|---|
| 433 | talloc_free(r);
|
|---|
| 434 | return false;
|
|---|
| 435 | }
|
|---|
| 436 |
|
|---|
| 437 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
|---|
| 438 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 439 | talloc_free(r);
|
|---|
| 440 | return false;
|
|---|
| 441 | }
|
|---|
| 442 |
|
|---|
| 443 | blob = ndr_push_blob(push);
|
|---|
| 444 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
|---|
| 445 | talloc_free(r);
|
|---|
| 446 | return false;
|
|---|
| 447 | }
|
|---|
| 448 |
|
|---|
| 449 | talloc_free(r);
|
|---|
| 450 |
|
|---|
| 451 | return true;
|
|---|
| 452 | }
|
|---|
| 453 |
|
|---|
| 454 | static bool api_dssetup_DsRoleGetDcOperationResults(pipes_struct *p)
|
|---|
| 455 | {
|
|---|
| 456 | const struct ndr_interface_call *call;
|
|---|
| 457 | struct ndr_pull *pull;
|
|---|
| 458 | struct ndr_push *push;
|
|---|
| 459 | enum ndr_err_code ndr_err;
|
|---|
| 460 | DATA_BLOB blob;
|
|---|
| 461 | struct dssetup_DsRoleGetDcOperationResults *r;
|
|---|
| 462 |
|
|---|
| 463 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS];
|
|---|
| 464 |
|
|---|
| 465 | r = talloc(talloc_tos(), struct dssetup_DsRoleGetDcOperationResults);
|
|---|
| 466 | if (r == NULL) {
|
|---|
| 467 | return false;
|
|---|
| 468 | }
|
|---|
| 469 |
|
|---|
| 470 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
|---|
| 471 | talloc_free(r);
|
|---|
| 472 | return false;
|
|---|
| 473 | }
|
|---|
| 474 |
|
|---|
| 475 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
|---|
| 476 | if (pull == NULL) {
|
|---|
| 477 | talloc_free(r);
|
|---|
| 478 | return false;
|
|---|
| 479 | }
|
|---|
| 480 |
|
|---|
| 481 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
|---|
| 482 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
|---|
| 483 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 484 | talloc_free(r);
|
|---|
| 485 | return false;
|
|---|
| 486 | }
|
|---|
| 487 |
|
|---|
| 488 | if (DEBUGLEVEL >= 10) {
|
|---|
| 489 | NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationResults, r);
|
|---|
| 490 | }
|
|---|
| 491 |
|
|---|
| 492 | r->out.result = _dssetup_DsRoleGetDcOperationResults(p, r);
|
|---|
| 493 |
|
|---|
| 494 | if (p->rng_fault_state) {
|
|---|
| 495 | talloc_free(r);
|
|---|
| 496 | /* Return true here, srv_pipe_hnd.c will take care */
|
|---|
| 497 | return true;
|
|---|
| 498 | }
|
|---|
| 499 |
|
|---|
| 500 | if (DEBUGLEVEL >= 10) {
|
|---|
| 501 | NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationResults, r);
|
|---|
| 502 | }
|
|---|
| 503 |
|
|---|
| 504 | push = ndr_push_init_ctx(r, NULL);
|
|---|
| 505 | if (push == NULL) {
|
|---|
| 506 | talloc_free(r);
|
|---|
| 507 | return false;
|
|---|
| 508 | }
|
|---|
| 509 |
|
|---|
| 510 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
|---|
| 511 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 512 | talloc_free(r);
|
|---|
| 513 | return false;
|
|---|
| 514 | }
|
|---|
| 515 |
|
|---|
| 516 | blob = ndr_push_blob(push);
|
|---|
| 517 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
|---|
| 518 | talloc_free(r);
|
|---|
| 519 | return false;
|
|---|
| 520 | }
|
|---|
| 521 |
|
|---|
| 522 | talloc_free(r);
|
|---|
| 523 |
|
|---|
| 524 | return true;
|
|---|
| 525 | }
|
|---|
| 526 |
|
|---|
| 527 | static bool api_dssetup_DsRoleCancel(pipes_struct *p)
|
|---|
| 528 | {
|
|---|
| 529 | const struct ndr_interface_call *call;
|
|---|
| 530 | struct ndr_pull *pull;
|
|---|
| 531 | struct ndr_push *push;
|
|---|
| 532 | enum ndr_err_code ndr_err;
|
|---|
| 533 | DATA_BLOB blob;
|
|---|
| 534 | struct dssetup_DsRoleCancel *r;
|
|---|
| 535 |
|
|---|
| 536 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLECANCEL];
|
|---|
| 537 |
|
|---|
| 538 | r = talloc(talloc_tos(), struct dssetup_DsRoleCancel);
|
|---|
| 539 | if (r == NULL) {
|
|---|
| 540 | return false;
|
|---|
| 541 | }
|
|---|
| 542 |
|
|---|
| 543 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
|---|
| 544 | talloc_free(r);
|
|---|
| 545 | return false;
|
|---|
| 546 | }
|
|---|
| 547 |
|
|---|
| 548 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
|---|
| 549 | if (pull == NULL) {
|
|---|
| 550 | talloc_free(r);
|
|---|
| 551 | return false;
|
|---|
| 552 | }
|
|---|
| 553 |
|
|---|
| 554 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
|---|
| 555 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
|---|
| 556 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 557 | talloc_free(r);
|
|---|
| 558 | return false;
|
|---|
| 559 | }
|
|---|
| 560 |
|
|---|
| 561 | if (DEBUGLEVEL >= 10) {
|
|---|
| 562 | NDR_PRINT_IN_DEBUG(dssetup_DsRoleCancel, r);
|
|---|
| 563 | }
|
|---|
| 564 |
|
|---|
| 565 | r->out.result = _dssetup_DsRoleCancel(p, r);
|
|---|
| 566 |
|
|---|
| 567 | if (p->rng_fault_state) {
|
|---|
| 568 | talloc_free(r);
|
|---|
| 569 | /* Return true here, srv_pipe_hnd.c will take care */
|
|---|
| 570 | return true;
|
|---|
| 571 | }
|
|---|
| 572 |
|
|---|
| 573 | if (DEBUGLEVEL >= 10) {
|
|---|
| 574 | NDR_PRINT_OUT_DEBUG(dssetup_DsRoleCancel, r);
|
|---|
| 575 | }
|
|---|
| 576 |
|
|---|
| 577 | push = ndr_push_init_ctx(r, NULL);
|
|---|
| 578 | if (push == NULL) {
|
|---|
| 579 | talloc_free(r);
|
|---|
| 580 | return false;
|
|---|
| 581 | }
|
|---|
| 582 |
|
|---|
| 583 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
|---|
| 584 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 585 | talloc_free(r);
|
|---|
| 586 | return false;
|
|---|
| 587 | }
|
|---|
| 588 |
|
|---|
| 589 | blob = ndr_push_blob(push);
|
|---|
| 590 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
|---|
| 591 | talloc_free(r);
|
|---|
| 592 | return false;
|
|---|
| 593 | }
|
|---|
| 594 |
|
|---|
| 595 | talloc_free(r);
|
|---|
| 596 |
|
|---|
| 597 | return true;
|
|---|
| 598 | }
|
|---|
| 599 |
|
|---|
| 600 | static bool api_dssetup_DsRoleServerSaveStateForUpgrade(pipes_struct *p)
|
|---|
| 601 | {
|
|---|
| 602 | const struct ndr_interface_call *call;
|
|---|
| 603 | struct ndr_pull *pull;
|
|---|
| 604 | struct ndr_push *push;
|
|---|
| 605 | enum ndr_err_code ndr_err;
|
|---|
| 606 | DATA_BLOB blob;
|
|---|
| 607 | struct dssetup_DsRoleServerSaveStateForUpgrade *r;
|
|---|
| 608 |
|
|---|
| 609 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE];
|
|---|
| 610 |
|
|---|
| 611 | r = talloc(talloc_tos(), struct dssetup_DsRoleServerSaveStateForUpgrade);
|
|---|
| 612 | if (r == NULL) {
|
|---|
| 613 | return false;
|
|---|
| 614 | }
|
|---|
| 615 |
|
|---|
| 616 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
|---|
| 617 | talloc_free(r);
|
|---|
| 618 | return false;
|
|---|
| 619 | }
|
|---|
| 620 |
|
|---|
| 621 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
|---|
| 622 | if (pull == NULL) {
|
|---|
| 623 | talloc_free(r);
|
|---|
| 624 | return false;
|
|---|
| 625 | }
|
|---|
| 626 |
|
|---|
| 627 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
|---|
| 628 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
|---|
| 629 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 630 | talloc_free(r);
|
|---|
| 631 | return false;
|
|---|
| 632 | }
|
|---|
| 633 |
|
|---|
| 634 | if (DEBUGLEVEL >= 10) {
|
|---|
| 635 | NDR_PRINT_IN_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, r);
|
|---|
| 636 | }
|
|---|
| 637 |
|
|---|
| 638 | r->out.result = _dssetup_DsRoleServerSaveStateForUpgrade(p, r);
|
|---|
| 639 |
|
|---|
| 640 | if (p->rng_fault_state) {
|
|---|
| 641 | talloc_free(r);
|
|---|
| 642 | /* Return true here, srv_pipe_hnd.c will take care */
|
|---|
| 643 | return true;
|
|---|
| 644 | }
|
|---|
| 645 |
|
|---|
| 646 | if (DEBUGLEVEL >= 10) {
|
|---|
| 647 | NDR_PRINT_OUT_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, r);
|
|---|
| 648 | }
|
|---|
| 649 |
|
|---|
| 650 | push = ndr_push_init_ctx(r, NULL);
|
|---|
| 651 | if (push == NULL) {
|
|---|
| 652 | talloc_free(r);
|
|---|
| 653 | return false;
|
|---|
| 654 | }
|
|---|
| 655 |
|
|---|
| 656 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
|---|
| 657 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 658 | talloc_free(r);
|
|---|
| 659 | return false;
|
|---|
| 660 | }
|
|---|
| 661 |
|
|---|
| 662 | blob = ndr_push_blob(push);
|
|---|
| 663 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
|---|
| 664 | talloc_free(r);
|
|---|
| 665 | return false;
|
|---|
| 666 | }
|
|---|
| 667 |
|
|---|
| 668 | talloc_free(r);
|
|---|
| 669 |
|
|---|
| 670 | return true;
|
|---|
| 671 | }
|
|---|
| 672 |
|
|---|
| 673 | static bool api_dssetup_DsRoleUpgradeDownlevelServer(pipes_struct *p)
|
|---|
| 674 | {
|
|---|
| 675 | const struct ndr_interface_call *call;
|
|---|
| 676 | struct ndr_pull *pull;
|
|---|
| 677 | struct ndr_push *push;
|
|---|
| 678 | enum ndr_err_code ndr_err;
|
|---|
| 679 | DATA_BLOB blob;
|
|---|
| 680 | struct dssetup_DsRoleUpgradeDownlevelServer *r;
|
|---|
| 681 |
|
|---|
| 682 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER];
|
|---|
| 683 |
|
|---|
| 684 | r = talloc(talloc_tos(), struct dssetup_DsRoleUpgradeDownlevelServer);
|
|---|
| 685 | if (r == NULL) {
|
|---|
| 686 | return false;
|
|---|
| 687 | }
|
|---|
| 688 |
|
|---|
| 689 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
|---|
| 690 | talloc_free(r);
|
|---|
| 691 | return false;
|
|---|
| 692 | }
|
|---|
| 693 |
|
|---|
| 694 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
|---|
| 695 | if (pull == NULL) {
|
|---|
| 696 | talloc_free(r);
|
|---|
| 697 | return false;
|
|---|
| 698 | }
|
|---|
| 699 |
|
|---|
| 700 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
|---|
| 701 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
|---|
| 702 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 703 | talloc_free(r);
|
|---|
| 704 | return false;
|
|---|
| 705 | }
|
|---|
| 706 |
|
|---|
| 707 | if (DEBUGLEVEL >= 10) {
|
|---|
| 708 | NDR_PRINT_IN_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, r);
|
|---|
| 709 | }
|
|---|
| 710 |
|
|---|
| 711 | r->out.result = _dssetup_DsRoleUpgradeDownlevelServer(p, r);
|
|---|
| 712 |
|
|---|
| 713 | if (p->rng_fault_state) {
|
|---|
| 714 | talloc_free(r);
|
|---|
| 715 | /* Return true here, srv_pipe_hnd.c will take care */
|
|---|
| 716 | return true;
|
|---|
| 717 | }
|
|---|
| 718 |
|
|---|
| 719 | if (DEBUGLEVEL >= 10) {
|
|---|
| 720 | NDR_PRINT_OUT_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, r);
|
|---|
| 721 | }
|
|---|
| 722 |
|
|---|
| 723 | push = ndr_push_init_ctx(r, NULL);
|
|---|
| 724 | if (push == NULL) {
|
|---|
| 725 | talloc_free(r);
|
|---|
| 726 | return false;
|
|---|
| 727 | }
|
|---|
| 728 |
|
|---|
| 729 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
|---|
| 730 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 731 | talloc_free(r);
|
|---|
| 732 | return false;
|
|---|
| 733 | }
|
|---|
| 734 |
|
|---|
| 735 | blob = ndr_push_blob(push);
|
|---|
| 736 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
|---|
| 737 | talloc_free(r);
|
|---|
| 738 | return false;
|
|---|
| 739 | }
|
|---|
| 740 |
|
|---|
| 741 | talloc_free(r);
|
|---|
| 742 |
|
|---|
| 743 | return true;
|
|---|
| 744 | }
|
|---|
| 745 |
|
|---|
| 746 | static bool api_dssetup_DsRoleAbortDownlevelServerUpgrade(pipes_struct *p)
|
|---|
| 747 | {
|
|---|
| 748 | const struct ndr_interface_call *call;
|
|---|
| 749 | struct ndr_pull *pull;
|
|---|
| 750 | struct ndr_push *push;
|
|---|
| 751 | enum ndr_err_code ndr_err;
|
|---|
| 752 | DATA_BLOB blob;
|
|---|
| 753 | struct dssetup_DsRoleAbortDownlevelServerUpgrade *r;
|
|---|
| 754 |
|
|---|
| 755 | call = &ndr_table_dssetup.calls[NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE];
|
|---|
| 756 |
|
|---|
| 757 | r = talloc(talloc_tos(), struct dssetup_DsRoleAbortDownlevelServerUpgrade);
|
|---|
| 758 | if (r == NULL) {
|
|---|
| 759 | return false;
|
|---|
| 760 | }
|
|---|
| 761 |
|
|---|
| 762 | if (!prs_data_blob(&p->in_data.data, &blob, r)) {
|
|---|
| 763 | talloc_free(r);
|
|---|
| 764 | return false;
|
|---|
| 765 | }
|
|---|
| 766 |
|
|---|
| 767 | pull = ndr_pull_init_blob(&blob, r, NULL);
|
|---|
| 768 | if (pull == NULL) {
|
|---|
| 769 | talloc_free(r);
|
|---|
| 770 | return false;
|
|---|
| 771 | }
|
|---|
| 772 |
|
|---|
| 773 | pull->flags |= LIBNDR_FLAG_REF_ALLOC;
|
|---|
| 774 | ndr_err = call->ndr_pull(pull, NDR_IN, r);
|
|---|
| 775 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 776 | talloc_free(r);
|
|---|
| 777 | return false;
|
|---|
| 778 | }
|
|---|
| 779 |
|
|---|
| 780 | if (DEBUGLEVEL >= 10) {
|
|---|
| 781 | NDR_PRINT_IN_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, r);
|
|---|
| 782 | }
|
|---|
| 783 |
|
|---|
| 784 | r->out.result = _dssetup_DsRoleAbortDownlevelServerUpgrade(p, r);
|
|---|
| 785 |
|
|---|
| 786 | if (p->rng_fault_state) {
|
|---|
| 787 | talloc_free(r);
|
|---|
| 788 | /* Return true here, srv_pipe_hnd.c will take care */
|
|---|
| 789 | return true;
|
|---|
| 790 | }
|
|---|
| 791 |
|
|---|
| 792 | if (DEBUGLEVEL >= 10) {
|
|---|
| 793 | NDR_PRINT_OUT_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, r);
|
|---|
| 794 | }
|
|---|
| 795 |
|
|---|
| 796 | push = ndr_push_init_ctx(r, NULL);
|
|---|
| 797 | if (push == NULL) {
|
|---|
| 798 | talloc_free(r);
|
|---|
| 799 | return false;
|
|---|
| 800 | }
|
|---|
| 801 |
|
|---|
| 802 | ndr_err = call->ndr_push(push, NDR_OUT, r);
|
|---|
| 803 | if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
|---|
| 804 | talloc_free(r);
|
|---|
| 805 | return false;
|
|---|
| 806 | }
|
|---|
| 807 |
|
|---|
| 808 | blob = ndr_push_blob(push);
|
|---|
| 809 | if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
|
|---|
| 810 | talloc_free(r);
|
|---|
| 811 | return false;
|
|---|
| 812 | }
|
|---|
| 813 |
|
|---|
| 814 | talloc_free(r);
|
|---|
| 815 |
|
|---|
| 816 | return true;
|
|---|
| 817 | }
|
|---|
| 818 |
|
|---|
| 819 |
|
|---|
| 820 | /* Tables */
|
|---|
| 821 | static struct api_struct api_dssetup_cmds[] =
|
|---|
| 822 | {
|
|---|
| 823 | {"DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION", NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION, api_dssetup_DsRoleGetPrimaryDomainInformation},
|
|---|
| 824 | {"DSSETUP_DSROLEDNSNAMETOFLATNAME", NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME, api_dssetup_DsRoleDnsNameToFlatName},
|
|---|
| 825 | {"DSSETUP_DSROLEDCASDC", NDR_DSSETUP_DSROLEDCASDC, api_dssetup_DsRoleDcAsDc},
|
|---|
| 826 | {"DSSETUP_DSROLEDCASREPLICA", NDR_DSSETUP_DSROLEDCASREPLICA, api_dssetup_DsRoleDcAsReplica},
|
|---|
| 827 | {"DSSETUP_DSROLEDEMOTEDC", NDR_DSSETUP_DSROLEDEMOTEDC, api_dssetup_DsRoleDemoteDc},
|
|---|
| 828 | {"DSSETUP_DSROLEGETDCOPERATIONPROGRESS", NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS, api_dssetup_DsRoleGetDcOperationProgress},
|
|---|
| 829 | {"DSSETUP_DSROLEGETDCOPERATIONRESULTS", NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS, api_dssetup_DsRoleGetDcOperationResults},
|
|---|
| 830 | {"DSSETUP_DSROLECANCEL", NDR_DSSETUP_DSROLECANCEL, api_dssetup_DsRoleCancel},
|
|---|
| 831 | {"DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE", NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE, api_dssetup_DsRoleServerSaveStateForUpgrade},
|
|---|
| 832 | {"DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER", NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER, api_dssetup_DsRoleUpgradeDownlevelServer},
|
|---|
| 833 | {"DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE", NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE, api_dssetup_DsRoleAbortDownlevelServerUpgrade},
|
|---|
| 834 | };
|
|---|
| 835 |
|
|---|
| 836 | void dssetup_get_pipe_fns(struct api_struct **fns, int *n_fns)
|
|---|
| 837 | {
|
|---|
| 838 | *fns = api_dssetup_cmds;
|
|---|
| 839 | *n_fns = sizeof(api_dssetup_cmds) / sizeof(struct api_struct);
|
|---|
| 840 | }
|
|---|
| 841 |
|
|---|
| 842 | NTSTATUS rpc_dssetup_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
|
|---|
| 843 | {
|
|---|
| 844 | if (cli->pipes_struct == NULL) {
|
|---|
| 845 | return NT_STATUS_INVALID_PARAMETER;
|
|---|
| 846 | }
|
|---|
| 847 |
|
|---|
| 848 | switch (opnum)
|
|---|
| 849 | {
|
|---|
| 850 | case NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION: {
|
|---|
| 851 | struct dssetup_DsRoleGetPrimaryDomainInformation *r = (struct dssetup_DsRoleGetPrimaryDomainInformation *)_r;
|
|---|
| 852 | ZERO_STRUCT(r->out);
|
|---|
| 853 | r->out.info = talloc_zero(mem_ctx, union dssetup_DsRoleInfo);
|
|---|
| 854 | if (r->out.info == NULL) {
|
|---|
| 855 | return NT_STATUS_NO_MEMORY;
|
|---|
| 856 | }
|
|---|
| 857 |
|
|---|
| 858 | r->out.result = _dssetup_DsRoleGetPrimaryDomainInformation(cli->pipes_struct, r);
|
|---|
| 859 | return NT_STATUS_OK;
|
|---|
| 860 | }
|
|---|
| 861 |
|
|---|
| 862 | case NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME: {
|
|---|
| 863 | struct dssetup_DsRoleDnsNameToFlatName *r = (struct dssetup_DsRoleDnsNameToFlatName *)_r;
|
|---|
| 864 | r->out.result = _dssetup_DsRoleDnsNameToFlatName(cli->pipes_struct, r);
|
|---|
| 865 | return NT_STATUS_OK;
|
|---|
| 866 | }
|
|---|
| 867 |
|
|---|
| 868 | case NDR_DSSETUP_DSROLEDCASDC: {
|
|---|
| 869 | struct dssetup_DsRoleDcAsDc *r = (struct dssetup_DsRoleDcAsDc *)_r;
|
|---|
| 870 | r->out.result = _dssetup_DsRoleDcAsDc(cli->pipes_struct, r);
|
|---|
| 871 | return NT_STATUS_OK;
|
|---|
| 872 | }
|
|---|
| 873 |
|
|---|
| 874 | case NDR_DSSETUP_DSROLEDCASREPLICA: {
|
|---|
| 875 | struct dssetup_DsRoleDcAsReplica *r = (struct dssetup_DsRoleDcAsReplica *)_r;
|
|---|
| 876 | r->out.result = _dssetup_DsRoleDcAsReplica(cli->pipes_struct, r);
|
|---|
| 877 | return NT_STATUS_OK;
|
|---|
| 878 | }
|
|---|
| 879 |
|
|---|
| 880 | case NDR_DSSETUP_DSROLEDEMOTEDC: {
|
|---|
| 881 | struct dssetup_DsRoleDemoteDc *r = (struct dssetup_DsRoleDemoteDc *)_r;
|
|---|
| 882 | r->out.result = _dssetup_DsRoleDemoteDc(cli->pipes_struct, r);
|
|---|
| 883 | return NT_STATUS_OK;
|
|---|
| 884 | }
|
|---|
| 885 |
|
|---|
| 886 | case NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS: {
|
|---|
| 887 | struct dssetup_DsRoleGetDcOperationProgress *r = (struct dssetup_DsRoleGetDcOperationProgress *)_r;
|
|---|
| 888 | r->out.result = _dssetup_DsRoleGetDcOperationProgress(cli->pipes_struct, r);
|
|---|
| 889 | return NT_STATUS_OK;
|
|---|
| 890 | }
|
|---|
| 891 |
|
|---|
| 892 | case NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS: {
|
|---|
| 893 | struct dssetup_DsRoleGetDcOperationResults *r = (struct dssetup_DsRoleGetDcOperationResults *)_r;
|
|---|
| 894 | r->out.result = _dssetup_DsRoleGetDcOperationResults(cli->pipes_struct, r);
|
|---|
| 895 | return NT_STATUS_OK;
|
|---|
| 896 | }
|
|---|
| 897 |
|
|---|
| 898 | case NDR_DSSETUP_DSROLECANCEL: {
|
|---|
| 899 | struct dssetup_DsRoleCancel *r = (struct dssetup_DsRoleCancel *)_r;
|
|---|
| 900 | r->out.result = _dssetup_DsRoleCancel(cli->pipes_struct, r);
|
|---|
| 901 | return NT_STATUS_OK;
|
|---|
| 902 | }
|
|---|
| 903 |
|
|---|
| 904 | case NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE: {
|
|---|
| 905 | struct dssetup_DsRoleServerSaveStateForUpgrade *r = (struct dssetup_DsRoleServerSaveStateForUpgrade *)_r;
|
|---|
| 906 | r->out.result = _dssetup_DsRoleServerSaveStateForUpgrade(cli->pipes_struct, r);
|
|---|
| 907 | return NT_STATUS_OK;
|
|---|
| 908 | }
|
|---|
| 909 |
|
|---|
| 910 | case NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER: {
|
|---|
| 911 | struct dssetup_DsRoleUpgradeDownlevelServer *r = (struct dssetup_DsRoleUpgradeDownlevelServer *)_r;
|
|---|
| 912 | r->out.result = _dssetup_DsRoleUpgradeDownlevelServer(cli->pipes_struct, r);
|
|---|
| 913 | return NT_STATUS_OK;
|
|---|
| 914 | }
|
|---|
| 915 |
|
|---|
| 916 | case NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE: {
|
|---|
| 917 | struct dssetup_DsRoleAbortDownlevelServerUpgrade *r = (struct dssetup_DsRoleAbortDownlevelServerUpgrade *)_r;
|
|---|
| 918 | r->out.result = _dssetup_DsRoleAbortDownlevelServerUpgrade(cli->pipes_struct, r);
|
|---|
| 919 | return NT_STATUS_OK;
|
|---|
| 920 | }
|
|---|
| 921 |
|
|---|
| 922 | default:
|
|---|
| 923 | return NT_STATUS_NOT_IMPLEMENTED;
|
|---|
| 924 | }
|
|---|
| 925 | }
|
|---|
| 926 |
|
|---|
| 927 | NTSTATUS rpc_dssetup_init(void)
|
|---|
| 928 | {
|
|---|
| 929 | return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "dssetup", "dssetup", &ndr_table_dssetup, api_dssetup_cmds, sizeof(api_dssetup_cmds) / sizeof(struct api_struct));
|
|---|
| 930 | }
|
|---|