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