summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.c8
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.h8
-rw-r--r--source3/librpc/gen_ndr/lsa.h12
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.c59
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.h1
5 files changed, 62 insertions, 26 deletions
diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c
index 4d81833fa1..92ba8bdfee 100644
--- a/source3/librpc/gen_ndr/cli_lsa.c
+++ b/source3/librpc/gen_ndr/cli_lsa.c
@@ -298,7 +298,7 @@ NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- uint16_t level,
+ enum lsa_PolicyInfo level,
union lsa_PolicyInformation *info)
{
struct lsa_QueryInfoPolicy r;
@@ -343,7 +343,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- uint16_t level,
+ enum lsa_PolicyInfo level,
union lsa_PolicyInformation *info)
{
struct lsa_SetInfoPolicy r;
@@ -1994,7 +1994,7 @@ NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- uint16_t level,
+ enum lsa_PolicyInfo level,
union lsa_PolicyInformation *info)
{
struct lsa_QueryInfoPolicy2 r;
@@ -2039,7 +2039,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- uint16_t level,
+ enum lsa_PolicyInfo level,
union lsa_PolicyInformation *info)
{
struct lsa_SetInfoPolicy2 r;
diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h
index 59c0b9293d..4ab8be9939 100644
--- a/source3/librpc/gen_ndr/cli_lsa.h
+++ b/source3/librpc/gen_ndr/cli_lsa.h
@@ -31,12 +31,12 @@ NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- uint16_t level,
+ enum lsa_PolicyInfo level,
union lsa_PolicyInformation *info);
NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- uint16_t level,
+ enum lsa_PolicyInfo level,
union lsa_PolicyInformation *info);
NTSTATUS rpccli_lsa_ClearAuditLog(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx);
@@ -215,12 +215,12 @@ NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- uint16_t level,
+ enum lsa_PolicyInfo level,
union lsa_PolicyInformation *info);
NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- uint16_t level,
+ enum lsa_PolicyInfo level,
union lsa_PolicyInformation *info);
NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h
index 066d5682fb..513d17b5df 100644
--- a/source3/librpc/gen_ndr/lsa.h
+++ b/source3/librpc/gen_ndr/lsa.h
@@ -132,7 +132,7 @@ struct lsa_DnsDomainInfo {
struct dom_sid2 *sid;/* [unique] */
};
-enum lsaPolicyInfo
+enum lsa_PolicyInfo
#ifndef USE_UINT_ENUMS
{
LSA_POLICY_INFO_AUDIT_LOG=1,
@@ -149,7 +149,7 @@ enum lsaPolicyInfo
LSA_POLICY_INFO_DNS=12
}
#else
- { __donnot_use_enum_lsaPolicyInfo=0x7FFFFFFF}
+ { __donnot_use_enum_lsa_PolicyInfo=0x7FFFFFFF}
#define LSA_POLICY_INFO_AUDIT_LOG ( 1 )
#define LSA_POLICY_INFO_AUDIT_EVENTS ( 2 )
#define LSA_POLICY_INFO_DOMAIN ( 3 )
@@ -554,7 +554,7 @@ struct lsa_OpenPolicy {
struct lsa_QueryInfoPolicy {
struct {
struct policy_handle *handle;/* [ref] */
- uint16_t level;
+ enum lsa_PolicyInfo level;
} in;
struct {
@@ -568,7 +568,7 @@ struct lsa_QueryInfoPolicy {
struct lsa_SetInfoPolicy {
struct {
struct policy_handle *handle;/* [ref] */
- uint16_t level;
+ enum lsa_PolicyInfo level;
union lsa_PolicyInformation *info;/* [ref,switch_is(level)] */
} in;
@@ -1072,7 +1072,7 @@ struct lsa_GetUserName {
struct lsa_QueryInfoPolicy2 {
struct {
struct policy_handle *handle;/* [ref] */
- uint16_t level;
+ enum lsa_PolicyInfo level;
} in;
struct {
@@ -1086,7 +1086,7 @@ struct lsa_QueryInfoPolicy2 {
struct lsa_SetInfoPolicy2 {
struct {
struct policy_handle *handle;/* [ref] */
- uint16_t level;
+ enum lsa_PolicyInfo level;
union lsa_PolicyInformation *info;/* [ref,switch_is(level)] */
} in;
diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c
index 57810bcb28..eed2a8e0e3 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.c
+++ b/source3/librpc/gen_ndr/ndr_lsa.c
@@ -1147,6 +1147,41 @@ _PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
+static enum ndr_err_code ndr_push_lsa_PolicyInfo(struct ndr_push *ndr, int ndr_flags, enum lsa_PolicyInfo r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_PolicyInfo(struct ndr_pull *ndr, int ndr_flags, enum lsa_PolicyInfo *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, enum lsa_PolicyInfo r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case LSA_POLICY_INFO_AUDIT_LOG: val = "LSA_POLICY_INFO_AUDIT_LOG"; break;
+ case LSA_POLICY_INFO_AUDIT_EVENTS: val = "LSA_POLICY_INFO_AUDIT_EVENTS"; break;
+ case LSA_POLICY_INFO_DOMAIN: val = "LSA_POLICY_INFO_DOMAIN"; break;
+ case LSA_POLICY_INFO_PD: val = "LSA_POLICY_INFO_PD"; break;
+ case LSA_POLICY_INFO_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_ACCOUNT_DOMAIN"; break;
+ case LSA_POLICY_INFO_ROLE: val = "LSA_POLICY_INFO_ROLE"; break;
+ case LSA_POLICY_INFO_REPLICA: val = "LSA_POLICY_INFO_REPLICA"; break;
+ case LSA_POLICY_INFO_QUOTA: val = "LSA_POLICY_INFO_QUOTA"; break;
+ case LSA_POLICY_INFO_DB: val = "LSA_POLICY_INFO_DB"; break;
+ case LSA_POLICY_INFO_AUDIT_FULL_SET: val = "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
+ case LSA_POLICY_INFO_AUDIT_FULL_QUERY: val = "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
+ case LSA_POLICY_INFO_DNS: val = "LSA_POLICY_INFO_DNS"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, int ndr_flags, const union lsa_PolicyInformation *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -4517,7 +4552,7 @@ static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy(struct ndr_push *ndr, int
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
@@ -4545,7 +4580,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
@@ -4580,7 +4615,7 @@ _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *n
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -4606,7 +4641,7 @@ static enum ndr_err_code ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int fl
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
if (r->in.info == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -4631,7 +4666,7 @@ static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.info);
}
@@ -4661,7 +4696,7 @@ _PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *nam
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
ndr_print_ptr(ndr, "info", r->in.info);
ndr->depth++;
ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
@@ -8077,7 +8112,7 @@ static enum ndr_err_code ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
@@ -8105,7 +8140,7 @@ static enum ndr_err_code ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
@@ -8140,7 +8175,7 @@ _PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -8166,7 +8201,7 @@ static enum ndr_err_code ndr_push_lsa_SetInfoPolicy2(struct ndr_push *ndr, int f
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_lsa_PolicyInfo(ndr, NDR_SCALARS, r->in.level));
if (r->in.info == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -8191,7 +8226,7 @@ static enum ndr_err_code ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull *ndr, int f
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_lsa_PolicyInfo(ndr, NDR_SCALARS, &r->in.level));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.info);
}
@@ -8221,7 +8256,7 @@ _PUBLIC_ void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *na
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_lsa_PolicyInfo(ndr, "level", r->in.level);
ndr_print_ptr(ndr, "info", r->in.info);
ndr->depth++;
ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
diff --git a/source3/librpc/gen_ndr/ndr_lsa.h b/source3/librpc/gen_ndr/ndr_lsa.h
index e6630d12df..dc100297f5 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.h
+++ b/source3/librpc/gen_ndr/ndr_lsa.h
@@ -204,6 +204,7 @@ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, con
void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r);
void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r);
void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r);
+void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name, enum lsa_PolicyInfo r);
void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r);
void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r);
enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r);