| 1 | /*
|
|---|
| 2 | * Unix SMB/CIFS implementation.
|
|---|
| 3 | * client auto-generated by pidl. DO NOT MODIFY!
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | #include "includes.h"
|
|---|
| 7 | #include "librpc/gen_ndr/cli_netlogon.h"
|
|---|
| 8 |
|
|---|
| 9 | NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli,
|
|---|
| 10 | TALLOC_CTX *mem_ctx,
|
|---|
| 11 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 12 | const char *account_name /* [in] [charset(UTF16)] */,
|
|---|
| 13 | const char *workstation /* [in] [charset(UTF16)] */,
|
|---|
| 14 | struct netr_UasInfo *info /* [out] [ref] */,
|
|---|
| 15 | WERROR *werror)
|
|---|
| 16 | {
|
|---|
| 17 | struct netr_LogonUasLogon r;
|
|---|
| 18 | NTSTATUS status;
|
|---|
| 19 |
|
|---|
| 20 | /* In parameters */
|
|---|
| 21 | r.in.server_name = server_name;
|
|---|
| 22 | r.in.account_name = account_name;
|
|---|
| 23 | r.in.workstation = workstation;
|
|---|
| 24 |
|
|---|
| 25 | if (DEBUGLEVEL >= 10) {
|
|---|
| 26 | NDR_PRINT_IN_DEBUG(netr_LogonUasLogon, &r);
|
|---|
| 27 | }
|
|---|
| 28 |
|
|---|
| 29 | status = cli_do_rpc_ndr(cli,
|
|---|
| 30 | mem_ctx,
|
|---|
| 31 | PI_NETLOGON,
|
|---|
| 32 | &ndr_table_netlogon,
|
|---|
| 33 | NDR_NETR_LOGONUASLOGON,
|
|---|
| 34 | &r);
|
|---|
| 35 |
|
|---|
| 36 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 37 | return status;
|
|---|
| 38 | }
|
|---|
| 39 |
|
|---|
| 40 | if (DEBUGLEVEL >= 10) {
|
|---|
| 41 | NDR_PRINT_OUT_DEBUG(netr_LogonUasLogon, &r);
|
|---|
| 42 | }
|
|---|
| 43 |
|
|---|
| 44 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 45 | return status;
|
|---|
| 46 | }
|
|---|
| 47 |
|
|---|
| 48 | /* Return variables */
|
|---|
| 49 | *info = *r.out.info;
|
|---|
| 50 |
|
|---|
| 51 | /* Return result */
|
|---|
| 52 | if (werror) {
|
|---|
| 53 | *werror = r.out.result;
|
|---|
| 54 | }
|
|---|
| 55 |
|
|---|
| 56 | return werror_to_ntstatus(r.out.result);
|
|---|
| 57 | }
|
|---|
| 58 |
|
|---|
| 59 | NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli,
|
|---|
| 60 | TALLOC_CTX *mem_ctx,
|
|---|
| 61 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 62 | const char *account_name /* [in] [charset(UTF16)] */,
|
|---|
| 63 | const char *workstation /* [in] [charset(UTF16)] */,
|
|---|
| 64 | struct netr_UasLogoffInfo *info /* [out] [ref] */,
|
|---|
| 65 | WERROR *werror)
|
|---|
| 66 | {
|
|---|
| 67 | struct netr_LogonUasLogoff r;
|
|---|
| 68 | NTSTATUS status;
|
|---|
| 69 |
|
|---|
| 70 | /* In parameters */
|
|---|
| 71 | r.in.server_name = server_name;
|
|---|
| 72 | r.in.account_name = account_name;
|
|---|
| 73 | r.in.workstation = workstation;
|
|---|
| 74 |
|
|---|
| 75 | if (DEBUGLEVEL >= 10) {
|
|---|
| 76 | NDR_PRINT_IN_DEBUG(netr_LogonUasLogoff, &r);
|
|---|
| 77 | }
|
|---|
| 78 |
|
|---|
| 79 | status = cli_do_rpc_ndr(cli,
|
|---|
| 80 | mem_ctx,
|
|---|
| 81 | PI_NETLOGON,
|
|---|
| 82 | &ndr_table_netlogon,
|
|---|
| 83 | NDR_NETR_LOGONUASLOGOFF,
|
|---|
| 84 | &r);
|
|---|
| 85 |
|
|---|
| 86 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 87 | return status;
|
|---|
| 88 | }
|
|---|
| 89 |
|
|---|
| 90 | if (DEBUGLEVEL >= 10) {
|
|---|
| 91 | NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff, &r);
|
|---|
| 92 | }
|
|---|
| 93 |
|
|---|
| 94 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 95 | return status;
|
|---|
| 96 | }
|
|---|
| 97 |
|
|---|
| 98 | /* Return variables */
|
|---|
| 99 | *info = *r.out.info;
|
|---|
| 100 |
|
|---|
| 101 | /* Return result */
|
|---|
| 102 | if (werror) {
|
|---|
| 103 | *werror = r.out.result;
|
|---|
| 104 | }
|
|---|
| 105 |
|
|---|
| 106 | return werror_to_ntstatus(r.out.result);
|
|---|
| 107 | }
|
|---|
| 108 |
|
|---|
| 109 | NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli,
|
|---|
| 110 | TALLOC_CTX *mem_ctx,
|
|---|
| 111 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 112 | const char *computer_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 113 | struct netr_Authenticator *credential /* [in] [unique] */,
|
|---|
| 114 | struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
|
|---|
| 115 | enum netr_LogonLevel logon_level /* [in] */,
|
|---|
| 116 | union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */,
|
|---|
| 117 | uint16_t validation_level /* [in] */,
|
|---|
| 118 | union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
|
|---|
| 119 | uint8_t *authoritative /* [out] [ref] */)
|
|---|
| 120 | {
|
|---|
| 121 | struct netr_LogonSamLogon r;
|
|---|
| 122 | NTSTATUS status;
|
|---|
| 123 |
|
|---|
| 124 | /* In parameters */
|
|---|
| 125 | r.in.server_name = server_name;
|
|---|
| 126 | r.in.computer_name = computer_name;
|
|---|
| 127 | r.in.credential = credential;
|
|---|
| 128 | r.in.return_authenticator = return_authenticator;
|
|---|
| 129 | r.in.logon_level = logon_level;
|
|---|
| 130 | r.in.logon = logon;
|
|---|
| 131 | r.in.validation_level = validation_level;
|
|---|
| 132 |
|
|---|
| 133 | if (DEBUGLEVEL >= 10) {
|
|---|
| 134 | NDR_PRINT_IN_DEBUG(netr_LogonSamLogon, &r);
|
|---|
| 135 | }
|
|---|
| 136 |
|
|---|
| 137 | status = cli_do_rpc_ndr(cli,
|
|---|
| 138 | mem_ctx,
|
|---|
| 139 | PI_NETLOGON,
|
|---|
| 140 | &ndr_table_netlogon,
|
|---|
| 141 | NDR_NETR_LOGONSAMLOGON,
|
|---|
| 142 | &r);
|
|---|
| 143 |
|
|---|
| 144 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 145 | return status;
|
|---|
| 146 | }
|
|---|
| 147 |
|
|---|
| 148 | if (DEBUGLEVEL >= 10) {
|
|---|
| 149 | NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon, &r);
|
|---|
| 150 | }
|
|---|
| 151 |
|
|---|
| 152 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 153 | return status;
|
|---|
| 154 | }
|
|---|
| 155 |
|
|---|
| 156 | /* Return variables */
|
|---|
| 157 | if (return_authenticator && r.out.return_authenticator) {
|
|---|
| 158 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 159 | }
|
|---|
| 160 | *validation = *r.out.validation;
|
|---|
| 161 | *authoritative = *r.out.authoritative;
|
|---|
| 162 |
|
|---|
| 163 | /* Return result */
|
|---|
| 164 | return r.out.result;
|
|---|
| 165 | }
|
|---|
| 166 |
|
|---|
| 167 | NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli,
|
|---|
| 168 | TALLOC_CTX *mem_ctx,
|
|---|
| 169 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 170 | const char *computer_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 171 | struct netr_Authenticator *credential /* [in] [unique] */,
|
|---|
| 172 | struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
|
|---|
| 173 | enum netr_LogonLevel logon_level /* [in] */,
|
|---|
| 174 | union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */)
|
|---|
| 175 | {
|
|---|
| 176 | struct netr_LogonSamLogoff r;
|
|---|
| 177 | NTSTATUS status;
|
|---|
| 178 |
|
|---|
| 179 | /* In parameters */
|
|---|
| 180 | r.in.server_name = server_name;
|
|---|
| 181 | r.in.computer_name = computer_name;
|
|---|
| 182 | r.in.credential = credential;
|
|---|
| 183 | r.in.return_authenticator = return_authenticator;
|
|---|
| 184 | r.in.logon_level = logon_level;
|
|---|
| 185 | r.in.logon = logon;
|
|---|
| 186 |
|
|---|
| 187 | if (DEBUGLEVEL >= 10) {
|
|---|
| 188 | NDR_PRINT_IN_DEBUG(netr_LogonSamLogoff, &r);
|
|---|
| 189 | }
|
|---|
| 190 |
|
|---|
| 191 | status = cli_do_rpc_ndr(cli,
|
|---|
| 192 | mem_ctx,
|
|---|
| 193 | PI_NETLOGON,
|
|---|
| 194 | &ndr_table_netlogon,
|
|---|
| 195 | NDR_NETR_LOGONSAMLOGOFF,
|
|---|
| 196 | &r);
|
|---|
| 197 |
|
|---|
| 198 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 199 | return status;
|
|---|
| 200 | }
|
|---|
| 201 |
|
|---|
| 202 | if (DEBUGLEVEL >= 10) {
|
|---|
| 203 | NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff, &r);
|
|---|
| 204 | }
|
|---|
| 205 |
|
|---|
| 206 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 207 | return status;
|
|---|
| 208 | }
|
|---|
| 209 |
|
|---|
| 210 | /* Return variables */
|
|---|
| 211 | if (return_authenticator && r.out.return_authenticator) {
|
|---|
| 212 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 213 | }
|
|---|
| 214 |
|
|---|
| 215 | /* Return result */
|
|---|
| 216 | return r.out.result;
|
|---|
| 217 | }
|
|---|
| 218 |
|
|---|
| 219 | NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli,
|
|---|
| 220 | TALLOC_CTX *mem_ctx,
|
|---|
| 221 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 222 | const char *computer_name /* [in] [charset(UTF16)] */,
|
|---|
| 223 | struct netr_Credential *credentials /* [in] [ref] */,
|
|---|
| 224 | struct netr_Credential *return_credentials /* [out] [ref] */)
|
|---|
| 225 | {
|
|---|
| 226 | struct netr_ServerReqChallenge r;
|
|---|
| 227 | NTSTATUS status;
|
|---|
| 228 |
|
|---|
| 229 | /* In parameters */
|
|---|
| 230 | r.in.server_name = server_name;
|
|---|
| 231 | r.in.computer_name = computer_name;
|
|---|
| 232 | r.in.credentials = credentials;
|
|---|
| 233 |
|
|---|
| 234 | if (DEBUGLEVEL >= 10) {
|
|---|
| 235 | NDR_PRINT_IN_DEBUG(netr_ServerReqChallenge, &r);
|
|---|
| 236 | }
|
|---|
| 237 |
|
|---|
| 238 | status = cli_do_rpc_ndr(cli,
|
|---|
| 239 | mem_ctx,
|
|---|
| 240 | PI_NETLOGON,
|
|---|
| 241 | &ndr_table_netlogon,
|
|---|
| 242 | NDR_NETR_SERVERREQCHALLENGE,
|
|---|
| 243 | &r);
|
|---|
| 244 |
|
|---|
| 245 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 246 | return status;
|
|---|
| 247 | }
|
|---|
| 248 |
|
|---|
| 249 | if (DEBUGLEVEL >= 10) {
|
|---|
| 250 | NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge, &r);
|
|---|
| 251 | }
|
|---|
| 252 |
|
|---|
| 253 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 254 | return status;
|
|---|
| 255 | }
|
|---|
| 256 |
|
|---|
| 257 | /* Return variables */
|
|---|
| 258 | *return_credentials = *r.out.return_credentials;
|
|---|
| 259 |
|
|---|
| 260 | /* Return result */
|
|---|
| 261 | return r.out.result;
|
|---|
| 262 | }
|
|---|
| 263 |
|
|---|
| 264 | NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli,
|
|---|
| 265 | TALLOC_CTX *mem_ctx,
|
|---|
| 266 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 267 | const char *account_name /* [in] [charset(UTF16)] */,
|
|---|
| 268 | enum netr_SchannelType secure_channel_type /* [in] */,
|
|---|
| 269 | const char *computer_name /* [in] [charset(UTF16)] */,
|
|---|
| 270 | struct netr_Credential *credentials /* [in] [ref] */,
|
|---|
| 271 | struct netr_Credential *return_credentials /* [out] [ref] */)
|
|---|
| 272 | {
|
|---|
| 273 | struct netr_ServerAuthenticate r;
|
|---|
| 274 | NTSTATUS status;
|
|---|
| 275 |
|
|---|
| 276 | /* In parameters */
|
|---|
| 277 | r.in.server_name = server_name;
|
|---|
| 278 | r.in.account_name = account_name;
|
|---|
| 279 | r.in.secure_channel_type = secure_channel_type;
|
|---|
| 280 | r.in.computer_name = computer_name;
|
|---|
| 281 | r.in.credentials = credentials;
|
|---|
| 282 |
|
|---|
| 283 | if (DEBUGLEVEL >= 10) {
|
|---|
| 284 | NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate, &r);
|
|---|
| 285 | }
|
|---|
| 286 |
|
|---|
| 287 | status = cli_do_rpc_ndr(cli,
|
|---|
| 288 | mem_ctx,
|
|---|
| 289 | PI_NETLOGON,
|
|---|
| 290 | &ndr_table_netlogon,
|
|---|
| 291 | NDR_NETR_SERVERAUTHENTICATE,
|
|---|
| 292 | &r);
|
|---|
| 293 |
|
|---|
| 294 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 295 | return status;
|
|---|
| 296 | }
|
|---|
| 297 |
|
|---|
| 298 | if (DEBUGLEVEL >= 10) {
|
|---|
| 299 | NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate, &r);
|
|---|
| 300 | }
|
|---|
| 301 |
|
|---|
| 302 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 303 | return status;
|
|---|
| 304 | }
|
|---|
| 305 |
|
|---|
| 306 | /* Return variables */
|
|---|
| 307 | *return_credentials = *r.out.return_credentials;
|
|---|
| 308 |
|
|---|
| 309 | /* Return result */
|
|---|
| 310 | return r.out.result;
|
|---|
| 311 | }
|
|---|
| 312 |
|
|---|
| 313 | NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli,
|
|---|
| 314 | TALLOC_CTX *mem_ctx,
|
|---|
| 315 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 316 | const char *account_name /* [in] [charset(UTF16)] */,
|
|---|
| 317 | enum netr_SchannelType secure_channel_type /* [in] */,
|
|---|
| 318 | const char *computer_name /* [in] [charset(UTF16)] */,
|
|---|
| 319 | struct netr_Authenticator *credential /* [in] [ref] */,
|
|---|
| 320 | struct netr_Authenticator *return_authenticator /* [out] [ref] */,
|
|---|
| 321 | struct samr_Password *new_password /* [in] [ref] */)
|
|---|
| 322 | {
|
|---|
| 323 | struct netr_ServerPasswordSet r;
|
|---|
| 324 | NTSTATUS status;
|
|---|
| 325 |
|
|---|
| 326 | /* In parameters */
|
|---|
| 327 | r.in.server_name = server_name;
|
|---|
| 328 | r.in.account_name = account_name;
|
|---|
| 329 | r.in.secure_channel_type = secure_channel_type;
|
|---|
| 330 | r.in.computer_name = computer_name;
|
|---|
| 331 | r.in.credential = credential;
|
|---|
| 332 | r.in.new_password = new_password;
|
|---|
| 333 |
|
|---|
| 334 | if (DEBUGLEVEL >= 10) {
|
|---|
| 335 | NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet, &r);
|
|---|
| 336 | }
|
|---|
| 337 |
|
|---|
| 338 | status = cli_do_rpc_ndr(cli,
|
|---|
| 339 | mem_ctx,
|
|---|
| 340 | PI_NETLOGON,
|
|---|
| 341 | &ndr_table_netlogon,
|
|---|
| 342 | NDR_NETR_SERVERPASSWORDSET,
|
|---|
| 343 | &r);
|
|---|
| 344 |
|
|---|
| 345 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 346 | return status;
|
|---|
| 347 | }
|
|---|
| 348 |
|
|---|
| 349 | if (DEBUGLEVEL >= 10) {
|
|---|
| 350 | NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet, &r);
|
|---|
| 351 | }
|
|---|
| 352 |
|
|---|
| 353 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 354 | return status;
|
|---|
| 355 | }
|
|---|
| 356 |
|
|---|
| 357 | /* Return variables */
|
|---|
| 358 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 359 |
|
|---|
| 360 | /* Return result */
|
|---|
| 361 | return r.out.result;
|
|---|
| 362 | }
|
|---|
| 363 |
|
|---|
| 364 | NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli,
|
|---|
| 365 | TALLOC_CTX *mem_ctx,
|
|---|
| 366 | const char *logon_server /* [in] [charset(UTF16)] */,
|
|---|
| 367 | const char *computername /* [in] [charset(UTF16)] */,
|
|---|
| 368 | struct netr_Authenticator *credential /* [in] [ref] */,
|
|---|
| 369 | struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
|
|---|
| 370 | enum netr_SamDatabaseID database_id /* [in] */,
|
|---|
| 371 | uint64_t *sequence_num /* [in,out] [ref] */,
|
|---|
| 372 | struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */,
|
|---|
| 373 | uint32_t preferredmaximumlength /* [in] */)
|
|---|
| 374 | {
|
|---|
| 375 | struct netr_DatabaseDeltas r;
|
|---|
| 376 | NTSTATUS status;
|
|---|
| 377 |
|
|---|
| 378 | /* In parameters */
|
|---|
| 379 | r.in.logon_server = logon_server;
|
|---|
| 380 | r.in.computername = computername;
|
|---|
| 381 | r.in.credential = credential;
|
|---|
| 382 | r.in.return_authenticator = return_authenticator;
|
|---|
| 383 | r.in.database_id = database_id;
|
|---|
| 384 | r.in.sequence_num = sequence_num;
|
|---|
| 385 | r.in.preferredmaximumlength = preferredmaximumlength;
|
|---|
| 386 |
|
|---|
| 387 | if (DEBUGLEVEL >= 10) {
|
|---|
| 388 | NDR_PRINT_IN_DEBUG(netr_DatabaseDeltas, &r);
|
|---|
| 389 | }
|
|---|
| 390 |
|
|---|
| 391 | status = cli_do_rpc_ndr(cli,
|
|---|
| 392 | mem_ctx,
|
|---|
| 393 | PI_NETLOGON,
|
|---|
| 394 | &ndr_table_netlogon,
|
|---|
| 395 | NDR_NETR_DATABASEDELTAS,
|
|---|
| 396 | &r);
|
|---|
| 397 |
|
|---|
| 398 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 399 | return status;
|
|---|
| 400 | }
|
|---|
| 401 |
|
|---|
| 402 | if (DEBUGLEVEL >= 10) {
|
|---|
| 403 | NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas, &r);
|
|---|
| 404 | }
|
|---|
| 405 |
|
|---|
| 406 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 407 | return status;
|
|---|
| 408 | }
|
|---|
| 409 |
|
|---|
| 410 | /* Return variables */
|
|---|
| 411 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 412 | *sequence_num = *r.out.sequence_num;
|
|---|
| 413 | *delta_enum_array = *r.out.delta_enum_array;
|
|---|
| 414 |
|
|---|
| 415 | /* Return result */
|
|---|
| 416 | return r.out.result;
|
|---|
| 417 | }
|
|---|
| 418 |
|
|---|
| 419 | NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli,
|
|---|
| 420 | TALLOC_CTX *mem_ctx,
|
|---|
| 421 | const char *logon_server /* [in] [charset(UTF16)] */,
|
|---|
| 422 | const char *computername /* [in] [charset(UTF16)] */,
|
|---|
| 423 | struct netr_Authenticator credential /* [in] */,
|
|---|
| 424 | struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
|
|---|
| 425 | enum netr_SamDatabaseID database_id /* [in] */,
|
|---|
| 426 | uint32_t *sync_context /* [in,out] [ref] */,
|
|---|
| 427 | uint32_t preferredmaximumlength /* [in] */,
|
|---|
| 428 | struct netr_DELTA_ENUM_ARRAY *delta_enum_array /* [out] [ref] */)
|
|---|
| 429 | {
|
|---|
| 430 | struct netr_DatabaseSync r;
|
|---|
| 431 | NTSTATUS status;
|
|---|
| 432 |
|
|---|
| 433 | /* In parameters */
|
|---|
| 434 | r.in.logon_server = logon_server;
|
|---|
| 435 | r.in.computername = computername;
|
|---|
| 436 | r.in.credential = credential;
|
|---|
| 437 | r.in.return_authenticator = return_authenticator;
|
|---|
| 438 | r.in.database_id = database_id;
|
|---|
| 439 | r.in.sync_context = sync_context;
|
|---|
| 440 | r.in.preferredmaximumlength = preferredmaximumlength;
|
|---|
| 441 |
|
|---|
| 442 | if (DEBUGLEVEL >= 10) {
|
|---|
| 443 | NDR_PRINT_IN_DEBUG(netr_DatabaseSync, &r);
|
|---|
| 444 | }
|
|---|
| 445 |
|
|---|
| 446 | status = cli_do_rpc_ndr(cli,
|
|---|
| 447 | mem_ctx,
|
|---|
| 448 | PI_NETLOGON,
|
|---|
| 449 | &ndr_table_netlogon,
|
|---|
| 450 | NDR_NETR_DATABASESYNC,
|
|---|
| 451 | &r);
|
|---|
| 452 |
|
|---|
| 453 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 454 | return status;
|
|---|
| 455 | }
|
|---|
| 456 |
|
|---|
| 457 | if (DEBUGLEVEL >= 10) {
|
|---|
| 458 | NDR_PRINT_OUT_DEBUG(netr_DatabaseSync, &r);
|
|---|
| 459 | }
|
|---|
| 460 |
|
|---|
| 461 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 462 | return status;
|
|---|
| 463 | }
|
|---|
| 464 |
|
|---|
| 465 | /* Return variables */
|
|---|
| 466 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 467 | *sync_context = *r.out.sync_context;
|
|---|
| 468 | *delta_enum_array = *r.out.delta_enum_array;
|
|---|
| 469 |
|
|---|
| 470 | /* Return result */
|
|---|
| 471 | return r.out.result;
|
|---|
| 472 | }
|
|---|
| 473 |
|
|---|
| 474 | NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli,
|
|---|
| 475 | TALLOC_CTX *mem_ctx,
|
|---|
| 476 | const char *logon_server /* [in] [unique,charset(UTF16)] */,
|
|---|
| 477 | const char *computername /* [in] [charset(UTF16)] */,
|
|---|
| 478 | struct netr_Authenticator credential /* [in] */,
|
|---|
| 479 | struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
|
|---|
| 480 | struct netr_UAS_INFO_0 uas /* [in] */,
|
|---|
| 481 | uint32_t count /* [in] */,
|
|---|
| 482 | uint32_t level /* [in] */,
|
|---|
| 483 | uint32_t buffersize /* [in] */,
|
|---|
| 484 | struct netr_AccountBuffer *buffer /* [out] [ref,subcontext(4)] */,
|
|---|
| 485 | uint32_t *count_returned /* [out] [ref] */,
|
|---|
| 486 | uint32_t *total_entries /* [out] [ref] */,
|
|---|
| 487 | struct netr_UAS_INFO_0 *recordid /* [out] [ref] */)
|
|---|
| 488 | {
|
|---|
| 489 | struct netr_AccountDeltas r;
|
|---|
| 490 | NTSTATUS status;
|
|---|
| 491 |
|
|---|
| 492 | /* In parameters */
|
|---|
| 493 | r.in.logon_server = logon_server;
|
|---|
| 494 | r.in.computername = computername;
|
|---|
| 495 | r.in.credential = credential;
|
|---|
| 496 | r.in.return_authenticator = return_authenticator;
|
|---|
| 497 | r.in.uas = uas;
|
|---|
| 498 | r.in.count = count;
|
|---|
| 499 | r.in.level = level;
|
|---|
| 500 | r.in.buffersize = buffersize;
|
|---|
| 501 |
|
|---|
| 502 | if (DEBUGLEVEL >= 10) {
|
|---|
| 503 | NDR_PRINT_IN_DEBUG(netr_AccountDeltas, &r);
|
|---|
| 504 | }
|
|---|
| 505 |
|
|---|
| 506 | status = cli_do_rpc_ndr(cli,
|
|---|
| 507 | mem_ctx,
|
|---|
| 508 | PI_NETLOGON,
|
|---|
| 509 | &ndr_table_netlogon,
|
|---|
| 510 | NDR_NETR_ACCOUNTDELTAS,
|
|---|
| 511 | &r);
|
|---|
| 512 |
|
|---|
| 513 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 514 | return status;
|
|---|
| 515 | }
|
|---|
| 516 |
|
|---|
| 517 | if (DEBUGLEVEL >= 10) {
|
|---|
| 518 | NDR_PRINT_OUT_DEBUG(netr_AccountDeltas, &r);
|
|---|
| 519 | }
|
|---|
| 520 |
|
|---|
| 521 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 522 | return status;
|
|---|
| 523 | }
|
|---|
| 524 |
|
|---|
| 525 | /* Return variables */
|
|---|
| 526 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 527 | *buffer = *r.out.buffer;
|
|---|
| 528 | *count_returned = *r.out.count_returned;
|
|---|
| 529 | *total_entries = *r.out.total_entries;
|
|---|
| 530 | *recordid = *r.out.recordid;
|
|---|
| 531 |
|
|---|
| 532 | /* Return result */
|
|---|
| 533 | return r.out.result;
|
|---|
| 534 | }
|
|---|
| 535 |
|
|---|
| 536 | NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli,
|
|---|
| 537 | TALLOC_CTX *mem_ctx,
|
|---|
| 538 | const char *logon_server /* [in] [unique,charset(UTF16)] */,
|
|---|
| 539 | const char *computername /* [in] [charset(UTF16)] */,
|
|---|
| 540 | struct netr_Authenticator credential /* [in] */,
|
|---|
| 541 | struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
|
|---|
| 542 | uint32_t reference /* [in] */,
|
|---|
| 543 | uint32_t level /* [in] */,
|
|---|
| 544 | uint32_t buffersize /* [in] */,
|
|---|
| 545 | struct netr_AccountBuffer *buffer /* [out] [ref,subcontext(4)] */,
|
|---|
| 546 | uint32_t *count_returned /* [out] [ref] */,
|
|---|
| 547 | uint32_t *total_entries /* [out] [ref] */,
|
|---|
| 548 | uint32_t *next_reference /* [out] [ref] */,
|
|---|
| 549 | struct netr_UAS_INFO_0 *recordid /* [in,out] [ref] */)
|
|---|
| 550 | {
|
|---|
| 551 | struct netr_AccountSync r;
|
|---|
| 552 | NTSTATUS status;
|
|---|
| 553 |
|
|---|
| 554 | /* In parameters */
|
|---|
| 555 | r.in.logon_server = logon_server;
|
|---|
| 556 | r.in.computername = computername;
|
|---|
| 557 | r.in.credential = credential;
|
|---|
| 558 | r.in.return_authenticator = return_authenticator;
|
|---|
| 559 | r.in.reference = reference;
|
|---|
| 560 | r.in.level = level;
|
|---|
| 561 | r.in.buffersize = buffersize;
|
|---|
| 562 | r.in.recordid = recordid;
|
|---|
| 563 |
|
|---|
| 564 | if (DEBUGLEVEL >= 10) {
|
|---|
| 565 | NDR_PRINT_IN_DEBUG(netr_AccountSync, &r);
|
|---|
| 566 | }
|
|---|
| 567 |
|
|---|
| 568 | status = cli_do_rpc_ndr(cli,
|
|---|
| 569 | mem_ctx,
|
|---|
| 570 | PI_NETLOGON,
|
|---|
| 571 | &ndr_table_netlogon,
|
|---|
| 572 | NDR_NETR_ACCOUNTSYNC,
|
|---|
| 573 | &r);
|
|---|
| 574 |
|
|---|
| 575 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 576 | return status;
|
|---|
| 577 | }
|
|---|
| 578 |
|
|---|
| 579 | if (DEBUGLEVEL >= 10) {
|
|---|
| 580 | NDR_PRINT_OUT_DEBUG(netr_AccountSync, &r);
|
|---|
| 581 | }
|
|---|
| 582 |
|
|---|
| 583 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 584 | return status;
|
|---|
| 585 | }
|
|---|
| 586 |
|
|---|
| 587 | /* Return variables */
|
|---|
| 588 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 589 | *buffer = *r.out.buffer;
|
|---|
| 590 | *count_returned = *r.out.count_returned;
|
|---|
| 591 | *total_entries = *r.out.total_entries;
|
|---|
| 592 | *next_reference = *r.out.next_reference;
|
|---|
| 593 | *recordid = *r.out.recordid;
|
|---|
| 594 |
|
|---|
| 595 | /* Return result */
|
|---|
| 596 | return r.out.result;
|
|---|
| 597 | }
|
|---|
| 598 |
|
|---|
| 599 | NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli,
|
|---|
| 600 | TALLOC_CTX *mem_ctx,
|
|---|
| 601 | const char *logon_server /* [in] [charset(UTF16)] */,
|
|---|
| 602 | const char *domainname /* [in] [unique,charset(UTF16)] */,
|
|---|
| 603 | const char **dcname /* [out] [ref,charset(UTF16)] */,
|
|---|
| 604 | WERROR *werror)
|
|---|
| 605 | {
|
|---|
| 606 | struct netr_GetDcName r;
|
|---|
| 607 | NTSTATUS status;
|
|---|
| 608 |
|
|---|
| 609 | /* In parameters */
|
|---|
| 610 | r.in.logon_server = logon_server;
|
|---|
| 611 | r.in.domainname = domainname;
|
|---|
| 612 |
|
|---|
| 613 | if (DEBUGLEVEL >= 10) {
|
|---|
| 614 | NDR_PRINT_IN_DEBUG(netr_GetDcName, &r);
|
|---|
| 615 | }
|
|---|
| 616 |
|
|---|
| 617 | status = cli_do_rpc_ndr(cli,
|
|---|
| 618 | mem_ctx,
|
|---|
| 619 | PI_NETLOGON,
|
|---|
| 620 | &ndr_table_netlogon,
|
|---|
| 621 | NDR_NETR_GETDCNAME,
|
|---|
| 622 | &r);
|
|---|
| 623 |
|
|---|
| 624 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 625 | return status;
|
|---|
| 626 | }
|
|---|
| 627 |
|
|---|
| 628 | if (DEBUGLEVEL >= 10) {
|
|---|
| 629 | NDR_PRINT_OUT_DEBUG(netr_GetDcName, &r);
|
|---|
| 630 | }
|
|---|
| 631 |
|
|---|
| 632 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 633 | return status;
|
|---|
| 634 | }
|
|---|
| 635 |
|
|---|
| 636 | /* Return variables */
|
|---|
| 637 | *dcname = *r.out.dcname;
|
|---|
| 638 |
|
|---|
| 639 | /* Return result */
|
|---|
| 640 | if (werror) {
|
|---|
| 641 | *werror = r.out.result;
|
|---|
| 642 | }
|
|---|
| 643 |
|
|---|
| 644 | return werror_to_ntstatus(r.out.result);
|
|---|
| 645 | }
|
|---|
| 646 |
|
|---|
| 647 | NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli,
|
|---|
| 648 | TALLOC_CTX *mem_ctx,
|
|---|
| 649 | const char *logon_server /* [in] [unique,charset(UTF16)] */,
|
|---|
| 650 | enum netr_LogonControlCode function_code /* [in] */,
|
|---|
| 651 | uint32_t level /* [in] */,
|
|---|
| 652 | union netr_CONTROL_QUERY_INFORMATION *info /* [out] [ref,switch_is(level)] */,
|
|---|
| 653 | WERROR *werror)
|
|---|
| 654 | {
|
|---|
| 655 | struct netr_LogonControl r;
|
|---|
| 656 | NTSTATUS status;
|
|---|
| 657 |
|
|---|
| 658 | /* In parameters */
|
|---|
| 659 | r.in.logon_server = logon_server;
|
|---|
| 660 | r.in.function_code = function_code;
|
|---|
| 661 | r.in.level = level;
|
|---|
| 662 |
|
|---|
| 663 | if (DEBUGLEVEL >= 10) {
|
|---|
| 664 | NDR_PRINT_IN_DEBUG(netr_LogonControl, &r);
|
|---|
| 665 | }
|
|---|
| 666 |
|
|---|
| 667 | status = cli_do_rpc_ndr(cli,
|
|---|
| 668 | mem_ctx,
|
|---|
| 669 | PI_NETLOGON,
|
|---|
| 670 | &ndr_table_netlogon,
|
|---|
| 671 | NDR_NETR_LOGONCONTROL,
|
|---|
| 672 | &r);
|
|---|
| 673 |
|
|---|
| 674 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 675 | return status;
|
|---|
| 676 | }
|
|---|
| 677 |
|
|---|
| 678 | if (DEBUGLEVEL >= 10) {
|
|---|
| 679 | NDR_PRINT_OUT_DEBUG(netr_LogonControl, &r);
|
|---|
| 680 | }
|
|---|
| 681 |
|
|---|
| 682 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 683 | return status;
|
|---|
| 684 | }
|
|---|
| 685 |
|
|---|
| 686 | /* Return variables */
|
|---|
| 687 | *info = *r.out.info;
|
|---|
| 688 |
|
|---|
| 689 | /* Return result */
|
|---|
| 690 | if (werror) {
|
|---|
| 691 | *werror = r.out.result;
|
|---|
| 692 | }
|
|---|
| 693 |
|
|---|
| 694 | return werror_to_ntstatus(r.out.result);
|
|---|
| 695 | }
|
|---|
| 696 |
|
|---|
| 697 | NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli,
|
|---|
| 698 | TALLOC_CTX *mem_ctx,
|
|---|
| 699 | const char *logon_server /* [in] [unique,charset(UTF16)] */,
|
|---|
| 700 | const char *domainname /* [in] [unique,charset(UTF16)] */,
|
|---|
| 701 | const char **dcname /* [out] [ref,charset(UTF16)] */,
|
|---|
| 702 | WERROR *werror)
|
|---|
| 703 | {
|
|---|
| 704 | struct netr_GetAnyDCName r;
|
|---|
| 705 | NTSTATUS status;
|
|---|
| 706 |
|
|---|
| 707 | /* In parameters */
|
|---|
| 708 | r.in.logon_server = logon_server;
|
|---|
| 709 | r.in.domainname = domainname;
|
|---|
| 710 |
|
|---|
| 711 | if (DEBUGLEVEL >= 10) {
|
|---|
| 712 | NDR_PRINT_IN_DEBUG(netr_GetAnyDCName, &r);
|
|---|
| 713 | }
|
|---|
| 714 |
|
|---|
| 715 | status = cli_do_rpc_ndr(cli,
|
|---|
| 716 | mem_ctx,
|
|---|
| 717 | PI_NETLOGON,
|
|---|
| 718 | &ndr_table_netlogon,
|
|---|
| 719 | NDR_NETR_GETANYDCNAME,
|
|---|
| 720 | &r);
|
|---|
| 721 |
|
|---|
| 722 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 723 | return status;
|
|---|
| 724 | }
|
|---|
| 725 |
|
|---|
| 726 | if (DEBUGLEVEL >= 10) {
|
|---|
| 727 | NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, &r);
|
|---|
| 728 | }
|
|---|
| 729 |
|
|---|
| 730 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 731 | return status;
|
|---|
| 732 | }
|
|---|
| 733 |
|
|---|
| 734 | /* Return variables */
|
|---|
| 735 | *dcname = *r.out.dcname;
|
|---|
| 736 |
|
|---|
| 737 | /* Return result */
|
|---|
| 738 | if (werror) {
|
|---|
| 739 | *werror = r.out.result;
|
|---|
| 740 | }
|
|---|
| 741 |
|
|---|
| 742 | return werror_to_ntstatus(r.out.result);
|
|---|
| 743 | }
|
|---|
| 744 |
|
|---|
| 745 | NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli,
|
|---|
| 746 | TALLOC_CTX *mem_ctx,
|
|---|
| 747 | const char *logon_server /* [in] [unique,charset(UTF16)] */,
|
|---|
| 748 | enum netr_LogonControlCode function_code /* [in] */,
|
|---|
| 749 | uint32_t level /* [in] */,
|
|---|
| 750 | union netr_CONTROL_DATA_INFORMATION *data /* [in] [ref,switch_is(function_code)] */,
|
|---|
| 751 | union netr_CONTROL_QUERY_INFORMATION *query /* [out] [ref,switch_is(level)] */,
|
|---|
| 752 | WERROR *werror)
|
|---|
| 753 | {
|
|---|
| 754 | struct netr_LogonControl2 r;
|
|---|
| 755 | NTSTATUS status;
|
|---|
| 756 |
|
|---|
| 757 | /* In parameters */
|
|---|
| 758 | r.in.logon_server = logon_server;
|
|---|
| 759 | r.in.function_code = function_code;
|
|---|
| 760 | r.in.level = level;
|
|---|
| 761 | r.in.data = data;
|
|---|
| 762 |
|
|---|
| 763 | if (DEBUGLEVEL >= 10) {
|
|---|
| 764 | NDR_PRINT_IN_DEBUG(netr_LogonControl2, &r);
|
|---|
| 765 | }
|
|---|
| 766 |
|
|---|
| 767 | status = cli_do_rpc_ndr(cli,
|
|---|
| 768 | mem_ctx,
|
|---|
| 769 | PI_NETLOGON,
|
|---|
| 770 | &ndr_table_netlogon,
|
|---|
| 771 | NDR_NETR_LOGONCONTROL2,
|
|---|
| 772 | &r);
|
|---|
| 773 |
|
|---|
| 774 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 775 | return status;
|
|---|
| 776 | }
|
|---|
| 777 |
|
|---|
| 778 | if (DEBUGLEVEL >= 10) {
|
|---|
| 779 | NDR_PRINT_OUT_DEBUG(netr_LogonControl2, &r);
|
|---|
| 780 | }
|
|---|
| 781 |
|
|---|
| 782 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 783 | return status;
|
|---|
| 784 | }
|
|---|
| 785 |
|
|---|
| 786 | /* Return variables */
|
|---|
| 787 | *query = *r.out.query;
|
|---|
| 788 |
|
|---|
| 789 | /* Return result */
|
|---|
| 790 | if (werror) {
|
|---|
| 791 | *werror = r.out.result;
|
|---|
| 792 | }
|
|---|
| 793 |
|
|---|
| 794 | return werror_to_ntstatus(r.out.result);
|
|---|
| 795 | }
|
|---|
| 796 |
|
|---|
| 797 | NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli,
|
|---|
| 798 | TALLOC_CTX *mem_ctx,
|
|---|
| 799 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 800 | const char *account_name /* [in] [charset(UTF16)] */,
|
|---|
| 801 | enum netr_SchannelType secure_channel_type /* [in] */,
|
|---|
| 802 | const char *computer_name /* [in] [charset(UTF16)] */,
|
|---|
| 803 | struct netr_Credential *credentials /* [in] [ref] */,
|
|---|
| 804 | struct netr_Credential *return_credentials /* [out] [ref] */,
|
|---|
| 805 | uint32_t *negotiate_flags /* [in,out] [ref] */)
|
|---|
| 806 | {
|
|---|
| 807 | struct netr_ServerAuthenticate2 r;
|
|---|
| 808 | NTSTATUS status;
|
|---|
| 809 |
|
|---|
| 810 | /* In parameters */
|
|---|
| 811 | r.in.server_name = server_name;
|
|---|
| 812 | r.in.account_name = account_name;
|
|---|
| 813 | r.in.secure_channel_type = secure_channel_type;
|
|---|
| 814 | r.in.computer_name = computer_name;
|
|---|
| 815 | r.in.credentials = credentials;
|
|---|
| 816 | r.in.negotiate_flags = negotiate_flags;
|
|---|
| 817 |
|
|---|
| 818 | if (DEBUGLEVEL >= 10) {
|
|---|
| 819 | NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate2, &r);
|
|---|
| 820 | }
|
|---|
| 821 |
|
|---|
| 822 | status = cli_do_rpc_ndr(cli,
|
|---|
| 823 | mem_ctx,
|
|---|
| 824 | PI_NETLOGON,
|
|---|
| 825 | &ndr_table_netlogon,
|
|---|
| 826 | NDR_NETR_SERVERAUTHENTICATE2,
|
|---|
| 827 | &r);
|
|---|
| 828 |
|
|---|
| 829 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 830 | return status;
|
|---|
| 831 | }
|
|---|
| 832 |
|
|---|
| 833 | if (DEBUGLEVEL >= 10) {
|
|---|
| 834 | NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, &r);
|
|---|
| 835 | }
|
|---|
| 836 |
|
|---|
| 837 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 838 | return status;
|
|---|
| 839 | }
|
|---|
| 840 |
|
|---|
| 841 | /* Return variables */
|
|---|
| 842 | *return_credentials = *r.out.return_credentials;
|
|---|
| 843 | *negotiate_flags = *r.out.negotiate_flags;
|
|---|
| 844 |
|
|---|
| 845 | /* Return result */
|
|---|
| 846 | return r.out.result;
|
|---|
| 847 | }
|
|---|
| 848 |
|
|---|
| 849 | NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli,
|
|---|
| 850 | TALLOC_CTX *mem_ctx,
|
|---|
| 851 | const char *logon_server /* [in] [charset(UTF16)] */,
|
|---|
| 852 | const char *computername /* [in] [charset(UTF16)] */,
|
|---|
| 853 | struct netr_Authenticator *credential /* [in] [ref] */,
|
|---|
| 854 | struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
|
|---|
| 855 | enum netr_SamDatabaseID database_id /* [in] */,
|
|---|
| 856 | uint16_t restart_state /* [in] */,
|
|---|
| 857 | uint32_t *sync_context /* [in,out] [ref] */,
|
|---|
| 858 | struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */,
|
|---|
| 859 | uint32_t preferredmaximumlength /* [in] */)
|
|---|
| 860 | {
|
|---|
| 861 | struct netr_DatabaseSync2 r;
|
|---|
| 862 | NTSTATUS status;
|
|---|
| 863 |
|
|---|
| 864 | /* In parameters */
|
|---|
| 865 | r.in.logon_server = logon_server;
|
|---|
| 866 | r.in.computername = computername;
|
|---|
| 867 | r.in.credential = credential;
|
|---|
| 868 | r.in.return_authenticator = return_authenticator;
|
|---|
| 869 | r.in.database_id = database_id;
|
|---|
| 870 | r.in.restart_state = restart_state;
|
|---|
| 871 | r.in.sync_context = sync_context;
|
|---|
| 872 | r.in.preferredmaximumlength = preferredmaximumlength;
|
|---|
| 873 |
|
|---|
| 874 | if (DEBUGLEVEL >= 10) {
|
|---|
| 875 | NDR_PRINT_IN_DEBUG(netr_DatabaseSync2, &r);
|
|---|
| 876 | }
|
|---|
| 877 |
|
|---|
| 878 | status = cli_do_rpc_ndr(cli,
|
|---|
| 879 | mem_ctx,
|
|---|
| 880 | PI_NETLOGON,
|
|---|
| 881 | &ndr_table_netlogon,
|
|---|
| 882 | NDR_NETR_DATABASESYNC2,
|
|---|
| 883 | &r);
|
|---|
| 884 |
|
|---|
| 885 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 886 | return status;
|
|---|
| 887 | }
|
|---|
| 888 |
|
|---|
| 889 | if (DEBUGLEVEL >= 10) {
|
|---|
| 890 | NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, &r);
|
|---|
| 891 | }
|
|---|
| 892 |
|
|---|
| 893 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 894 | return status;
|
|---|
| 895 | }
|
|---|
| 896 |
|
|---|
| 897 | /* Return variables */
|
|---|
| 898 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 899 | *sync_context = *r.out.sync_context;
|
|---|
| 900 | *delta_enum_array = *r.out.delta_enum_array;
|
|---|
| 901 |
|
|---|
| 902 | /* Return result */
|
|---|
| 903 | return r.out.result;
|
|---|
| 904 | }
|
|---|
| 905 |
|
|---|
| 906 | NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
|
|---|
| 907 | TALLOC_CTX *mem_ctx,
|
|---|
| 908 | const char *logon_server /* [in] [charset(UTF16)] */,
|
|---|
| 909 | const char *computername /* [in] [charset(UTF16)] */,
|
|---|
| 910 | struct netr_Authenticator credential /* [in] */,
|
|---|
| 911 | struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
|
|---|
| 912 | uint8_t *change_log_entry /* [in] [unique,size_is(change_log_entry_size)] */,
|
|---|
| 913 | uint32_t change_log_entry_size /* [in] */,
|
|---|
| 914 | struct netr_DELTA_ENUM_ARRAY *delta_enum_array /* [out] [ref] */)
|
|---|
| 915 | {
|
|---|
| 916 | struct netr_DatabaseRedo r;
|
|---|
| 917 | NTSTATUS status;
|
|---|
| 918 |
|
|---|
| 919 | /* In parameters */
|
|---|
| 920 | r.in.logon_server = logon_server;
|
|---|
| 921 | r.in.computername = computername;
|
|---|
| 922 | r.in.credential = credential;
|
|---|
| 923 | r.in.return_authenticator = return_authenticator;
|
|---|
| 924 | r.in.change_log_entry = change_log_entry;
|
|---|
| 925 | r.in.change_log_entry_size = change_log_entry_size;
|
|---|
| 926 |
|
|---|
| 927 | if (DEBUGLEVEL >= 10) {
|
|---|
| 928 | NDR_PRINT_IN_DEBUG(netr_DatabaseRedo, &r);
|
|---|
| 929 | }
|
|---|
| 930 |
|
|---|
| 931 | status = cli_do_rpc_ndr(cli,
|
|---|
| 932 | mem_ctx,
|
|---|
| 933 | PI_NETLOGON,
|
|---|
| 934 | &ndr_table_netlogon,
|
|---|
| 935 | NDR_NETR_DATABASEREDO,
|
|---|
| 936 | &r);
|
|---|
| 937 |
|
|---|
| 938 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 939 | return status;
|
|---|
| 940 | }
|
|---|
| 941 |
|
|---|
| 942 | if (DEBUGLEVEL >= 10) {
|
|---|
| 943 | NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, &r);
|
|---|
| 944 | }
|
|---|
| 945 |
|
|---|
| 946 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 947 | return status;
|
|---|
| 948 | }
|
|---|
| 949 |
|
|---|
| 950 | /* Return variables */
|
|---|
| 951 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 952 | *delta_enum_array = *r.out.delta_enum_array;
|
|---|
| 953 |
|
|---|
| 954 | /* Return result */
|
|---|
| 955 | return r.out.result;
|
|---|
| 956 | }
|
|---|
| 957 |
|
|---|
| 958 | NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli,
|
|---|
| 959 | TALLOC_CTX *mem_ctx,
|
|---|
| 960 | const char *logon_server /* [in] [unique,charset(UTF16)] */,
|
|---|
| 961 | uint32_t function_code /* [in] */,
|
|---|
| 962 | uint32_t level /* [in] */,
|
|---|
| 963 | union netr_CONTROL_DATA_INFORMATION data /* [in] [switch_is(function_code)] */,
|
|---|
| 964 | union netr_CONTROL_QUERY_INFORMATION *query /* [out] [ref,switch_is(level)] */,
|
|---|
| 965 | WERROR *werror)
|
|---|
| 966 | {
|
|---|
| 967 | struct netr_LogonControl2Ex r;
|
|---|
| 968 | NTSTATUS status;
|
|---|
| 969 |
|
|---|
| 970 | /* In parameters */
|
|---|
| 971 | r.in.logon_server = logon_server;
|
|---|
| 972 | r.in.function_code = function_code;
|
|---|
| 973 | r.in.level = level;
|
|---|
| 974 | r.in.data = data;
|
|---|
| 975 |
|
|---|
| 976 | if (DEBUGLEVEL >= 10) {
|
|---|
| 977 | NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex, &r);
|
|---|
| 978 | }
|
|---|
| 979 |
|
|---|
| 980 | status = cli_do_rpc_ndr(cli,
|
|---|
| 981 | mem_ctx,
|
|---|
| 982 | PI_NETLOGON,
|
|---|
| 983 | &ndr_table_netlogon,
|
|---|
| 984 | NDR_NETR_LOGONCONTROL2EX,
|
|---|
| 985 | &r);
|
|---|
| 986 |
|
|---|
| 987 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 988 | return status;
|
|---|
| 989 | }
|
|---|
| 990 |
|
|---|
| 991 | if (DEBUGLEVEL >= 10) {
|
|---|
| 992 | NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, &r);
|
|---|
| 993 | }
|
|---|
| 994 |
|
|---|
| 995 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 996 | return status;
|
|---|
| 997 | }
|
|---|
| 998 |
|
|---|
| 999 | /* Return variables */
|
|---|
| 1000 | *query = *r.out.query;
|
|---|
| 1001 |
|
|---|
| 1002 | /* Return result */
|
|---|
| 1003 | if (werror) {
|
|---|
| 1004 | *werror = r.out.result;
|
|---|
| 1005 | }
|
|---|
| 1006 |
|
|---|
| 1007 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1008 | }
|
|---|
| 1009 |
|
|---|
| 1010 | NTSTATUS rpccli_netr_NetrEnumerateTrustedDomains(struct rpc_pipe_client *cli,
|
|---|
| 1011 | TALLOC_CTX *mem_ctx,
|
|---|
| 1012 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1013 | struct netr_Blob *trusted_domains_blob /* [out] [ref] */,
|
|---|
| 1014 | WERROR *werror)
|
|---|
| 1015 | {
|
|---|
| 1016 | struct netr_NetrEnumerateTrustedDomains r;
|
|---|
| 1017 | NTSTATUS status;
|
|---|
| 1018 |
|
|---|
| 1019 | /* In parameters */
|
|---|
| 1020 | r.in.server_name = server_name;
|
|---|
| 1021 |
|
|---|
| 1022 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1023 | NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomains, &r);
|
|---|
| 1024 | }
|
|---|
| 1025 |
|
|---|
| 1026 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1027 | mem_ctx,
|
|---|
| 1028 | PI_NETLOGON,
|
|---|
| 1029 | &ndr_table_netlogon,
|
|---|
| 1030 | NDR_NETR_NETRENUMERATETRUSTEDDOMAINS,
|
|---|
| 1031 | &r);
|
|---|
| 1032 |
|
|---|
| 1033 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1034 | return status;
|
|---|
| 1035 | }
|
|---|
| 1036 |
|
|---|
| 1037 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1038 | NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, &r);
|
|---|
| 1039 | }
|
|---|
| 1040 |
|
|---|
| 1041 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1042 | return status;
|
|---|
| 1043 | }
|
|---|
| 1044 |
|
|---|
| 1045 | /* Return variables */
|
|---|
| 1046 | *trusted_domains_blob = *r.out.trusted_domains_blob;
|
|---|
| 1047 |
|
|---|
| 1048 | /* Return result */
|
|---|
| 1049 | if (werror) {
|
|---|
| 1050 | *werror = r.out.result;
|
|---|
| 1051 | }
|
|---|
| 1052 |
|
|---|
| 1053 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1054 | }
|
|---|
| 1055 |
|
|---|
| 1056 | NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli,
|
|---|
| 1057 | TALLOC_CTX *mem_ctx,
|
|---|
| 1058 | const char *server_unc /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1059 | const char *domain_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1060 | struct GUID *domain_guid /* [in] [unique] */,
|
|---|
| 1061 | struct GUID *site_guid /* [in] [unique] */,
|
|---|
| 1062 | uint32_t flags /* [in] */,
|
|---|
| 1063 | struct netr_DsRGetDCNameInfo **info /* [out] [ref] */,
|
|---|
| 1064 | WERROR *werror)
|
|---|
| 1065 | {
|
|---|
| 1066 | struct netr_DsRGetDCName r;
|
|---|
| 1067 | NTSTATUS status;
|
|---|
| 1068 |
|
|---|
| 1069 | /* In parameters */
|
|---|
| 1070 | r.in.server_unc = server_unc;
|
|---|
| 1071 | r.in.domain_name = domain_name;
|
|---|
| 1072 | r.in.domain_guid = domain_guid;
|
|---|
| 1073 | r.in.site_guid = site_guid;
|
|---|
| 1074 | r.in.flags = flags;
|
|---|
| 1075 |
|
|---|
| 1076 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1077 | NDR_PRINT_IN_DEBUG(netr_DsRGetDCName, &r);
|
|---|
| 1078 | }
|
|---|
| 1079 |
|
|---|
| 1080 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1081 | mem_ctx,
|
|---|
| 1082 | PI_NETLOGON,
|
|---|
| 1083 | &ndr_table_netlogon,
|
|---|
| 1084 | NDR_NETR_DSRGETDCNAME,
|
|---|
| 1085 | &r);
|
|---|
| 1086 |
|
|---|
| 1087 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1088 | return status;
|
|---|
| 1089 | }
|
|---|
| 1090 |
|
|---|
| 1091 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1092 | NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName, &r);
|
|---|
| 1093 | }
|
|---|
| 1094 |
|
|---|
| 1095 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1096 | return status;
|
|---|
| 1097 | }
|
|---|
| 1098 |
|
|---|
| 1099 | /* Return variables */
|
|---|
| 1100 | *info = *r.out.info;
|
|---|
| 1101 |
|
|---|
| 1102 | /* Return result */
|
|---|
| 1103 | if (werror) {
|
|---|
| 1104 | *werror = r.out.result;
|
|---|
| 1105 | }
|
|---|
| 1106 |
|
|---|
| 1107 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1108 | }
|
|---|
| 1109 |
|
|---|
| 1110 | NTSTATUS rpccli_netr_LogonGetCapabilities(struct rpc_pipe_client *cli,
|
|---|
| 1111 | TALLOC_CTX *mem_ctx,
|
|---|
| 1112 | const char *server_name /* [in] [charset(UTF16)] */,
|
|---|
| 1113 | const char *computer_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1114 | struct netr_Authenticator *credential /* [in] [ref] */,
|
|---|
| 1115 | struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
|
|---|
| 1116 | uint32_t query_level /* [in] */,
|
|---|
| 1117 | union netr_Capabilities *capabilities /* [out] [ref,switch_is(query_level)] */)
|
|---|
| 1118 | {
|
|---|
| 1119 | struct netr_LogonGetCapabilities r;
|
|---|
| 1120 | NTSTATUS status;
|
|---|
| 1121 |
|
|---|
| 1122 | /* In parameters */
|
|---|
| 1123 | r.in.server_name = server_name;
|
|---|
| 1124 | r.in.computer_name = computer_name;
|
|---|
| 1125 | r.in.credential = credential;
|
|---|
| 1126 | r.in.return_authenticator = return_authenticator;
|
|---|
| 1127 | r.in.query_level = query_level;
|
|---|
| 1128 |
|
|---|
| 1129 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1130 | NDR_PRINT_IN_DEBUG(netr_LogonGetCapabilities, &r);
|
|---|
| 1131 | }
|
|---|
| 1132 |
|
|---|
| 1133 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1134 | mem_ctx,
|
|---|
| 1135 | PI_NETLOGON,
|
|---|
| 1136 | &ndr_table_netlogon,
|
|---|
| 1137 | NDR_NETR_LOGONGETCAPABILITIES,
|
|---|
| 1138 | &r);
|
|---|
| 1139 |
|
|---|
| 1140 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1141 | return status;
|
|---|
| 1142 | }
|
|---|
| 1143 |
|
|---|
| 1144 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1145 | NDR_PRINT_OUT_DEBUG(netr_LogonGetCapabilities, &r);
|
|---|
| 1146 | }
|
|---|
| 1147 |
|
|---|
| 1148 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1149 | return status;
|
|---|
| 1150 | }
|
|---|
| 1151 |
|
|---|
| 1152 | /* Return variables */
|
|---|
| 1153 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 1154 | *capabilities = *r.out.capabilities;
|
|---|
| 1155 |
|
|---|
| 1156 | /* Return result */
|
|---|
| 1157 | return r.out.result;
|
|---|
| 1158 | }
|
|---|
| 1159 |
|
|---|
| 1160 | NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli,
|
|---|
| 1161 | TALLOC_CTX *mem_ctx,
|
|---|
| 1162 | WERROR *werror)
|
|---|
| 1163 | {
|
|---|
| 1164 | struct netr_NETRLOGONSETSERVICEBITS r;
|
|---|
| 1165 | NTSTATUS status;
|
|---|
| 1166 |
|
|---|
| 1167 | /* In parameters */
|
|---|
| 1168 |
|
|---|
| 1169 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1170 | NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r);
|
|---|
| 1171 | }
|
|---|
| 1172 |
|
|---|
| 1173 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1174 | mem_ctx,
|
|---|
| 1175 | PI_NETLOGON,
|
|---|
| 1176 | &ndr_table_netlogon,
|
|---|
| 1177 | NDR_NETR_NETRLOGONSETSERVICEBITS,
|
|---|
| 1178 | &r);
|
|---|
| 1179 |
|
|---|
| 1180 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1181 | return status;
|
|---|
| 1182 | }
|
|---|
| 1183 |
|
|---|
| 1184 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1185 | NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r);
|
|---|
| 1186 | }
|
|---|
| 1187 |
|
|---|
| 1188 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1189 | return status;
|
|---|
| 1190 | }
|
|---|
| 1191 |
|
|---|
| 1192 | /* Return variables */
|
|---|
| 1193 |
|
|---|
| 1194 | /* Return result */
|
|---|
| 1195 | if (werror) {
|
|---|
| 1196 | *werror = r.out.result;
|
|---|
| 1197 | }
|
|---|
| 1198 |
|
|---|
| 1199 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1200 | }
|
|---|
| 1201 |
|
|---|
| 1202 | NTSTATUS rpccli_netr_LogonGetTrustRid(struct rpc_pipe_client *cli,
|
|---|
| 1203 | TALLOC_CTX *mem_ctx,
|
|---|
| 1204 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1205 | const char *domain_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1206 | uint32_t *rid /* [out] [ref] */,
|
|---|
| 1207 | WERROR *werror)
|
|---|
| 1208 | {
|
|---|
| 1209 | struct netr_LogonGetTrustRid r;
|
|---|
| 1210 | NTSTATUS status;
|
|---|
| 1211 |
|
|---|
| 1212 | /* In parameters */
|
|---|
| 1213 | r.in.server_name = server_name;
|
|---|
| 1214 | r.in.domain_name = domain_name;
|
|---|
| 1215 |
|
|---|
| 1216 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1217 | NDR_PRINT_IN_DEBUG(netr_LogonGetTrustRid, &r);
|
|---|
| 1218 | }
|
|---|
| 1219 |
|
|---|
| 1220 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1221 | mem_ctx,
|
|---|
| 1222 | PI_NETLOGON,
|
|---|
| 1223 | &ndr_table_netlogon,
|
|---|
| 1224 | NDR_NETR_LOGONGETTRUSTRID,
|
|---|
| 1225 | &r);
|
|---|
| 1226 |
|
|---|
| 1227 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1228 | return status;
|
|---|
| 1229 | }
|
|---|
| 1230 |
|
|---|
| 1231 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1232 | NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid, &r);
|
|---|
| 1233 | }
|
|---|
| 1234 |
|
|---|
| 1235 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1236 | return status;
|
|---|
| 1237 | }
|
|---|
| 1238 |
|
|---|
| 1239 | /* Return variables */
|
|---|
| 1240 | *rid = *r.out.rid;
|
|---|
| 1241 |
|
|---|
| 1242 | /* Return result */
|
|---|
| 1243 | if (werror) {
|
|---|
| 1244 | *werror = r.out.result;
|
|---|
| 1245 | }
|
|---|
| 1246 |
|
|---|
| 1247 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1248 | }
|
|---|
| 1249 |
|
|---|
| 1250 | NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli,
|
|---|
| 1251 | TALLOC_CTX *mem_ctx,
|
|---|
| 1252 | WERROR *werror)
|
|---|
| 1253 | {
|
|---|
| 1254 | struct netr_NETRLOGONCOMPUTESERVERDIGEST r;
|
|---|
| 1255 | NTSTATUS status;
|
|---|
| 1256 |
|
|---|
| 1257 | /* In parameters */
|
|---|
| 1258 |
|
|---|
| 1259 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1260 | NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r);
|
|---|
| 1261 | }
|
|---|
| 1262 |
|
|---|
| 1263 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1264 | mem_ctx,
|
|---|
| 1265 | PI_NETLOGON,
|
|---|
| 1266 | &ndr_table_netlogon,
|
|---|
| 1267 | NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST,
|
|---|
| 1268 | &r);
|
|---|
| 1269 |
|
|---|
| 1270 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1271 | return status;
|
|---|
| 1272 | }
|
|---|
| 1273 |
|
|---|
| 1274 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1275 | NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r);
|
|---|
| 1276 | }
|
|---|
| 1277 |
|
|---|
| 1278 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1279 | return status;
|
|---|
| 1280 | }
|
|---|
| 1281 |
|
|---|
| 1282 | /* Return variables */
|
|---|
| 1283 |
|
|---|
| 1284 | /* Return result */
|
|---|
| 1285 | if (werror) {
|
|---|
| 1286 | *werror = r.out.result;
|
|---|
| 1287 | }
|
|---|
| 1288 |
|
|---|
| 1289 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1290 | }
|
|---|
| 1291 |
|
|---|
| 1292 | NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli,
|
|---|
| 1293 | TALLOC_CTX *mem_ctx,
|
|---|
| 1294 | WERROR *werror)
|
|---|
| 1295 | {
|
|---|
| 1296 | struct netr_NETRLOGONCOMPUTECLIENTDIGEST r;
|
|---|
| 1297 | NTSTATUS status;
|
|---|
| 1298 |
|
|---|
| 1299 | /* In parameters */
|
|---|
| 1300 |
|
|---|
| 1301 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1302 | NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r);
|
|---|
| 1303 | }
|
|---|
| 1304 |
|
|---|
| 1305 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1306 | mem_ctx,
|
|---|
| 1307 | PI_NETLOGON,
|
|---|
| 1308 | &ndr_table_netlogon,
|
|---|
| 1309 | NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST,
|
|---|
| 1310 | &r);
|
|---|
| 1311 |
|
|---|
| 1312 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1313 | return status;
|
|---|
| 1314 | }
|
|---|
| 1315 |
|
|---|
| 1316 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1317 | NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r);
|
|---|
| 1318 | }
|
|---|
| 1319 |
|
|---|
| 1320 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1321 | return status;
|
|---|
| 1322 | }
|
|---|
| 1323 |
|
|---|
| 1324 | /* Return variables */
|
|---|
| 1325 |
|
|---|
| 1326 | /* Return result */
|
|---|
| 1327 | if (werror) {
|
|---|
| 1328 | *werror = r.out.result;
|
|---|
| 1329 | }
|
|---|
| 1330 |
|
|---|
| 1331 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1332 | }
|
|---|
| 1333 |
|
|---|
| 1334 | NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli,
|
|---|
| 1335 | TALLOC_CTX *mem_ctx,
|
|---|
| 1336 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1337 | const char *account_name /* [in] [charset(UTF16)] */,
|
|---|
| 1338 | enum netr_SchannelType secure_channel_type /* [in] */,
|
|---|
| 1339 | const char *computer_name /* [in] [charset(UTF16)] */,
|
|---|
| 1340 | struct netr_Credential *credentials /* [in,out] [ref] */,
|
|---|
| 1341 | uint32_t *negotiate_flags /* [in,out] [ref] */,
|
|---|
| 1342 | uint32_t *rid /* [out] [ref] */)
|
|---|
| 1343 | {
|
|---|
| 1344 | struct netr_ServerAuthenticate3 r;
|
|---|
| 1345 | NTSTATUS status;
|
|---|
| 1346 |
|
|---|
| 1347 | /* In parameters */
|
|---|
| 1348 | r.in.server_name = server_name;
|
|---|
| 1349 | r.in.account_name = account_name;
|
|---|
| 1350 | r.in.secure_channel_type = secure_channel_type;
|
|---|
| 1351 | r.in.computer_name = computer_name;
|
|---|
| 1352 | r.in.credentials = credentials;
|
|---|
| 1353 | r.in.negotiate_flags = negotiate_flags;
|
|---|
| 1354 |
|
|---|
| 1355 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1356 | NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate3, &r);
|
|---|
| 1357 | }
|
|---|
| 1358 |
|
|---|
| 1359 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1360 | mem_ctx,
|
|---|
| 1361 | PI_NETLOGON,
|
|---|
| 1362 | &ndr_table_netlogon,
|
|---|
| 1363 | NDR_NETR_SERVERAUTHENTICATE3,
|
|---|
| 1364 | &r);
|
|---|
| 1365 |
|
|---|
| 1366 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1367 | return status;
|
|---|
| 1368 | }
|
|---|
| 1369 |
|
|---|
| 1370 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1371 | NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, &r);
|
|---|
| 1372 | }
|
|---|
| 1373 |
|
|---|
| 1374 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1375 | return status;
|
|---|
| 1376 | }
|
|---|
| 1377 |
|
|---|
| 1378 | /* Return variables */
|
|---|
| 1379 | *credentials = *r.out.credentials;
|
|---|
| 1380 | *negotiate_flags = *r.out.negotiate_flags;
|
|---|
| 1381 | *rid = *r.out.rid;
|
|---|
| 1382 |
|
|---|
| 1383 | /* Return result */
|
|---|
| 1384 | return r.out.result;
|
|---|
| 1385 | }
|
|---|
| 1386 |
|
|---|
| 1387 | NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli,
|
|---|
| 1388 | TALLOC_CTX *mem_ctx,
|
|---|
| 1389 | const char *server_unc /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1390 | const char *domain_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1391 | struct GUID *domain_guid /* [in] [unique] */,
|
|---|
| 1392 | const char *site_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1393 | uint32_t flags /* [in] */,
|
|---|
| 1394 | struct netr_DsRGetDCNameInfo **info /* [out] [ref] */,
|
|---|
| 1395 | WERROR *werror)
|
|---|
| 1396 | {
|
|---|
| 1397 | struct netr_DsRGetDCNameEx r;
|
|---|
| 1398 | NTSTATUS status;
|
|---|
| 1399 |
|
|---|
| 1400 | /* In parameters */
|
|---|
| 1401 | r.in.server_unc = server_unc;
|
|---|
| 1402 | r.in.domain_name = domain_name;
|
|---|
| 1403 | r.in.domain_guid = domain_guid;
|
|---|
| 1404 | r.in.site_name = site_name;
|
|---|
| 1405 | r.in.flags = flags;
|
|---|
| 1406 |
|
|---|
| 1407 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1408 | NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx, &r);
|
|---|
| 1409 | }
|
|---|
| 1410 |
|
|---|
| 1411 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1412 | mem_ctx,
|
|---|
| 1413 | PI_NETLOGON,
|
|---|
| 1414 | &ndr_table_netlogon,
|
|---|
| 1415 | NDR_NETR_DSRGETDCNAMEEX,
|
|---|
| 1416 | &r);
|
|---|
| 1417 |
|
|---|
| 1418 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1419 | return status;
|
|---|
| 1420 | }
|
|---|
| 1421 |
|
|---|
| 1422 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1423 | NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx, &r);
|
|---|
| 1424 | }
|
|---|
| 1425 |
|
|---|
| 1426 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1427 | return status;
|
|---|
| 1428 | }
|
|---|
| 1429 |
|
|---|
| 1430 | /* Return variables */
|
|---|
| 1431 | *info = *r.out.info;
|
|---|
| 1432 |
|
|---|
| 1433 | /* Return result */
|
|---|
| 1434 | if (werror) {
|
|---|
| 1435 | *werror = r.out.result;
|
|---|
| 1436 | }
|
|---|
| 1437 |
|
|---|
| 1438 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1439 | }
|
|---|
| 1440 |
|
|---|
| 1441 | NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli,
|
|---|
| 1442 | TALLOC_CTX *mem_ctx,
|
|---|
| 1443 | const char *computer_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1444 | const char **site /* [out] [ref,charset(UTF16)] */,
|
|---|
| 1445 | WERROR *werror)
|
|---|
| 1446 | {
|
|---|
| 1447 | struct netr_DsRGetSiteName r;
|
|---|
| 1448 | NTSTATUS status;
|
|---|
| 1449 |
|
|---|
| 1450 | /* In parameters */
|
|---|
| 1451 | r.in.computer_name = computer_name;
|
|---|
| 1452 |
|
|---|
| 1453 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1454 | NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName, &r);
|
|---|
| 1455 | }
|
|---|
| 1456 |
|
|---|
| 1457 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1458 | mem_ctx,
|
|---|
| 1459 | PI_NETLOGON,
|
|---|
| 1460 | &ndr_table_netlogon,
|
|---|
| 1461 | NDR_NETR_DSRGETSITENAME,
|
|---|
| 1462 | &r);
|
|---|
| 1463 |
|
|---|
| 1464 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1465 | return status;
|
|---|
| 1466 | }
|
|---|
| 1467 |
|
|---|
| 1468 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1469 | NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, &r);
|
|---|
| 1470 | }
|
|---|
| 1471 |
|
|---|
| 1472 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1473 | return status;
|
|---|
| 1474 | }
|
|---|
| 1475 |
|
|---|
| 1476 | /* Return variables */
|
|---|
| 1477 | *site = *r.out.site;
|
|---|
| 1478 |
|
|---|
| 1479 | /* Return result */
|
|---|
| 1480 | if (werror) {
|
|---|
| 1481 | *werror = r.out.result;
|
|---|
| 1482 | }
|
|---|
| 1483 |
|
|---|
| 1484 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1485 | }
|
|---|
| 1486 |
|
|---|
| 1487 | NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli,
|
|---|
| 1488 | TALLOC_CTX *mem_ctx,
|
|---|
| 1489 | const char *server_name /* [in] [charset(UTF16)] */,
|
|---|
| 1490 | const char *computer_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1491 | struct netr_Authenticator *credential /* [in] [ref] */,
|
|---|
| 1492 | struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
|
|---|
| 1493 | uint32_t level /* [in] */,
|
|---|
| 1494 | union netr_DomainQuery query /* [in] [switch_is(level)] */,
|
|---|
| 1495 | union netr_DomainInfo *info /* [out] [ref,switch_is(level)] */)
|
|---|
| 1496 | {
|
|---|
| 1497 | struct netr_LogonGetDomainInfo r;
|
|---|
| 1498 | NTSTATUS status;
|
|---|
| 1499 |
|
|---|
| 1500 | /* In parameters */
|
|---|
| 1501 | r.in.server_name = server_name;
|
|---|
| 1502 | r.in.computer_name = computer_name;
|
|---|
| 1503 | r.in.credential = credential;
|
|---|
| 1504 | r.in.return_authenticator = return_authenticator;
|
|---|
| 1505 | r.in.level = level;
|
|---|
| 1506 | r.in.query = query;
|
|---|
| 1507 |
|
|---|
| 1508 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1509 | NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo, &r);
|
|---|
| 1510 | }
|
|---|
| 1511 |
|
|---|
| 1512 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1513 | mem_ctx,
|
|---|
| 1514 | PI_NETLOGON,
|
|---|
| 1515 | &ndr_table_netlogon,
|
|---|
| 1516 | NDR_NETR_LOGONGETDOMAININFO,
|
|---|
| 1517 | &r);
|
|---|
| 1518 |
|
|---|
| 1519 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1520 | return status;
|
|---|
| 1521 | }
|
|---|
| 1522 |
|
|---|
| 1523 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1524 | NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo, &r);
|
|---|
| 1525 | }
|
|---|
| 1526 |
|
|---|
| 1527 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1528 | return status;
|
|---|
| 1529 | }
|
|---|
| 1530 |
|
|---|
| 1531 | /* Return variables */
|
|---|
| 1532 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 1533 | *info = *r.out.info;
|
|---|
| 1534 |
|
|---|
| 1535 | /* Return result */
|
|---|
| 1536 | return r.out.result;
|
|---|
| 1537 | }
|
|---|
| 1538 |
|
|---|
| 1539 | NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli,
|
|---|
| 1540 | TALLOC_CTX *mem_ctx,
|
|---|
| 1541 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1542 | const char *account_name /* [in] [charset(UTF16)] */,
|
|---|
| 1543 | enum netr_SchannelType secure_channel_type /* [in] */,
|
|---|
| 1544 | const char *computer_name /* [in] [charset(UTF16)] */,
|
|---|
| 1545 | struct netr_Authenticator *credential /* [in] [ref] */,
|
|---|
| 1546 | struct netr_Authenticator *return_authenticator /* [out] [ref] */,
|
|---|
| 1547 | struct netr_CryptPassword *new_password /* [in] [ref] */)
|
|---|
| 1548 | {
|
|---|
| 1549 | struct netr_ServerPasswordSet2 r;
|
|---|
| 1550 | NTSTATUS status;
|
|---|
| 1551 |
|
|---|
| 1552 | /* In parameters */
|
|---|
| 1553 | r.in.server_name = server_name;
|
|---|
| 1554 | r.in.account_name = account_name;
|
|---|
| 1555 | r.in.secure_channel_type = secure_channel_type;
|
|---|
| 1556 | r.in.computer_name = computer_name;
|
|---|
| 1557 | r.in.credential = credential;
|
|---|
| 1558 | r.in.new_password = new_password;
|
|---|
| 1559 |
|
|---|
| 1560 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1561 | NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2, &r);
|
|---|
| 1562 | }
|
|---|
| 1563 |
|
|---|
| 1564 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1565 | mem_ctx,
|
|---|
| 1566 | PI_NETLOGON,
|
|---|
| 1567 | &ndr_table_netlogon,
|
|---|
| 1568 | NDR_NETR_SERVERPASSWORDSET2,
|
|---|
| 1569 | &r);
|
|---|
| 1570 |
|
|---|
| 1571 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1572 | return status;
|
|---|
| 1573 | }
|
|---|
| 1574 |
|
|---|
| 1575 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1576 | NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, &r);
|
|---|
| 1577 | }
|
|---|
| 1578 |
|
|---|
| 1579 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1580 | return status;
|
|---|
| 1581 | }
|
|---|
| 1582 |
|
|---|
| 1583 | /* Return variables */
|
|---|
| 1584 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 1585 |
|
|---|
| 1586 | /* Return result */
|
|---|
| 1587 | return r.out.result;
|
|---|
| 1588 | }
|
|---|
| 1589 |
|
|---|
| 1590 | NTSTATUS rpccli_netr_ServerPasswordGet(struct rpc_pipe_client *cli,
|
|---|
| 1591 | TALLOC_CTX *mem_ctx,
|
|---|
| 1592 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1593 | const char *account_name /* [in] [charset(UTF16)] */,
|
|---|
| 1594 | enum netr_SchannelType secure_channel_type /* [in] */,
|
|---|
| 1595 | const char *computer_name /* [in] [charset(UTF16)] */,
|
|---|
| 1596 | struct netr_Authenticator *credential /* [in] [ref] */,
|
|---|
| 1597 | struct netr_Authenticator *return_authenticator /* [out] [ref] */,
|
|---|
| 1598 | struct samr_Password *password /* [out] [ref] */,
|
|---|
| 1599 | WERROR *werror)
|
|---|
| 1600 | {
|
|---|
| 1601 | struct netr_ServerPasswordGet r;
|
|---|
| 1602 | NTSTATUS status;
|
|---|
| 1603 |
|
|---|
| 1604 | /* In parameters */
|
|---|
| 1605 | r.in.server_name = server_name;
|
|---|
| 1606 | r.in.account_name = account_name;
|
|---|
| 1607 | r.in.secure_channel_type = secure_channel_type;
|
|---|
| 1608 | r.in.computer_name = computer_name;
|
|---|
| 1609 | r.in.credential = credential;
|
|---|
| 1610 |
|
|---|
| 1611 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1612 | NDR_PRINT_IN_DEBUG(netr_ServerPasswordGet, &r);
|
|---|
| 1613 | }
|
|---|
| 1614 |
|
|---|
| 1615 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1616 | mem_ctx,
|
|---|
| 1617 | PI_NETLOGON,
|
|---|
| 1618 | &ndr_table_netlogon,
|
|---|
| 1619 | NDR_NETR_SERVERPASSWORDGET,
|
|---|
| 1620 | &r);
|
|---|
| 1621 |
|
|---|
| 1622 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1623 | return status;
|
|---|
| 1624 | }
|
|---|
| 1625 |
|
|---|
| 1626 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1627 | NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, &r);
|
|---|
| 1628 | }
|
|---|
| 1629 |
|
|---|
| 1630 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1631 | return status;
|
|---|
| 1632 | }
|
|---|
| 1633 |
|
|---|
| 1634 | /* Return variables */
|
|---|
| 1635 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 1636 | *password = *r.out.password;
|
|---|
| 1637 |
|
|---|
| 1638 | /* Return result */
|
|---|
| 1639 | if (werror) {
|
|---|
| 1640 | *werror = r.out.result;
|
|---|
| 1641 | }
|
|---|
| 1642 |
|
|---|
| 1643 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1644 | }
|
|---|
| 1645 |
|
|---|
| 1646 | NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli,
|
|---|
| 1647 | TALLOC_CTX *mem_ctx,
|
|---|
| 1648 | WERROR *werror)
|
|---|
| 1649 | {
|
|---|
| 1650 | struct netr_NETRLOGONSENDTOSAM r;
|
|---|
| 1651 | NTSTATUS status;
|
|---|
| 1652 |
|
|---|
| 1653 | /* In parameters */
|
|---|
| 1654 |
|
|---|
| 1655 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1656 | NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM, &r);
|
|---|
| 1657 | }
|
|---|
| 1658 |
|
|---|
| 1659 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1660 | mem_ctx,
|
|---|
| 1661 | PI_NETLOGON,
|
|---|
| 1662 | &ndr_table_netlogon,
|
|---|
| 1663 | NDR_NETR_NETRLOGONSENDTOSAM,
|
|---|
| 1664 | &r);
|
|---|
| 1665 |
|
|---|
| 1666 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1667 | return status;
|
|---|
| 1668 | }
|
|---|
| 1669 |
|
|---|
| 1670 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1671 | NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, &r);
|
|---|
| 1672 | }
|
|---|
| 1673 |
|
|---|
| 1674 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1675 | return status;
|
|---|
| 1676 | }
|
|---|
| 1677 |
|
|---|
| 1678 | /* Return variables */
|
|---|
| 1679 |
|
|---|
| 1680 | /* Return result */
|
|---|
| 1681 | if (werror) {
|
|---|
| 1682 | *werror = r.out.result;
|
|---|
| 1683 | }
|
|---|
| 1684 |
|
|---|
| 1685 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1686 | }
|
|---|
| 1687 |
|
|---|
| 1688 | NTSTATUS rpccli_netr_DsRAddressToSitenamesW(struct rpc_pipe_client *cli,
|
|---|
| 1689 | TALLOC_CTX *mem_ctx,
|
|---|
| 1690 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1691 | uint32_t count /* [in] [range(0,32000)] */,
|
|---|
| 1692 | struct netr_DsRAddress *addresses /* [in] [ref,size_is(count)] */,
|
|---|
| 1693 | struct netr_DsRAddressToSitenamesWCtr **ctr /* [out] [ref] */,
|
|---|
| 1694 | WERROR *werror)
|
|---|
| 1695 | {
|
|---|
| 1696 | struct netr_DsRAddressToSitenamesW r;
|
|---|
| 1697 | NTSTATUS status;
|
|---|
| 1698 |
|
|---|
| 1699 | /* In parameters */
|
|---|
| 1700 | r.in.server_name = server_name;
|
|---|
| 1701 | r.in.count = count;
|
|---|
| 1702 | r.in.addresses = addresses;
|
|---|
| 1703 |
|
|---|
| 1704 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1705 | NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW, &r);
|
|---|
| 1706 | }
|
|---|
| 1707 |
|
|---|
| 1708 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1709 | mem_ctx,
|
|---|
| 1710 | PI_NETLOGON,
|
|---|
| 1711 | &ndr_table_netlogon,
|
|---|
| 1712 | NDR_NETR_DSRADDRESSTOSITENAMESW,
|
|---|
| 1713 | &r);
|
|---|
| 1714 |
|
|---|
| 1715 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1716 | return status;
|
|---|
| 1717 | }
|
|---|
| 1718 |
|
|---|
| 1719 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1720 | NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, &r);
|
|---|
| 1721 | }
|
|---|
| 1722 |
|
|---|
| 1723 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1724 | return status;
|
|---|
| 1725 | }
|
|---|
| 1726 |
|
|---|
| 1727 | /* Return variables */
|
|---|
| 1728 | *ctr = *r.out.ctr;
|
|---|
| 1729 |
|
|---|
| 1730 | /* Return result */
|
|---|
| 1731 | if (werror) {
|
|---|
| 1732 | *werror = r.out.result;
|
|---|
| 1733 | }
|
|---|
| 1734 |
|
|---|
| 1735 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1736 | }
|
|---|
| 1737 |
|
|---|
| 1738 | NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli,
|
|---|
| 1739 | TALLOC_CTX *mem_ctx,
|
|---|
| 1740 | const char *server_unc /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1741 | const char *client_account /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1742 | uint32_t mask /* [in] */,
|
|---|
| 1743 | const char *domain_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1744 | struct GUID *domain_guid /* [in] [unique] */,
|
|---|
| 1745 | const char *site_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1746 | uint32_t flags /* [in] */,
|
|---|
| 1747 | struct netr_DsRGetDCNameInfo **info /* [out] [ref] */,
|
|---|
| 1748 | WERROR *werror)
|
|---|
| 1749 | {
|
|---|
| 1750 | struct netr_DsRGetDCNameEx2 r;
|
|---|
| 1751 | NTSTATUS status;
|
|---|
| 1752 |
|
|---|
| 1753 | /* In parameters */
|
|---|
| 1754 | r.in.server_unc = server_unc;
|
|---|
| 1755 | r.in.client_account = client_account;
|
|---|
| 1756 | r.in.mask = mask;
|
|---|
| 1757 | r.in.domain_name = domain_name;
|
|---|
| 1758 | r.in.domain_guid = domain_guid;
|
|---|
| 1759 | r.in.site_name = site_name;
|
|---|
| 1760 | r.in.flags = flags;
|
|---|
| 1761 |
|
|---|
| 1762 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1763 | NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2, &r);
|
|---|
| 1764 | }
|
|---|
| 1765 |
|
|---|
| 1766 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1767 | mem_ctx,
|
|---|
| 1768 | PI_NETLOGON,
|
|---|
| 1769 | &ndr_table_netlogon,
|
|---|
| 1770 | NDR_NETR_DSRGETDCNAMEEX2,
|
|---|
| 1771 | &r);
|
|---|
| 1772 |
|
|---|
| 1773 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1774 | return status;
|
|---|
| 1775 | }
|
|---|
| 1776 |
|
|---|
| 1777 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1778 | NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2, &r);
|
|---|
| 1779 | }
|
|---|
| 1780 |
|
|---|
| 1781 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1782 | return status;
|
|---|
| 1783 | }
|
|---|
| 1784 |
|
|---|
| 1785 | /* Return variables */
|
|---|
| 1786 | *info = *r.out.info;
|
|---|
| 1787 |
|
|---|
| 1788 | /* Return result */
|
|---|
| 1789 | if (werror) {
|
|---|
| 1790 | *werror = r.out.result;
|
|---|
| 1791 | }
|
|---|
| 1792 |
|
|---|
| 1793 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1794 | }
|
|---|
| 1795 |
|
|---|
| 1796 | NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli,
|
|---|
| 1797 | TALLOC_CTX *mem_ctx,
|
|---|
| 1798 | WERROR *werror)
|
|---|
| 1799 | {
|
|---|
| 1800 | struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN r;
|
|---|
| 1801 | NTSTATUS status;
|
|---|
| 1802 |
|
|---|
| 1803 | /* In parameters */
|
|---|
| 1804 |
|
|---|
| 1805 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1806 | NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r);
|
|---|
| 1807 | }
|
|---|
| 1808 |
|
|---|
| 1809 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1810 | mem_ctx,
|
|---|
| 1811 | PI_NETLOGON,
|
|---|
| 1812 | &ndr_table_netlogon,
|
|---|
| 1813 | NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN,
|
|---|
| 1814 | &r);
|
|---|
| 1815 |
|
|---|
| 1816 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1817 | return status;
|
|---|
| 1818 | }
|
|---|
| 1819 |
|
|---|
| 1820 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1821 | NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r);
|
|---|
| 1822 | }
|
|---|
| 1823 |
|
|---|
| 1824 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1825 | return status;
|
|---|
| 1826 | }
|
|---|
| 1827 |
|
|---|
| 1828 | /* Return variables */
|
|---|
| 1829 |
|
|---|
| 1830 | /* Return result */
|
|---|
| 1831 | if (werror) {
|
|---|
| 1832 | *werror = r.out.result;
|
|---|
| 1833 | }
|
|---|
| 1834 |
|
|---|
| 1835 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1836 | }
|
|---|
| 1837 |
|
|---|
| 1838 | NTSTATUS rpccli_netr_NetrEnumerateTrustedDomainsEx(struct rpc_pipe_client *cli,
|
|---|
| 1839 | TALLOC_CTX *mem_ctx,
|
|---|
| 1840 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1841 | struct netr_DomainTrustList *dom_trust_list /* [out] [ref] */,
|
|---|
| 1842 | WERROR *werror)
|
|---|
| 1843 | {
|
|---|
| 1844 | struct netr_NetrEnumerateTrustedDomainsEx r;
|
|---|
| 1845 | NTSTATUS status;
|
|---|
| 1846 |
|
|---|
| 1847 | /* In parameters */
|
|---|
| 1848 | r.in.server_name = server_name;
|
|---|
| 1849 |
|
|---|
| 1850 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1851 | NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r);
|
|---|
| 1852 | }
|
|---|
| 1853 |
|
|---|
| 1854 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1855 | mem_ctx,
|
|---|
| 1856 | PI_NETLOGON,
|
|---|
| 1857 | &ndr_table_netlogon,
|
|---|
| 1858 | NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX,
|
|---|
| 1859 | &r);
|
|---|
| 1860 |
|
|---|
| 1861 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1862 | return status;
|
|---|
| 1863 | }
|
|---|
| 1864 |
|
|---|
| 1865 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1866 | NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &r);
|
|---|
| 1867 | }
|
|---|
| 1868 |
|
|---|
| 1869 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1870 | return status;
|
|---|
| 1871 | }
|
|---|
| 1872 |
|
|---|
| 1873 | /* Return variables */
|
|---|
| 1874 | *dom_trust_list = *r.out.dom_trust_list;
|
|---|
| 1875 |
|
|---|
| 1876 | /* Return result */
|
|---|
| 1877 | if (werror) {
|
|---|
| 1878 | *werror = r.out.result;
|
|---|
| 1879 | }
|
|---|
| 1880 |
|
|---|
| 1881 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1882 | }
|
|---|
| 1883 |
|
|---|
| 1884 | NTSTATUS rpccli_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client *cli,
|
|---|
| 1885 | TALLOC_CTX *mem_ctx,
|
|---|
| 1886 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1887 | uint32_t count /* [in] [range(0,32000)] */,
|
|---|
| 1888 | struct netr_DsRAddress *addresses /* [in] [ref,size_is(count)] */,
|
|---|
| 1889 | struct netr_DsRAddressToSitenamesExWCtr **ctr /* [out] [ref] */,
|
|---|
| 1890 | WERROR *werror)
|
|---|
| 1891 | {
|
|---|
| 1892 | struct netr_DsRAddressToSitenamesExW r;
|
|---|
| 1893 | NTSTATUS status;
|
|---|
| 1894 |
|
|---|
| 1895 | /* In parameters */
|
|---|
| 1896 | r.in.server_name = server_name;
|
|---|
| 1897 | r.in.count = count;
|
|---|
| 1898 | r.in.addresses = addresses;
|
|---|
| 1899 |
|
|---|
| 1900 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1901 | NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW, &r);
|
|---|
| 1902 | }
|
|---|
| 1903 |
|
|---|
| 1904 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1905 | mem_ctx,
|
|---|
| 1906 | PI_NETLOGON,
|
|---|
| 1907 | &ndr_table_netlogon,
|
|---|
| 1908 | NDR_NETR_DSRADDRESSTOSITENAMESEXW,
|
|---|
| 1909 | &r);
|
|---|
| 1910 |
|
|---|
| 1911 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1912 | return status;
|
|---|
| 1913 | }
|
|---|
| 1914 |
|
|---|
| 1915 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1916 | NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, &r);
|
|---|
| 1917 | }
|
|---|
| 1918 |
|
|---|
| 1919 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1920 | return status;
|
|---|
| 1921 | }
|
|---|
| 1922 |
|
|---|
| 1923 | /* Return variables */
|
|---|
| 1924 | *ctr = *r.out.ctr;
|
|---|
| 1925 |
|
|---|
| 1926 | /* Return result */
|
|---|
| 1927 | if (werror) {
|
|---|
| 1928 | *werror = r.out.result;
|
|---|
| 1929 | }
|
|---|
| 1930 |
|
|---|
| 1931 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1932 | }
|
|---|
| 1933 |
|
|---|
| 1934 | NTSTATUS rpccli_netr_DsrGetDcSiteCoverageW(struct rpc_pipe_client *cli,
|
|---|
| 1935 | TALLOC_CTX *mem_ctx,
|
|---|
| 1936 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1937 | struct DcSitesCtr *ctr /* [out] [ref] */,
|
|---|
| 1938 | WERROR *werror)
|
|---|
| 1939 | {
|
|---|
| 1940 | struct netr_DsrGetDcSiteCoverageW r;
|
|---|
| 1941 | NTSTATUS status;
|
|---|
| 1942 |
|
|---|
| 1943 | /* In parameters */
|
|---|
| 1944 | r.in.server_name = server_name;
|
|---|
| 1945 |
|
|---|
| 1946 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1947 | NDR_PRINT_IN_DEBUG(netr_DsrGetDcSiteCoverageW, &r);
|
|---|
| 1948 | }
|
|---|
| 1949 |
|
|---|
| 1950 | status = cli_do_rpc_ndr(cli,
|
|---|
| 1951 | mem_ctx,
|
|---|
| 1952 | PI_NETLOGON,
|
|---|
| 1953 | &ndr_table_netlogon,
|
|---|
| 1954 | NDR_NETR_DSRGETDCSITECOVERAGEW,
|
|---|
| 1955 | &r);
|
|---|
| 1956 |
|
|---|
| 1957 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 1958 | return status;
|
|---|
| 1959 | }
|
|---|
| 1960 |
|
|---|
| 1961 | if (DEBUGLEVEL >= 10) {
|
|---|
| 1962 | NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, &r);
|
|---|
| 1963 | }
|
|---|
| 1964 |
|
|---|
| 1965 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 1966 | return status;
|
|---|
| 1967 | }
|
|---|
| 1968 |
|
|---|
| 1969 | /* Return variables */
|
|---|
| 1970 | *ctr = *r.out.ctr;
|
|---|
| 1971 |
|
|---|
| 1972 | /* Return result */
|
|---|
| 1973 | if (werror) {
|
|---|
| 1974 | *werror = r.out.result;
|
|---|
| 1975 | }
|
|---|
| 1976 |
|
|---|
| 1977 | return werror_to_ntstatus(r.out.result);
|
|---|
| 1978 | }
|
|---|
| 1979 |
|
|---|
| 1980 | NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli,
|
|---|
| 1981 | TALLOC_CTX *mem_ctx,
|
|---|
| 1982 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1983 | const char *computer_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 1984 | enum netr_LogonLevel logon_level /* [in] */,
|
|---|
| 1985 | union netr_LogonInfo *logon /* [in] [ref,switch_is(logon_level)] */,
|
|---|
| 1986 | uint16_t validation_level /* [in] */,
|
|---|
| 1987 | union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
|
|---|
| 1988 | uint8_t *authoritative /* [out] [ref] */,
|
|---|
| 1989 | uint32_t *flags /* [in,out] [ref] */)
|
|---|
| 1990 | {
|
|---|
| 1991 | struct netr_LogonSamLogonEx r;
|
|---|
| 1992 | NTSTATUS status;
|
|---|
| 1993 |
|
|---|
| 1994 | /* In parameters */
|
|---|
| 1995 | r.in.server_name = server_name;
|
|---|
| 1996 | r.in.computer_name = computer_name;
|
|---|
| 1997 | r.in.logon_level = logon_level;
|
|---|
| 1998 | r.in.logon = logon;
|
|---|
| 1999 | r.in.validation_level = validation_level;
|
|---|
| 2000 | r.in.flags = flags;
|
|---|
| 2001 |
|
|---|
| 2002 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2003 | NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx, &r);
|
|---|
| 2004 | }
|
|---|
| 2005 |
|
|---|
| 2006 | status = cli_do_rpc_ndr(cli,
|
|---|
| 2007 | mem_ctx,
|
|---|
| 2008 | PI_NETLOGON,
|
|---|
| 2009 | &ndr_table_netlogon,
|
|---|
| 2010 | NDR_NETR_LOGONSAMLOGONEX,
|
|---|
| 2011 | &r);
|
|---|
| 2012 |
|
|---|
| 2013 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 2014 | return status;
|
|---|
| 2015 | }
|
|---|
| 2016 |
|
|---|
| 2017 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2018 | NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, &r);
|
|---|
| 2019 | }
|
|---|
| 2020 |
|
|---|
| 2021 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 2022 | return status;
|
|---|
| 2023 | }
|
|---|
| 2024 |
|
|---|
| 2025 | /* Return variables */
|
|---|
| 2026 | *validation = *r.out.validation;
|
|---|
| 2027 | *authoritative = *r.out.authoritative;
|
|---|
| 2028 | *flags = *r.out.flags;
|
|---|
| 2029 |
|
|---|
| 2030 | /* Return result */
|
|---|
| 2031 | return r.out.result;
|
|---|
| 2032 | }
|
|---|
| 2033 |
|
|---|
| 2034 | NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli,
|
|---|
| 2035 | TALLOC_CTX *mem_ctx,
|
|---|
| 2036 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 2037 | uint32_t trust_flags /* [in] */,
|
|---|
| 2038 | struct netr_DomainTrustList *trusts /* [out] [ref] */,
|
|---|
| 2039 | WERROR *werror)
|
|---|
| 2040 | {
|
|---|
| 2041 | struct netr_DsrEnumerateDomainTrusts r;
|
|---|
| 2042 | NTSTATUS status;
|
|---|
| 2043 |
|
|---|
| 2044 | /* In parameters */
|
|---|
| 2045 | r.in.server_name = server_name;
|
|---|
| 2046 | r.in.trust_flags = trust_flags;
|
|---|
| 2047 |
|
|---|
| 2048 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2049 | NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts, &r);
|
|---|
| 2050 | }
|
|---|
| 2051 |
|
|---|
| 2052 | status = cli_do_rpc_ndr(cli,
|
|---|
| 2053 | mem_ctx,
|
|---|
| 2054 | PI_NETLOGON,
|
|---|
| 2055 | &ndr_table_netlogon,
|
|---|
| 2056 | NDR_NETR_DSRENUMERATEDOMAINTRUSTS,
|
|---|
| 2057 | &r);
|
|---|
| 2058 |
|
|---|
| 2059 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 2060 | return status;
|
|---|
| 2061 | }
|
|---|
| 2062 |
|
|---|
| 2063 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2064 | NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, &r);
|
|---|
| 2065 | }
|
|---|
| 2066 |
|
|---|
| 2067 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 2068 | return status;
|
|---|
| 2069 | }
|
|---|
| 2070 |
|
|---|
| 2071 | /* Return variables */
|
|---|
| 2072 | *trusts = *r.out.trusts;
|
|---|
| 2073 |
|
|---|
| 2074 | /* Return result */
|
|---|
| 2075 | if (werror) {
|
|---|
| 2076 | *werror = r.out.result;
|
|---|
| 2077 | }
|
|---|
| 2078 |
|
|---|
| 2079 | return werror_to_ntstatus(r.out.result);
|
|---|
| 2080 | }
|
|---|
| 2081 |
|
|---|
| 2082 | NTSTATUS rpccli_netr_DsrDeregisterDNSHostRecords(struct rpc_pipe_client *cli,
|
|---|
| 2083 | TALLOC_CTX *mem_ctx,
|
|---|
| 2084 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 2085 | const char *domain /* [in] [unique,charset(UTF16)] */,
|
|---|
| 2086 | struct GUID *domain_guid /* [in] [unique] */,
|
|---|
| 2087 | struct GUID *dsa_guid /* [in] [unique] */,
|
|---|
| 2088 | const char *dns_host /* [in] [ref,charset(UTF16)] */,
|
|---|
| 2089 | WERROR *werror)
|
|---|
| 2090 | {
|
|---|
| 2091 | struct netr_DsrDeregisterDNSHostRecords r;
|
|---|
| 2092 | NTSTATUS status;
|
|---|
| 2093 |
|
|---|
| 2094 | /* In parameters */
|
|---|
| 2095 | r.in.server_name = server_name;
|
|---|
| 2096 | r.in.domain = domain;
|
|---|
| 2097 | r.in.domain_guid = domain_guid;
|
|---|
| 2098 | r.in.dsa_guid = dsa_guid;
|
|---|
| 2099 | r.in.dns_host = dns_host;
|
|---|
| 2100 |
|
|---|
| 2101 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2102 | NDR_PRINT_IN_DEBUG(netr_DsrDeregisterDNSHostRecords, &r);
|
|---|
| 2103 | }
|
|---|
| 2104 |
|
|---|
| 2105 | status = cli_do_rpc_ndr(cli,
|
|---|
| 2106 | mem_ctx,
|
|---|
| 2107 | PI_NETLOGON,
|
|---|
| 2108 | &ndr_table_netlogon,
|
|---|
| 2109 | NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS,
|
|---|
| 2110 | &r);
|
|---|
| 2111 |
|
|---|
| 2112 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 2113 | return status;
|
|---|
| 2114 | }
|
|---|
| 2115 |
|
|---|
| 2116 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2117 | NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords, &r);
|
|---|
| 2118 | }
|
|---|
| 2119 |
|
|---|
| 2120 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 2121 | return status;
|
|---|
| 2122 | }
|
|---|
| 2123 |
|
|---|
| 2124 | /* Return variables */
|
|---|
| 2125 |
|
|---|
| 2126 | /* Return result */
|
|---|
| 2127 | if (werror) {
|
|---|
| 2128 | *werror = r.out.result;
|
|---|
| 2129 | }
|
|---|
| 2130 |
|
|---|
| 2131 | return werror_to_ntstatus(r.out.result);
|
|---|
| 2132 | }
|
|---|
| 2133 |
|
|---|
| 2134 | NTSTATUS rpccli_netr_ServerTrustPasswordsGet(struct rpc_pipe_client *cli,
|
|---|
| 2135 | TALLOC_CTX *mem_ctx,
|
|---|
| 2136 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 2137 | const char *account_name /* [in] [charset(UTF16)] */,
|
|---|
| 2138 | enum netr_SchannelType secure_channel_type /* [in] */,
|
|---|
| 2139 | const char *computer_name /* [in] [charset(UTF16)] */,
|
|---|
| 2140 | struct netr_Authenticator *credential /* [in] [ref] */,
|
|---|
| 2141 | struct netr_Authenticator *return_authenticator /* [out] [ref] */,
|
|---|
| 2142 | struct samr_Password *password /* [out] [ref] */,
|
|---|
| 2143 | struct samr_Password *password2 /* [out] [ref] */)
|
|---|
| 2144 | {
|
|---|
| 2145 | struct netr_ServerTrustPasswordsGet r;
|
|---|
| 2146 | NTSTATUS status;
|
|---|
| 2147 |
|
|---|
| 2148 | /* In parameters */
|
|---|
| 2149 | r.in.server_name = server_name;
|
|---|
| 2150 | r.in.account_name = account_name;
|
|---|
| 2151 | r.in.secure_channel_type = secure_channel_type;
|
|---|
| 2152 | r.in.computer_name = computer_name;
|
|---|
| 2153 | r.in.credential = credential;
|
|---|
| 2154 |
|
|---|
| 2155 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2156 | NDR_PRINT_IN_DEBUG(netr_ServerTrustPasswordsGet, &r);
|
|---|
| 2157 | }
|
|---|
| 2158 |
|
|---|
| 2159 | status = cli_do_rpc_ndr(cli,
|
|---|
| 2160 | mem_ctx,
|
|---|
| 2161 | PI_NETLOGON,
|
|---|
| 2162 | &ndr_table_netlogon,
|
|---|
| 2163 | NDR_NETR_SERVERTRUSTPASSWORDSGET,
|
|---|
| 2164 | &r);
|
|---|
| 2165 |
|
|---|
| 2166 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 2167 | return status;
|
|---|
| 2168 | }
|
|---|
| 2169 |
|
|---|
| 2170 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2171 | NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, &r);
|
|---|
| 2172 | }
|
|---|
| 2173 |
|
|---|
| 2174 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 2175 | return status;
|
|---|
| 2176 | }
|
|---|
| 2177 |
|
|---|
| 2178 | /* Return variables */
|
|---|
| 2179 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 2180 | *password = *r.out.password;
|
|---|
| 2181 | *password2 = *r.out.password2;
|
|---|
| 2182 |
|
|---|
| 2183 | /* Return result */
|
|---|
| 2184 | return r.out.result;
|
|---|
| 2185 | }
|
|---|
| 2186 |
|
|---|
| 2187 | NTSTATUS rpccli_netr_DsRGetForestTrustInformation(struct rpc_pipe_client *cli,
|
|---|
| 2188 | TALLOC_CTX *mem_ctx,
|
|---|
| 2189 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 2190 | const char *trusted_domain_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 2191 | uint32_t flags /* [in] */,
|
|---|
| 2192 | struct lsa_ForestTrustInformation **forest_trust_info /* [out] [ref] */,
|
|---|
| 2193 | WERROR *werror)
|
|---|
| 2194 | {
|
|---|
| 2195 | struct netr_DsRGetForestTrustInformation r;
|
|---|
| 2196 | NTSTATUS status;
|
|---|
| 2197 |
|
|---|
| 2198 | /* In parameters */
|
|---|
| 2199 | r.in.server_name = server_name;
|
|---|
| 2200 | r.in.trusted_domain_name = trusted_domain_name;
|
|---|
| 2201 | r.in.flags = flags;
|
|---|
| 2202 |
|
|---|
| 2203 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2204 | NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation, &r);
|
|---|
| 2205 | }
|
|---|
| 2206 |
|
|---|
| 2207 | status = cli_do_rpc_ndr(cli,
|
|---|
| 2208 | mem_ctx,
|
|---|
| 2209 | PI_NETLOGON,
|
|---|
| 2210 | &ndr_table_netlogon,
|
|---|
| 2211 | NDR_NETR_DSRGETFORESTTRUSTINFORMATION,
|
|---|
| 2212 | &r);
|
|---|
| 2213 |
|
|---|
| 2214 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 2215 | return status;
|
|---|
| 2216 | }
|
|---|
| 2217 |
|
|---|
| 2218 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2219 | NDR_PRINT_OUT_DEBUG(netr_DsRGetForestTrustInformation, &r);
|
|---|
| 2220 | }
|
|---|
| 2221 |
|
|---|
| 2222 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 2223 | return status;
|
|---|
| 2224 | }
|
|---|
| 2225 |
|
|---|
| 2226 | /* Return variables */
|
|---|
| 2227 | *forest_trust_info = *r.out.forest_trust_info;
|
|---|
| 2228 |
|
|---|
| 2229 | /* Return result */
|
|---|
| 2230 | if (werror) {
|
|---|
| 2231 | *werror = r.out.result;
|
|---|
| 2232 | }
|
|---|
| 2233 |
|
|---|
| 2234 | return werror_to_ntstatus(r.out.result);
|
|---|
| 2235 | }
|
|---|
| 2236 |
|
|---|
| 2237 | NTSTATUS rpccli_netr_GetForestTrustInformation(struct rpc_pipe_client *cli,
|
|---|
| 2238 | TALLOC_CTX *mem_ctx,
|
|---|
| 2239 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 2240 | const char *trusted_domain_name /* [in] [ref,charset(UTF16)] */,
|
|---|
| 2241 | struct netr_Authenticator *credential /* [in] [ref] */,
|
|---|
| 2242 | struct netr_Authenticator *return_authenticator /* [out] [ref] */,
|
|---|
| 2243 | uint32_t flags /* [in] */,
|
|---|
| 2244 | struct lsa_ForestTrustInformation **forest_trust_info /* [out] [ref] */,
|
|---|
| 2245 | WERROR *werror)
|
|---|
| 2246 | {
|
|---|
| 2247 | struct netr_GetForestTrustInformation r;
|
|---|
| 2248 | NTSTATUS status;
|
|---|
| 2249 |
|
|---|
| 2250 | /* In parameters */
|
|---|
| 2251 | r.in.server_name = server_name;
|
|---|
| 2252 | r.in.trusted_domain_name = trusted_domain_name;
|
|---|
| 2253 | r.in.credential = credential;
|
|---|
| 2254 | r.in.flags = flags;
|
|---|
| 2255 |
|
|---|
| 2256 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2257 | NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation, &r);
|
|---|
| 2258 | }
|
|---|
| 2259 |
|
|---|
| 2260 | status = cli_do_rpc_ndr(cli,
|
|---|
| 2261 | mem_ctx,
|
|---|
| 2262 | PI_NETLOGON,
|
|---|
| 2263 | &ndr_table_netlogon,
|
|---|
| 2264 | NDR_NETR_GETFORESTTRUSTINFORMATION,
|
|---|
| 2265 | &r);
|
|---|
| 2266 |
|
|---|
| 2267 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 2268 | return status;
|
|---|
| 2269 | }
|
|---|
| 2270 |
|
|---|
| 2271 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2272 | NDR_PRINT_OUT_DEBUG(netr_GetForestTrustInformation, &r);
|
|---|
| 2273 | }
|
|---|
| 2274 |
|
|---|
| 2275 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 2276 | return status;
|
|---|
| 2277 | }
|
|---|
| 2278 |
|
|---|
| 2279 | /* Return variables */
|
|---|
| 2280 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 2281 | *forest_trust_info = *r.out.forest_trust_info;
|
|---|
| 2282 |
|
|---|
| 2283 | /* Return result */
|
|---|
| 2284 | if (werror) {
|
|---|
| 2285 | *werror = r.out.result;
|
|---|
| 2286 | }
|
|---|
| 2287 |
|
|---|
| 2288 | return werror_to_ntstatus(r.out.result);
|
|---|
| 2289 | }
|
|---|
| 2290 |
|
|---|
| 2291 | NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli,
|
|---|
| 2292 | TALLOC_CTX *mem_ctx,
|
|---|
| 2293 | const char *server_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 2294 | const char *computer_name /* [in] [unique,charset(UTF16)] */,
|
|---|
| 2295 | struct netr_Authenticator *credential /* [in] [unique] */,
|
|---|
| 2296 | struct netr_Authenticator *return_authenticator /* [in,out] [unique] */,
|
|---|
| 2297 | enum netr_LogonLevel logon_level /* [in] */,
|
|---|
| 2298 | union netr_LogonInfo logon /* [in] [switch_is(logon_level)] */,
|
|---|
| 2299 | uint16_t validation_level /* [in] */,
|
|---|
| 2300 | union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */,
|
|---|
| 2301 | uint8_t *authoritative /* [out] [ref] */,
|
|---|
| 2302 | uint32_t *flags /* [in,out] [ref] */)
|
|---|
| 2303 | {
|
|---|
| 2304 | struct netr_LogonSamLogonWithFlags r;
|
|---|
| 2305 | NTSTATUS status;
|
|---|
| 2306 |
|
|---|
| 2307 | /* In parameters */
|
|---|
| 2308 | r.in.server_name = server_name;
|
|---|
| 2309 | r.in.computer_name = computer_name;
|
|---|
| 2310 | r.in.credential = credential;
|
|---|
| 2311 | r.in.return_authenticator = return_authenticator;
|
|---|
| 2312 | r.in.logon_level = logon_level;
|
|---|
| 2313 | r.in.logon = logon;
|
|---|
| 2314 | r.in.validation_level = validation_level;
|
|---|
| 2315 | r.in.flags = flags;
|
|---|
| 2316 |
|
|---|
| 2317 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2318 | NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags, &r);
|
|---|
| 2319 | }
|
|---|
| 2320 |
|
|---|
| 2321 | status = cli_do_rpc_ndr(cli,
|
|---|
| 2322 | mem_ctx,
|
|---|
| 2323 | PI_NETLOGON,
|
|---|
| 2324 | &ndr_table_netlogon,
|
|---|
| 2325 | NDR_NETR_LOGONSAMLOGONWITHFLAGS,
|
|---|
| 2326 | &r);
|
|---|
| 2327 |
|
|---|
| 2328 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 2329 | return status;
|
|---|
| 2330 | }
|
|---|
| 2331 |
|
|---|
| 2332 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2333 | NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, &r);
|
|---|
| 2334 | }
|
|---|
| 2335 |
|
|---|
| 2336 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 2337 | return status;
|
|---|
| 2338 | }
|
|---|
| 2339 |
|
|---|
| 2340 | /* Return variables */
|
|---|
| 2341 | if (return_authenticator && r.out.return_authenticator) {
|
|---|
| 2342 | *return_authenticator = *r.out.return_authenticator;
|
|---|
| 2343 | }
|
|---|
| 2344 | *validation = *r.out.validation;
|
|---|
| 2345 | *authoritative = *r.out.authoritative;
|
|---|
| 2346 | *flags = *r.out.flags;
|
|---|
| 2347 |
|
|---|
| 2348 | /* Return result */
|
|---|
| 2349 | return r.out.result;
|
|---|
| 2350 | }
|
|---|
| 2351 |
|
|---|
| 2352 | NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli,
|
|---|
| 2353 | TALLOC_CTX *mem_ctx,
|
|---|
| 2354 | WERROR *werror)
|
|---|
| 2355 | {
|
|---|
| 2356 | struct netr_NETRSERVERGETTRUSTINFO r;
|
|---|
| 2357 | NTSTATUS status;
|
|---|
| 2358 |
|
|---|
| 2359 | /* In parameters */
|
|---|
| 2360 |
|
|---|
| 2361 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2362 | NDR_PRINT_IN_DEBUG(netr_NETRSERVERGETTRUSTINFO, &r);
|
|---|
| 2363 | }
|
|---|
| 2364 |
|
|---|
| 2365 | status = cli_do_rpc_ndr(cli,
|
|---|
| 2366 | mem_ctx,
|
|---|
| 2367 | PI_NETLOGON,
|
|---|
| 2368 | &ndr_table_netlogon,
|
|---|
| 2369 | NDR_NETR_NETRSERVERGETTRUSTINFO,
|
|---|
| 2370 | &r);
|
|---|
| 2371 |
|
|---|
| 2372 | if (!NT_STATUS_IS_OK(status)) {
|
|---|
| 2373 | return status;
|
|---|
| 2374 | }
|
|---|
| 2375 |
|
|---|
| 2376 | if (DEBUGLEVEL >= 10) {
|
|---|
| 2377 | NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO, &r);
|
|---|
| 2378 | }
|
|---|
| 2379 |
|
|---|
| 2380 | if (NT_STATUS_IS_ERR(status)) {
|
|---|
| 2381 | return status;
|
|---|
| 2382 | }
|
|---|
| 2383 |
|
|---|
| 2384 | /* Return variables */
|
|---|
| 2385 |
|
|---|
| 2386 | /* Return result */
|
|---|
| 2387 | if (werror) {
|
|---|
| 2388 | *werror = r.out.result;
|
|---|
| 2389 | }
|
|---|
| 2390 |
|
|---|
| 2391 | return werror_to_ntstatus(r.out.result);
|
|---|
| 2392 | }
|
|---|
| 2393 |
|
|---|