[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-1348-g9469375
Günther Deschner
gd at samba.org
Mon Jan 14 16:40:38 GMT 2008
The branch, v3-2-test has been updated
via 94693755a291993217b5cb74794504a8593eae30 (commit)
via 8b63a1665795d2739b54144212926113d9be7f09 (commit)
from be8071779fa14d964e86810f5fb16bc52aea4e36 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 94693755a291993217b5cb74794504a8593eae30
Author: Günther Deschner <gd at samba.org>
Date: Mon Jan 14 17:39:33 2008 +0100
Re-run make idl to update lsa idl.
Guenther
commit 8b63a1665795d2739b54144212926113d9be7f09
Author: Günther Deschner <gd at samba.org>
Date: Mon Jan 14 17:37:35 2008 +0100
Use lsa_PolicyInfo enum in lsa policy info calls.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source/librpc/gen_ndr/cli_lsa.c | 8 ++--
source/librpc/gen_ndr/cli_lsa.h | 8 ++--
source/librpc/gen_ndr/lsa.h | 12 ++++----
source/librpc/gen_ndr/ndr_lsa.c | 59 +++++++++++++++++++++++++++++++--------
source/librpc/gen_ndr/ndr_lsa.h | 1 +
source/librpc/idl/lsa.idl | 10 +++---
6 files changed, 67 insertions(+), 31 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/librpc/gen_ndr/cli_lsa.c b/source/librpc/gen_ndr/cli_lsa.c
index 4d81833..92ba8bd 100644
--- a/source/librpc/gen_ndr/cli_lsa.c
+++ b/source/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/source/librpc/gen_ndr/cli_lsa.h b/source/librpc/gen_ndr/cli_lsa.h
index 59c0b92..4ab8be9 100644
--- a/source/librpc/gen_ndr/cli_lsa.h
+++ b/source/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/source/librpc/gen_ndr/lsa.h b/source/librpc/gen_ndr/lsa.h
index 066d568..513d17b 100644
--- a/source/librpc/gen_ndr/lsa.h
+++ b/source/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/source/librpc/gen_ndr/ndr_lsa.c b/source/librpc/gen_ndr/ndr_lsa.c
index 57810bc..eed2a8e 100644
--- a/source/librpc/gen_ndr/ndr_lsa.c
+++ b/source/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/source/librpc/gen_ndr/ndr_lsa.h b/source/librpc/gen_ndr/ndr_lsa.h
index e6630d1..dc10029 100644
--- a/source/librpc/gen_ndr/ndr_lsa.h
+++ b/source/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);
diff --git a/source/librpc/idl/lsa.idl b/source/librpc/idl/lsa.idl
index a7e04dc..7daf648 100644
--- a/source/librpc/idl/lsa.idl
+++ b/source/librpc/idl/lsa.idl
@@ -214,7 +214,7 @@ import "security.idl";
LSA_POLICY_INFO_AUDIT_FULL_SET=10,
LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
LSA_POLICY_INFO_DNS=12
- } lsaPolicyInfo;
+ } lsa_PolicyInfo;
typedef [switch_type(uint16)] union {
[case(LSA_POLICY_INFO_AUDIT_LOG)] lsa_AuditLogInfo audit_log;
@@ -233,7 +233,7 @@ import "security.idl";
NTSTATUS lsa_QueryInfoPolicy (
[in] policy_handle *handle,
- [in] uint16 level,
+ [in] lsa_PolicyInfo level,
[out,unique,switch_is(level)] lsa_PolicyInformation *info
);
@@ -241,7 +241,7 @@ import "security.idl";
/* Function: 0x08 */
NTSTATUS lsa_SetInfoPolicy (
[in] policy_handle *handle,
- [in] uint16 level,
+ [in] lsa_PolicyInfo level,
[in,switch_is(level)] lsa_PolicyInformation *info
);
@@ -709,14 +709,14 @@ import "security.idl";
NTSTATUS lsa_QueryInfoPolicy2(
[in] policy_handle *handle,
- [in] uint16 level,
+ [in] lsa_PolicyInfo level,
[out,unique,switch_is(level)] lsa_PolicyInformation *info
);
/* Function 0x2f */
NTSTATUS lsa_SetInfoPolicy2(
[in] policy_handle *handle,
- [in] uint16 level,
+ [in] lsa_PolicyInfo level,
[in,switch_is(level)] lsa_PolicyInformation *info
);
--
Samba Shared Repository
More information about the samba-cvs
mailing list