diff options
-rw-r--r-- | librpc/gen_ndr/cli_lsa.c | 56 | ||||
-rw-r--r-- | librpc/gen_ndr/cli_lsa.h | 40 | ||||
-rw-r--r-- | librpc/gen_ndr/lsa.h | 46 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_lsa.c | 110 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_lsa.h | 2 | ||||
-rw-r--r-- | librpc/idl/lsa.idl | 30 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 4 | ||||
-rw-r--r-- | source4/rpc_server/lsa/lsa_lookup.c | 8 | ||||
-rw-r--r-- | source4/torture/rpc/lsa.c | 12 |
9 files changed, 198 insertions, 110 deletions
diff --git a/librpc/gen_ndr/cli_lsa.c b/librpc/gen_ndr/cli_lsa.c index cfaf7e50b5..0679912cb8 100644 --- a/librpc/gen_ndr/cli_lsa.c +++ b/librpc/gen_ndr/cli_lsa.c @@ -9367,8 +9367,8 @@ struct tevent_req *rpccli_lsa_LookupSids2_send(TALLOC_CTX *mem_ctx, struct lsa_TransNameArray2 *_names /* [in,out] [ref] */, enum lsa_LookupNamesLevel _level /* [in] */, uint32_t *_count /* [in,out] [ref] */, - uint32_t _unknown1 /* [in] */, - uint32_t _unknown2 /* [in] */) + enum lsa_LookupOptions _lookup_options /* [in] */, + enum lsa_ClientRevision _client_revision /* [in] */) { struct tevent_req *req; struct rpccli_lsa_LookupSids2_state *state; @@ -9388,8 +9388,8 @@ struct tevent_req *rpccli_lsa_LookupSids2_send(TALLOC_CTX *mem_ctx, state->orig.in.names = _names; state->orig.in.level = _level; state->orig.in.count = _count; - state->orig.in.unknown1 = _unknown1; - state->orig.in.unknown2 = _unknown2; + state->orig.in.lookup_options = _lookup_options; + state->orig.in.client_revision = _client_revision; /* Out parameters */ state->orig.out.domains = _domains; @@ -9494,8 +9494,8 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, struct lsa_TransNameArray2 *names /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t unknown1 /* [in] */, - uint32_t unknown2 /* [in] */) + enum lsa_LookupOptions lookup_options /* [in] */, + enum lsa_ClientRevision client_revision /* [in] */) { struct lsa_LookupSids2 r; NTSTATUS status; @@ -9506,8 +9506,8 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, r.in.names = names; r.in.level = level; r.in.count = count; - r.in.unknown1 = unknown1; - r.in.unknown2 = unknown2; + r.in.lookup_options = lookup_options; + r.in.client_revision = client_revision; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_LookupSids2, &r); @@ -9559,8 +9559,8 @@ struct tevent_req *rpccli_lsa_LookupNames2_send(TALLOC_CTX *mem_ctx, struct lsa_TransSidArray2 *_sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel _level /* [in] */, uint32_t *_count /* [in,out] [ref] */, - uint32_t _lookup_options /* [in] */, - uint32_t _client_revision /* [in] */) + enum lsa_LookupOptions _lookup_options /* [in] */, + enum lsa_ClientRevision _client_revision /* [in] */) { struct tevent_req *req; struct rpccli_lsa_LookupNames2_state *state; @@ -9688,8 +9688,8 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, struct lsa_TransSidArray2 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t lookup_options /* [in] */, - uint32_t client_revision /* [in] */) + enum lsa_LookupOptions lookup_options /* [in] */, + enum lsa_ClientRevision client_revision /* [in] */) { struct lsa_LookupNames2 r; NTSTATUS status; @@ -11095,8 +11095,8 @@ struct tevent_req *rpccli_lsa_LookupNames3_send(TALLOC_CTX *mem_ctx, struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel _level /* [in] */, uint32_t *_count /* [in,out] [ref] */, - uint32_t _lookup_options /* [in] */, - uint32_t _client_revision /* [in] */) + enum lsa_LookupOptions _lookup_options /* [in] */, + enum lsa_ClientRevision _client_revision /* [in] */) { struct tevent_req *req; struct rpccli_lsa_LookupNames3_state *state; @@ -11224,8 +11224,8 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, struct lsa_TransSidArray3 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t lookup_options /* [in] */, - uint32_t client_revision /* [in] */) + enum lsa_LookupOptions lookup_options /* [in] */, + enum lsa_ClientRevision client_revision /* [in] */) { struct lsa_LookupNames3 r; NTSTATUS status; @@ -12333,8 +12333,8 @@ struct tevent_req *rpccli_lsa_LookupSids3_send(TALLOC_CTX *mem_ctx, struct lsa_TransNameArray2 *_names /* [in,out] [ref] */, enum lsa_LookupNamesLevel _level /* [in] */, uint32_t *_count /* [in,out] [ref] */, - uint32_t _unknown1 /* [in] */, - uint32_t _unknown2 /* [in] */) + enum lsa_LookupOptions _lookup_options /* [in] */, + enum lsa_ClientRevision _client_revision /* [in] */) { struct tevent_req *req; struct rpccli_lsa_LookupSids3_state *state; @@ -12353,8 +12353,8 @@ struct tevent_req *rpccli_lsa_LookupSids3_send(TALLOC_CTX *mem_ctx, state->orig.in.names = _names; state->orig.in.level = _level; state->orig.in.count = _count; - state->orig.in.unknown1 = _unknown1; - state->orig.in.unknown2 = _unknown2; + state->orig.in.lookup_options = _lookup_options; + state->orig.in.client_revision = _client_revision; /* Out parameters */ state->orig.out.domains = _domains; @@ -12458,8 +12458,8 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, struct lsa_TransNameArray2 *names /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t unknown1 /* [in] */, - uint32_t unknown2 /* [in] */) + enum lsa_LookupOptions lookup_options /* [in] */, + enum lsa_ClientRevision client_revision /* [in] */) { struct lsa_LookupSids3 r; NTSTATUS status; @@ -12469,8 +12469,8 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, r.in.names = names; r.in.level = level; r.in.count = count; - r.in.unknown1 = unknown1; - r.in.unknown2 = unknown2; + r.in.lookup_options = lookup_options; + r.in.client_revision = client_revision; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(lsa_LookupSids3, &r); @@ -12521,8 +12521,8 @@ struct tevent_req *rpccli_lsa_LookupNames4_send(TALLOC_CTX *mem_ctx, struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel _level /* [in] */, uint32_t *_count /* [in,out] [ref] */, - uint32_t _lookup_options /* [in] */, - uint32_t _client_revision /* [in] */) + enum lsa_LookupOptions _lookup_options /* [in] */, + enum lsa_ClientRevision _client_revision /* [in] */) { struct tevent_req *req; struct rpccli_lsa_LookupNames4_state *state; @@ -12648,8 +12648,8 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, struct lsa_TransSidArray3 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t lookup_options /* [in] */, - uint32_t client_revision /* [in] */) + enum lsa_LookupOptions lookup_options /* [in] */, + enum lsa_ClientRevision client_revision /* [in] */) { struct lsa_LookupNames4 r; NTSTATUS status; diff --git a/librpc/gen_ndr/cli_lsa.h b/librpc/gen_ndr/cli_lsa.h index a7eed18911..d49c0ff155 100644 --- a/librpc/gen_ndr/cli_lsa.h +++ b/librpc/gen_ndr/cli_lsa.h @@ -816,8 +816,8 @@ struct tevent_req *rpccli_lsa_LookupSids2_send(TALLOC_CTX *mem_ctx, struct lsa_TransNameArray2 *_names /* [in,out] [ref] */, enum lsa_LookupNamesLevel _level /* [in] */, uint32_t *_count /* [in,out] [ref] */, - uint32_t _unknown1 /* [in] */, - uint32_t _unknown2 /* [in] */); + enum lsa_LookupOptions _lookup_options /* [in] */, + enum lsa_ClientRevision _client_revision /* [in] */); NTSTATUS rpccli_lsa_LookupSids2_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, NTSTATUS *result); @@ -829,8 +829,8 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, struct lsa_TransNameArray2 *names /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t unknown1 /* [in] */, - uint32_t unknown2 /* [in] */); + enum lsa_LookupOptions lookup_options /* [in] */, + enum lsa_ClientRevision client_revision /* [in] */); struct tevent_req *rpccli_lsa_LookupNames2_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct rpc_pipe_client *cli, @@ -841,8 +841,8 @@ struct tevent_req *rpccli_lsa_LookupNames2_send(TALLOC_CTX *mem_ctx, struct lsa_TransSidArray2 *_sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel _level /* [in] */, uint32_t *_count /* [in,out] [ref] */, - uint32_t _lookup_options /* [in] */, - uint32_t _client_revision /* [in] */); + enum lsa_LookupOptions _lookup_options /* [in] */, + enum lsa_ClientRevision _client_revision /* [in] */); NTSTATUS rpccli_lsa_LookupNames2_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, NTSTATUS *result); @@ -855,8 +855,8 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, struct lsa_TransSidArray2 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t lookup_options /* [in] */, - uint32_t client_revision /* [in] */); + enum lsa_LookupOptions lookup_options /* [in] */, + enum lsa_ClientRevision client_revision /* [in] */); struct tevent_req *rpccli_lsa_CreateTrustedDomainEx2_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct rpc_pipe_client *cli, @@ -949,8 +949,8 @@ struct tevent_req *rpccli_lsa_LookupNames3_send(TALLOC_CTX *mem_ctx, struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel _level /* [in] */, uint32_t *_count /* [in,out] [ref] */, - uint32_t _lookup_options /* [in] */, - uint32_t _client_revision /* [in] */); + enum lsa_LookupOptions _lookup_options /* [in] */, + enum lsa_ClientRevision _client_revision /* [in] */); NTSTATUS rpccli_lsa_LookupNames3_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, NTSTATUS *result); @@ -963,8 +963,8 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, struct lsa_TransSidArray3 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t lookup_options /* [in] */, - uint32_t client_revision /* [in] */); + enum lsa_LookupOptions lookup_options /* [in] */, + enum lsa_ClientRevision client_revision /* [in] */); struct tevent_req *rpccli_lsa_CREDRGETSESSIONTYPES_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct rpc_pipe_client *cli); @@ -1037,8 +1037,8 @@ struct tevent_req *rpccli_lsa_LookupSids3_send(TALLOC_CTX *mem_ctx, struct lsa_TransNameArray2 *_names /* [in,out] [ref] */, enum lsa_LookupNamesLevel _level /* [in] */, uint32_t *_count /* [in,out] [ref] */, - uint32_t _unknown1 /* [in] */, - uint32_t _unknown2 /* [in] */); + enum lsa_LookupOptions _lookup_options /* [in] */, + enum lsa_ClientRevision _client_revision /* [in] */); NTSTATUS rpccli_lsa_LookupSids3_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, NTSTATUS *result); @@ -1049,8 +1049,8 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, struct lsa_TransNameArray2 *names /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t unknown1 /* [in] */, - uint32_t unknown2 /* [in] */); + enum lsa_LookupOptions lookup_options /* [in] */, + enum lsa_ClientRevision client_revision /* [in] */); struct tevent_req *rpccli_lsa_LookupNames4_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct rpc_pipe_client *cli, @@ -1060,8 +1060,8 @@ struct tevent_req *rpccli_lsa_LookupNames4_send(TALLOC_CTX *mem_ctx, struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel _level /* [in] */, uint32_t *_count /* [in,out] [ref] */, - uint32_t _lookup_options /* [in] */, - uint32_t _client_revision /* [in] */); + enum lsa_LookupOptions _lookup_options /* [in] */, + enum lsa_ClientRevision _client_revision /* [in] */); NTSTATUS rpccli_lsa_LookupNames4_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, NTSTATUS *result); @@ -1073,8 +1073,8 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, struct lsa_TransSidArray3 *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */, - uint32_t lookup_options /* [in] */, - uint32_t client_revision /* [in] */); + enum lsa_LookupOptions lookup_options /* [in] */, + enum lsa_ClientRevision client_revision /* [in] */); struct tevent_req *rpccli_lsa_LSAROPENPOLICYSCE_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct rpc_pipe_client *cli); diff --git a/librpc/gen_ndr/lsa.h b/librpc/gen_ndr/lsa.h index ed0982b102..a47259145b 100644 --- a/librpc/gen_ndr/lsa.h +++ b/librpc/gen_ndr/lsa.h @@ -668,6 +668,32 @@ struct lsa_TransNameArray2 { struct lsa_TranslatedName2 *names;/* [unique,size_is(count)] */ }; +enum lsa_LookupOptions +#ifndef USE_UINT_ENUMS + { + LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES=0x00000000, + LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL=0x80000000 +} +#else + { __donnot_use_enum_lsa_LookupOptions=0x7FFFFFFF} +#define LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES ( 0x00000000 ) +#define LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL ( 0x80000000 ) +#endif +; + +enum lsa_ClientRevision +#ifndef USE_UINT_ENUMS + { + LSA_CLIENT_REVISION_1=0x00000001, + LSA_CLIENT_REVISION_2=0x00000002 +} +#else + { __donnot_use_enum_lsa_ClientRevision=0x7FFFFFFF} +#define LSA_CLIENT_REVISION_1 ( 0x00000001 ) +#define LSA_CLIENT_REVISION_2 ( 0x00000002 ) +#endif +; + struct lsa_TranslatedSid2 { enum lsa_SidType sid_type; uint32_t rid; @@ -1550,8 +1576,8 @@ struct lsa_LookupSids2 { struct policy_handle *handle;/* [ref] */ struct lsa_SidArray *sids;/* [ref] */ enum lsa_LookupNamesLevel level; - uint32_t unknown1; - uint32_t unknown2; + enum lsa_LookupOptions lookup_options; + enum lsa_ClientRevision client_revision; struct lsa_TransNameArray2 *names;/* [ref] */ uint32_t *count;/* [ref] */ } in; @@ -1572,8 +1598,8 @@ struct lsa_LookupNames2 { uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ enum lsa_LookupNamesLevel level; - uint32_t lookup_options; - uint32_t client_revision; + enum lsa_LookupOptions lookup_options; + enum lsa_ClientRevision client_revision; struct lsa_TransSidArray2 *sids;/* [ref] */ uint32_t *count;/* [ref] */ } in; @@ -1674,8 +1700,8 @@ struct lsa_LookupNames3 { uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ enum lsa_LookupNamesLevel level; - uint32_t lookup_options; - uint32_t client_revision; + enum lsa_LookupOptions lookup_options; + enum lsa_ClientRevision client_revision; struct lsa_TransSidArray3 *sids;/* [ref] */ uint32_t *count;/* [ref] */ } in; @@ -1757,8 +1783,8 @@ struct lsa_LookupSids3 { struct { struct lsa_SidArray *sids;/* [ref] */ enum lsa_LookupNamesLevel level; - uint32_t unknown1; - uint32_t unknown2; + enum lsa_LookupOptions lookup_options; + enum lsa_ClientRevision client_revision; struct lsa_TransNameArray2 *names;/* [ref] */ uint32_t *count;/* [ref] */ } in; @@ -1778,8 +1804,8 @@ struct lsa_LookupNames4 { uint32_t num_names;/* [range(0,1000)] */ struct lsa_String *names;/* [size_is(num_names)] */ enum lsa_LookupNamesLevel level; - uint32_t lookup_options; - uint32_t client_revision; + enum lsa_LookupOptions lookup_options; + enum lsa_ClientRevision client_revision; struct lsa_TransSidArray3 *sids;/* [ref] */ uint32_t *count;/* [ref] */ } in; diff --git a/librpc/gen_ndr/ndr_lsa.c b/librpc/gen_ndr/ndr_lsa.c index c3c67ea977..fa8151c852 100644 --- a/librpc/gen_ndr/ndr_lsa.c +++ b/librpc/gen_ndr/ndr_lsa.c @@ -4473,6 +4473,56 @@ _PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *n ndr->depth--; } +static enum ndr_err_code ndr_push_lsa_LookupOptions(struct ndr_push *ndr, int ndr_flags, enum lsa_LookupOptions r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_LookupOptions(struct ndr_pull *ndr, int ndr_flags, enum lsa_LookupOptions *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_LookupOptions(struct ndr_print *ndr, const char *name, enum lsa_LookupOptions r) +{ + const char *val = NULL; + + switch (r) { + case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES: val = "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES"; break; + case LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL: val = "LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_lsa_ClientRevision(struct ndr_push *ndr, int ndr_flags, enum lsa_ClientRevision r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_lsa_ClientRevision(struct ndr_pull *ndr, int ndr_flags, enum lsa_ClientRevision *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_lsa_ClientRevision(struct ndr_print *ndr, const char *name, enum lsa_ClientRevision r) +{ + const char *val = NULL; + + switch (r) { + case LSA_CLIENT_REVISION_1: val = "LSA_CLIENT_REVISION_1"; break; + case LSA_CLIENT_REVISION_2: val = "LSA_CLIENT_REVISION_2"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + static enum ndr_err_code ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid2 *r) { if (ndr_flags & NDR_SCALARS) { @@ -10843,8 +10893,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int fl return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); + NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options)); + NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision)); } if (flags & NDR_OUT) { if (r->out.domains == NULL) { @@ -10908,8 +10958,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int fl NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options)); + NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision)); NDR_PULL_ALLOC(ndr, r->out.domains); ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.names); @@ -10982,8 +11032,8 @@ _PUBLIC_ void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); ndr->depth--; - ndr_print_uint32(ndr, "unknown1", r->in.unknown1); - ndr_print_uint32(ndr, "unknown2", r->in.unknown2); + ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options); + ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision); ndr->depth--; } if (flags & NDR_OUT) { @@ -11037,8 +11087,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int f return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision)); + NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options)); + NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision)); } if (flags & NDR_OUT) { if (r->out.domains == NULL) { @@ -11111,8 +11161,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision)); + NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options)); + NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision)); NDR_PULL_ALLOC(ndr, r->out.domains); ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.sids); @@ -11196,8 +11246,8 @@ _PUBLIC_ void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); ndr->depth--; - ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options); - ndr_print_uint32(ndr, "client_revision", r->in.client_revision); + ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options); + ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision); ndr->depth--; } if (flags & NDR_OUT) { @@ -11691,8 +11741,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int f return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision)); + NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options)); + NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision)); } if (flags & NDR_OUT) { if (r->out.domains == NULL) { @@ -11765,8 +11815,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision)); + NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options)); + NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision)); NDR_PULL_ALLOC(ndr, r->out.domains); ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.sids); @@ -11850,8 +11900,8 @@ _PUBLIC_ void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); ndr->depth--; - ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options); - ndr_print_uint32(ndr, "client_revision", r->in.client_revision); + ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options); + ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision); ndr->depth--; } if (flags & NDR_OUT) { @@ -12259,8 +12309,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int fl return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2)); + NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options)); + NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision)); } if (flags & NDR_OUT) { if (r->out.domains == NULL) { @@ -12316,8 +12366,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int fl NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2)); + NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options)); + NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision)); NDR_PULL_ALLOC(ndr, r->out.domains); ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.names); @@ -12386,8 +12436,8 @@ _PUBLIC_ void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); ndr->depth--; - ndr_print_uint32(ndr, "unknown1", r->in.unknown1); - ndr_print_uint32(ndr, "unknown2", r->in.unknown2); + ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options); + ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision); ndr->depth--; } if (flags & NDR_OUT) { @@ -12437,8 +12487,8 @@ static enum ndr_err_code ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int fla return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.lookup_options)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_revision)); + NDR_CHECK(ndr_push_lsa_LookupOptions(ndr, NDR_SCALARS, r->in.lookup_options)); + NDR_CHECK(ndr_push_lsa_ClientRevision(ndr, NDR_SCALARS, r->in.client_revision)); } if (flags & NDR_OUT) { if (r->out.domains == NULL) { @@ -12503,8 +12553,8 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.lookup_options)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_revision)); + NDR_CHECK(ndr_pull_lsa_LookupOptions(ndr, NDR_SCALARS, &r->in.lookup_options)); + NDR_CHECK(ndr_pull_lsa_ClientRevision(ndr, NDR_SCALARS, &r->in.client_revision)); NDR_PULL_ALLOC(ndr, r->out.domains); ZERO_STRUCTP(r->out.domains); NDR_PULL_ALLOC(ndr, r->out.sids); @@ -12584,8 +12634,8 @@ _PUBLIC_ void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_uint32(ndr, "count", *r->in.count); ndr->depth--; - ndr_print_uint32(ndr, "lookup_options", r->in.lookup_options); - ndr_print_uint32(ndr, "client_revision", r->in.client_revision); + ndr_print_lsa_LookupOptions(ndr, "lookup_options", r->in.lookup_options); + ndr_print_lsa_ClientRevision(ndr, "client_revision", r->in.client_revision); ndr->depth--; } if (flags & NDR_OUT) { diff --git a/librpc/gen_ndr/ndr_lsa.h b/librpc/gen_ndr/ndr_lsa.h index cc7ade57bc..cb7628a1fb 100644 --- a/librpc/gen_ndr/ndr_lsa.h +++ b/librpc/gen_ndr/ndr_lsa.h @@ -278,6 +278,8 @@ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r); void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r); void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r); +void ndr_print_lsa_LookupOptions(struct ndr_print *ndr, const char *name, enum lsa_LookupOptions r); +void ndr_print_lsa_ClientRevision(struct ndr_print *ndr, const char *name, enum lsa_ClientRevision r); void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r); void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r); void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r); diff --git a/librpc/idl/lsa.idl b/librpc/idl/lsa.idl index 329a477cf6..253b6d780c 100644 --- a/librpc/idl/lsa.idl +++ b/librpc/idl/lsa.idl @@ -1099,6 +1099,16 @@ import "misc.idl", "security.idl"; [size_is(count)] lsa_TranslatedName2 *names; } lsa_TransNameArray2; + typedef [v1_enum] enum { + LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES = 0x00000000, + LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL = 0x80000000 + } lsa_LookupOptions; + + typedef [v1_enum] enum { + LSA_CLIENT_REVISION_1 = 0x00000001, + LSA_CLIENT_REVISION_2 = 0x00000002 + } lsa_ClientRevision; + [public] NTSTATUS lsa_LookupSids2( [in] policy_handle *handle, [in,ref] lsa_SidArray *sids, @@ -1106,8 +1116,8 @@ import "misc.idl", "security.idl"; [in,out,ref] lsa_TransNameArray2 *names, [in] lsa_LookupNamesLevel level, [in,out,ref] uint32 *count, - [in] uint32 unknown1, - [in] uint32 unknown2 + [in] lsa_LookupOptions lookup_options, + [in] lsa_ClientRevision client_revision ); /**********************/ @@ -1133,8 +1143,8 @@ import "misc.idl", "security.idl"; [in,out,ref] lsa_TransSidArray2 *sids, [in] lsa_LookupNamesLevel level, [in,out,ref] uint32 *count, - [in] uint32 lookup_options, - [in] uint32 client_revision /* LSA_CLIENT_REVISION* */ + [in] lsa_LookupOptions lookup_options, + [in] lsa_ClientRevision client_revision ); /* Function 0x3b */ @@ -1192,8 +1202,8 @@ import "misc.idl", "security.idl"; [in,out,ref] lsa_TransSidArray3 *sids, [in] lsa_LookupNamesLevel level, [in,out,ref] uint32 *count, - [in] uint32 lookup_options, - [in] uint32 client_revision /* LSA_CLIENT_REVISION* */ + [in] lsa_LookupOptions lookup_options, + [in] lsa_ClientRevision client_revision ); /* Function 0x45 */ @@ -1268,8 +1278,8 @@ import "misc.idl", "security.idl"; [in,out,ref] lsa_TransNameArray2 *names, [in] lsa_LookupNamesLevel level, [in,out,ref] uint32 *count, - [in] uint32 unknown1, - [in] uint32 unknown2 + [in] lsa_LookupOptions lookup_options, + [in] lsa_ClientRevision client_revision ); const int LSA_CLIENT_REVISION_NO_DNS = 0x00000001; @@ -1285,8 +1295,8 @@ import "misc.idl", "security.idl"; [in,out,ref] lsa_TransSidArray3 *sids, [in] lsa_LookupNamesLevel level, [in,out,ref] uint32 *count, - [in] uint32 lookup_options, - [in] uint32 client_revision /* LSA_CLIENT_REVISION* */ + [in] lsa_LookupOptions lookup_options, + [in] lsa_ClientRevision client_revision ); /* Function 0x4e */ diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 054a09f834..cc5d23ce71 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -1001,8 +1001,8 @@ NTSTATUS _lsa_LookupSids3(pipes_struct *p, q.in.handle = NULL; q.in.sids = r->in.sids; q.in.level = r->in.level; - q.in.unknown1 = r->in.unknown1; - q.in.unknown2 = r->in.unknown2; + q.in.lookup_options = r->in.lookup_options; + q.in.client_revision = r->in.client_revision; q.in.names = r->in.names; q.in.count = r->in.count; diff --git a/source4/rpc_server/lsa/lsa_lookup.c b/source4/rpc_server/lsa/lsa_lookup.c index 005c7d4f06..fc45c8bc0f 100644 --- a/source4/rpc_server/lsa/lsa_lookup.c +++ b/source4/rpc_server/lsa/lsa_lookup.c @@ -658,8 +658,8 @@ NTSTATUS dcesrv_lsa_LookupSids3(struct dcesrv_call_state *dce_call, r2.in.names = r->in.names; r2.in.level = r->in.level; r2.in.count = r->in.count; - r2.in.unknown1 = r->in.unknown1; - r2.in.unknown2 = r->in.unknown2; + r2.in.lookup_options = r->in.lookup_options; + r2.in.client_revision = r->in.client_revision; r2.out.count = r->out.count; r2.out.names = r->out.names; r2.out.domains = r->out.domains; @@ -691,8 +691,8 @@ NTSTATUS dcesrv_lsa_LookupSids(struct dcesrv_call_state *dce_call, TALLOC_CTX *m r2.in.names = NULL; r2.in.level = r->in.level; r2.in.count = r->in.count; - r2.in.unknown1 = 0; - r2.in.unknown2 = 0; + r2.in.lookup_options = 0; + r2.in.client_revision = 0; r2.out.count = r->out.count; r2.out.names = NULL; r2.out.domains = r->out.domains; diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index b45b565452..e4234c7f47 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -543,8 +543,8 @@ static bool test_LookupSids2(struct dcerpc_pipe *p, r.in.names = &names; r.in.level = 1; r.in.count = &count; - r.in.unknown1 = 0; - r.in.unknown2 = 0; + r.in.lookup_options = 0; + r.in.client_revision = 0; r.out.count = &count; r.out.names = &names; r.out.domains = &domains; @@ -587,8 +587,8 @@ static bool test_LookupSids3(struct dcerpc_pipe *p, r.in.names = &names; r.in.level = 1; r.in.count = &count; - r.in.unknown1 = 0; - r.in.unknown2 = 0; + r.in.lookup_options = 0; + r.in.client_revision = 0; r.out.domains = &domains; r.out.count = &count; r.out.names = &names; @@ -678,8 +678,8 @@ bool test_many_LookupSids(struct dcerpc_pipe *p, r.in.names = &names; r.in.level = 1; r.in.count = &count; - r.in.unknown1 = 0; - r.in.unknown2 = 0; + r.in.lookup_options = 0; + r.in.client_revision = 0; r.out.count = &count; r.out.names = &names; r.out.domains = &domains; |