summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'librpc')
-rw-r--r--librpc/gen_ndr/cli_samr.c14
-rw-r--r--librpc/gen_ndr/cli_samr.h14
-rw-r--r--librpc/gen_ndr/ndr_samr.c124
-rw-r--r--librpc/gen_ndr/ndr_samr.h2
-rw-r--r--librpc/gen_ndr/samr.h104
5 files changed, 216 insertions, 42 deletions
diff --git a/librpc/gen_ndr/cli_samr.c b/librpc/gen_ndr/cli_samr.c
index 1e3bd122b8..4f1ca3651d 100644
--- a/librpc/gen_ndr/cli_samr.c
+++ b/librpc/gen_ndr/cli_samr.c
@@ -345,7 +345,7 @@ NTSTATUS rpccli_samr_OpenDomain(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_QueryDomainInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_DomainInfoClass level /* [in] */,
union samr_DomainInfo **info /* [out] [ref,switch_is(level)] */)
{
struct samr_QueryDomainInfo r;
@@ -387,7 +387,7 @@ NTSTATUS rpccli_samr_QueryDomainInfo(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_SetDomainInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_DomainInfoClass level /* [in] */,
union samr_DomainInfo *info /* [in] [ref,switch_is(level)] */)
{
struct samr_SetDomainInfo r;
@@ -1545,7 +1545,7 @@ NTSTATUS rpccli_samr_DeleteUser(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_QueryUserInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *user_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_UserInfoLevel level /* [in] */,
union samr_UserInfo **info /* [out] [ref,switch_is(level)] */)
{
struct samr_QueryUserInfo r;
@@ -1587,7 +1587,7 @@ NTSTATUS rpccli_samr_QueryUserInfo(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_SetUserInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *user_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_UserInfoLevel level /* [in] */,
union samr_UserInfo *info /* [in] [ref,switch_is(level)] */)
{
struct samr_SetUserInfo r;
@@ -1979,7 +1979,7 @@ NTSTATUS rpccli_samr_RemoveMemberFromForeignDomain(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_QueryDomainInfo2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_DomainInfoClass level /* [in] */,
union samr_DomainInfo **info /* [out] [ref,switch_is(level)] */)
{
struct samr_QueryDomainInfo2 r;
@@ -2021,7 +2021,7 @@ NTSTATUS rpccli_samr_QueryDomainInfo2(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_QueryUserInfo2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *user_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_UserInfoLevel level /* [in] */,
union samr_UserInfo **info /* [out] [ref,switch_is(level)] */)
{
struct samr_QueryUserInfo2 r;
@@ -2517,7 +2517,7 @@ NTSTATUS rpccli_samr_Connect2(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_SetUserInfo2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *user_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_UserInfoLevel level /* [in] */,
union samr_UserInfo *info /* [in] [ref,switch_is(level)] */)
{
struct samr_SetUserInfo2 r;
diff --git a/librpc/gen_ndr/cli_samr.h b/librpc/gen_ndr/cli_samr.h
index 7bfe71b280..7e351ddb93 100644
--- a/librpc/gen_ndr/cli_samr.h
+++ b/librpc/gen_ndr/cli_samr.h
@@ -43,12 +43,12 @@ NTSTATUS rpccli_samr_OpenDomain(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_QueryDomainInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_DomainInfoClass level /* [in] */,
union samr_DomainInfo **info /* [out] [ref,switch_is(level)] */);
NTSTATUS rpccli_samr_SetDomainInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_DomainInfoClass level /* [in] */,
union samr_DomainInfo *info /* [in] [ref,switch_is(level)] */);
NTSTATUS rpccli_samr_CreateDomainGroup(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -192,12 +192,12 @@ NTSTATUS rpccli_samr_DeleteUser(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_QueryUserInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *user_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_UserInfoLevel level /* [in] */,
union samr_UserInfo **info /* [out] [ref,switch_is(level)] */);
NTSTATUS rpccli_samr_SetUserInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *user_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_UserInfoLevel level /* [in] */,
union samr_UserInfo *info /* [in] [ref,switch_is(level)] */);
NTSTATUS rpccli_samr_ChangePasswordUser(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -249,12 +249,12 @@ NTSTATUS rpccli_samr_RemoveMemberFromForeignDomain(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_QueryDomainInfo2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_DomainInfoClass level /* [in] */,
union samr_DomainInfo **info /* [out] [ref,switch_is(level)] */);
NTSTATUS rpccli_samr_QueryUserInfo2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *user_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_UserInfoLevel level /* [in] */,
union samr_UserInfo **info /* [out] [ref,switch_is(level)] */);
NTSTATUS rpccli_samr_QueryDisplayInfo2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -326,7 +326,7 @@ NTSTATUS rpccli_samr_Connect2(struct rpc_pipe_client *cli,
NTSTATUS rpccli_samr_SetUserInfo2(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *user_handle /* [in] [ref] */,
- uint16_t level /* [in] */,
+ enum samr_UserInfoLevel level /* [in] */,
union samr_UserInfo *info /* [in] [ref,switch_is(level)] */);
NTSTATUS rpccli_samr_SetBootKeyInformation(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/librpc/gen_ndr/ndr_samr.c b/librpc/gen_ndr/ndr_samr.c
index ab76f5af28..58b7ae2413 100644
--- a/librpc/gen_ndr/ndr_samr.c
+++ b/librpc/gen_ndr/ndr_samr.c
@@ -363,6 +363,42 @@ _PUBLIC_ void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, c
ndr->depth--;
}
+static enum ndr_err_code ndr_push_samr_DomainInfoClass(struct ndr_push *ndr, int ndr_flags, enum samr_DomainInfoClass r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_samr_DomainInfoClass(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainInfoClass *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_samr_DomainInfoClass(struct ndr_print *ndr, const char *name, enum samr_DomainInfoClass r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case DomainPasswordInformation: val = "DomainPasswordInformation"; break;
+ case DomainGeneralInformation: val = "DomainGeneralInformation"; break;
+ case DomainLogoffInformation: val = "DomainLogoffInformation"; break;
+ case DomainOemInformation: val = "DomainOemInformation"; break;
+ case DomainNameInformation: val = "DomainNameInformation"; break;
+ case DomainReplicationInformation: val = "DomainReplicationInformation"; break;
+ case DomainServerRoleInformation: val = "DomainServerRoleInformation"; break;
+ case DomainModifiedInformation: val = "DomainModifiedInformation"; break;
+ case DomainStateInformation: val = "DomainStateInformation"; break;
+ case DomainUasInformation: val = "DomainUasInformation"; break;
+ case DomainGeneralInformation2: val = "DomainGeneralInformation2"; break;
+ case DomainLockoutInformation: val = "DomainLockoutInformation"; break;
+ case DomainModifiedInformation2: val = "DomainModifiedInformation2"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
static enum ndr_err_code ndr_push_samr_Role(struct ndr_push *ndr, int ndr_flags, enum samr_Role r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
@@ -1839,6 +1875,52 @@ _PUBLIC_ void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name,
}
}
+static enum ndr_err_code ndr_push_samr_UserInfoLevel(struct ndr_push *ndr, int ndr_flags, enum samr_UserInfoLevel r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_samr_UserInfoLevel(struct ndr_pull *ndr, int ndr_flags, enum samr_UserInfoLevel *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_samr_UserInfoLevel(struct ndr_print *ndr, const char *name, enum samr_UserInfoLevel r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case UserGeneralInformation: val = "UserGeneralInformation"; break;
+ case UserPreferencesInformation: val = "UserPreferencesInformation"; break;
+ case UserLogonInformation: val = "UserLogonInformation"; break;
+ case UserLogonHoursInformation: val = "UserLogonHoursInformation"; break;
+ case UserAccountInformation: val = "UserAccountInformation"; break;
+ case UserNameInformation: val = "UserNameInformation"; break;
+ case UserAccountNameInformation: val = "UserAccountNameInformation"; break;
+ case UserFullNameInformation: val = "UserFullNameInformation"; break;
+ case UserPrimaryGroupInformation: val = "UserPrimaryGroupInformation"; break;
+ case UserHomeInformation: val = "UserHomeInformation"; break;
+ case UserScriptInformation: val = "UserScriptInformation"; break;
+ case UserProfileInformation: val = "UserProfileInformation"; break;
+ case UserAdminCommentInformation: val = "UserAdminCommentInformation"; break;
+ case UserWorkStationsInformation: val = "UserWorkStationsInformation"; break;
+ case UserControlInformation: val = "UserControlInformation"; break;
+ case UserExpiresInformation: val = "UserExpiresInformation"; break;
+ case UserInternal1Information: val = "UserInternal1Information"; break;
+ case UserParametersInformation: val = "UserParametersInformation"; break;
+ case UserAllInformation: val = "UserAllInformation"; break;
+ case UserInternal4Information: val = "UserInternal4Information"; break;
+ case UserInternal5Information: val = "UserInternal5Information"; break;
+ case UserInternal4InformationNew: val = "UserInternal4InformationNew"; break;
+ case UserInternal5InformationNew: val = "UserInternal5InformationNew"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
static enum ndr_err_code ndr_push_samr_UserInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_UserInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -6090,7 +6172,7 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo(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, r->in.domain_handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
}
if (flags & NDR_OUT) {
if (r->out.info == NULL) {
@@ -6122,7 +6204,7 @@ static enum ndr_err_code ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
NDR_PULL_ALLOC(ndr, r->out.info);
ZERO_STRUCTP(r->out.info);
}
@@ -6165,7 +6247,7 @@ _PUBLIC_ void ndr_print_samr_QueryDomainInfo(struct ndr_print *ndr, const char *
ndr->depth++;
ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -6194,7 +6276,7 @@ static enum ndr_err_code ndr_push_samr_SetDomainInfo(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, r->in.domain_handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
if (r->in.info == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -6219,7 +6301,7 @@ static enum ndr_err_code ndr_pull_samr_SetDomainInfo(struct ndr_pull *ndr, int f
NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.info);
}
@@ -6249,7 +6331,7 @@ _PUBLIC_ void ndr_print_samr_SetDomainInfo(struct ndr_print *ndr, const char *na
ndr->depth++;
ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_samr_DomainInfoClass(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);
@@ -8801,7 +8883,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_QueryUserInfo(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, r->in.user_handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
}
if (flags & NDR_OUT) {
if (r->out.info == NULL) {
@@ -8833,7 +8915,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
NDR_PULL_ALLOC(ndr, r->out.info);
ZERO_STRUCTP(r->out.info);
}
@@ -8876,7 +8958,7 @@ _PUBLIC_ void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *na
ndr->depth++;
ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -8905,7 +8987,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo(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, r->in.user_handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
if (r->in.info == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -8930,7 +9012,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, int f
NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.info);
}
@@ -8960,7 +9042,7 @@ _PUBLIC_ void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name
ndr->depth++;
ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_samr_UserInfoLevel(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);
@@ -9783,7 +9865,7 @@ static enum ndr_err_code ndr_push_samr_QueryDomainInfo2(struct ndr_push *ndr, in
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_samr_DomainInfoClass(ndr, NDR_SCALARS, r->in.level));
}
if (flags & NDR_OUT) {
if (r->out.info == NULL) {
@@ -9815,7 +9897,7 @@ static enum ndr_err_code ndr_pull_samr_QueryDomainInfo2(struct ndr_pull *ndr, in
NDR_PULL_SET_MEM_CTX(ndr, r->in.domain_handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_samr_DomainInfoClass(ndr, NDR_SCALARS, &r->in.level));
NDR_PULL_ALLOC(ndr, r->out.info);
ZERO_STRUCTP(r->out.info);
}
@@ -9858,7 +9940,7 @@ _PUBLIC_ void ndr_print_samr_QueryDomainInfo2(struct ndr_print *ndr, const char
ndr->depth++;
ndr_print_policy_handle(ndr, "domain_handle", r->in.domain_handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_samr_DomainInfoClass(ndr, "level", r->in.level);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -9887,7 +9969,7 @@ static enum ndr_err_code ndr_push_samr_QueryUserInfo2(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, r->in.user_handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
}
if (flags & NDR_OUT) {
if (r->out.info == NULL) {
@@ -9919,7 +10001,7 @@ static enum ndr_err_code ndr_pull_samr_QueryUserInfo2(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
NDR_PULL_ALLOC(ndr, r->out.info);
ZERO_STRUCTP(r->out.info);
}
@@ -9962,7 +10044,7 @@ _PUBLIC_ void ndr_print_samr_QueryUserInfo2(struct ndr_print *ndr, const char *n
ndr->depth++;
ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_samr_UserInfoLevel(ndr, "level", r->in.level);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -11115,7 +11197,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_SetUserInfo2(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, r->in.user_handle));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_samr_UserInfoLevel(ndr, NDR_SCALARS, r->in.level));
if (r->in.info == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -11140,7 +11222,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_SetUserInfo2(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, r->in.user_handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.user_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_samr_UserInfoLevel(ndr, NDR_SCALARS, &r->in.level));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.info);
}
@@ -11170,7 +11252,7 @@ _PUBLIC_ void ndr_print_samr_SetUserInfo2(struct ndr_print *ndr, const char *nam
ndr->depth++;
ndr_print_policy_handle(ndr, "user_handle", r->in.user_handle);
ndr->depth--;
- ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_samr_UserInfoLevel(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/librpc/gen_ndr/ndr_samr.h b/librpc/gen_ndr/ndr_samr.h
index 038fcf6ede..a341f69af0 100644
--- a/librpc/gen_ndr/ndr_samr.h
+++ b/librpc/gen_ndr/ndr_samr.h
@@ -164,6 +164,7 @@ void ndr_print_samr_GroupAccessMask(struct ndr_print *ndr, const char *name, uin
void ndr_print_samr_AliasAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, const struct samr_SamEntry *r);
void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, const struct samr_SamArray *r);
+void ndr_print_samr_DomainInfoClass(struct ndr_print *ndr, const char *name, enum samr_DomainInfoClass r);
void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role r);
enum ndr_err_code ndr_push_samr_PasswordProperties(struct ndr_push *ndr, int ndr_flags, uint32_t r);
enum ndr_err_code ndr_pull_samr_PasswordProperties(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
@@ -194,6 +195,7 @@ void ndr_print_samr_RidTypeArray(struct ndr_print *ndr, const char *name, const
void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, const struct samr_AliasInfoAll *r);
void ndr_print_samr_AliasInfoEnum(struct ndr_print *ndr, const char *name, enum samr_AliasInfoEnum r);
void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, const union samr_AliasInfo *r);
+void ndr_print_samr_UserInfoLevel(struct ndr_print *ndr, const char *name, enum samr_UserInfoLevel r);
void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, const struct samr_UserInfo1 *r);
void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, const struct samr_UserInfo2 *r);
enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int ndr_flags, const struct samr_LogonHours *r);
diff --git a/librpc/gen_ndr/samr.h b/librpc/gen_ndr/samr.h
index 16c6605789..e44de1b037 100644
--- a/librpc/gen_ndr/samr.h
+++ b/librpc/gen_ndr/samr.h
@@ -149,6 +149,41 @@ struct samr_SamArray {
struct samr_SamEntry *entries;/* [unique,size_is(count)] */
};
+enum samr_DomainInfoClass
+#ifndef USE_UINT_ENUMS
+ {
+ DomainPasswordInformation=1,
+ DomainGeneralInformation=2,
+ DomainLogoffInformation=3,
+ DomainOemInformation=4,
+ DomainNameInformation=5,
+ DomainReplicationInformation=6,
+ DomainServerRoleInformation=7,
+ DomainModifiedInformation=8,
+ DomainStateInformation=9,
+ DomainUasInformation=10,
+ DomainGeneralInformation2=11,
+ DomainLockoutInformation=12,
+ DomainModifiedInformation2=13
+}
+#else
+ { __donnot_use_enum_samr_DomainInfoClass=0x7FFFFFFF}
+#define DomainPasswordInformation ( 1 )
+#define DomainGeneralInformation ( 2 )
+#define DomainLogoffInformation ( 3 )
+#define DomainOemInformation ( 4 )
+#define DomainNameInformation ( 5 )
+#define DomainReplicationInformation ( 6 )
+#define DomainServerRoleInformation ( 7 )
+#define DomainModifiedInformation ( 8 )
+#define DomainStateInformation ( 9 )
+#define DomainUasInformation ( 10 )
+#define DomainGeneralInformation2 ( 11 )
+#define DomainLockoutInformation ( 12 )
+#define DomainModifiedInformation2 ( 13 )
+#endif
+;
+
enum samr_Role
#ifndef USE_UINT_ENUMS
{
@@ -361,6 +396,61 @@ union samr_AliasInfo {
struct lsa_String description;/* [case(ALIASINFODESCRIPTION)] */
}/* [switch_type(samr_AliasInfoEnum)] */;
+enum samr_UserInfoLevel
+#ifndef USE_UINT_ENUMS
+ {
+ UserGeneralInformation=1,
+ UserPreferencesInformation=2,
+ UserLogonInformation=3,
+ UserLogonHoursInformation=4,
+ UserAccountInformation=5,
+ UserNameInformation=6,
+ UserAccountNameInformation=7,
+ UserFullNameInformation=8,
+ UserPrimaryGroupInformation=9,
+ UserHomeInformation=10,
+ UserScriptInformation=11,
+ UserProfileInformation=12,
+ UserAdminCommentInformation=13,
+ UserWorkStationsInformation=14,
+ UserControlInformation=16,
+ UserExpiresInformation=17,
+ UserInternal1Information=18,
+ UserParametersInformation=20,
+ UserAllInformation=21,
+ UserInternal4Information=23,
+ UserInternal5Information=24,
+ UserInternal4InformationNew=25,
+ UserInternal5InformationNew=26
+}
+#else
+ { __donnot_use_enum_samr_UserInfoLevel=0x7FFFFFFF}
+#define UserGeneralInformation ( 1 )
+#define UserPreferencesInformation ( 2 )
+#define UserLogonInformation ( 3 )
+#define UserLogonHoursInformation ( 4 )
+#define UserAccountInformation ( 5 )
+#define UserNameInformation ( 6 )
+#define UserAccountNameInformation ( 7 )
+#define UserFullNameInformation ( 8 )
+#define UserPrimaryGroupInformation ( 9 )
+#define UserHomeInformation ( 10 )
+#define UserScriptInformation ( 11 )
+#define UserProfileInformation ( 12 )
+#define UserAdminCommentInformation ( 13 )
+#define UserWorkStationsInformation ( 14 )
+#define UserControlInformation ( 16 )
+#define UserExpiresInformation ( 17 )
+#define UserInternal1Information ( 18 )
+#define UserParametersInformation ( 20 )
+#define UserAllInformation ( 21 )
+#define UserInternal4Information ( 23 )
+#define UserInternal5Information ( 24 )
+#define UserInternal4InformationNew ( 25 )
+#define UserInternal5InformationNew ( 26 )
+#endif
+;
+
struct samr_UserInfo1 {
struct lsa_String account_name;
struct lsa_String full_name;
@@ -936,7 +1026,7 @@ struct samr_OpenDomain {
struct samr_QueryDomainInfo {
struct {
struct policy_handle *domain_handle;/* [ref] */
- uint16_t level;
+ enum samr_DomainInfoClass level;
} in;
struct {
@@ -950,7 +1040,7 @@ struct samr_QueryDomainInfo {
struct samr_SetDomainInfo {
struct {
struct policy_handle *domain_handle;/* [ref] */
- uint16_t level;
+ enum samr_DomainInfoClass level;
union samr_DomainInfo *info;/* [ref,switch_is(level)] */
} in;
@@ -1343,7 +1433,7 @@ struct samr_DeleteUser {
struct samr_QueryUserInfo {
struct {
struct policy_handle *user_handle;/* [ref] */
- uint16_t level;
+ enum samr_UserInfoLevel level;
} in;
struct {
@@ -1357,7 +1447,7 @@ struct samr_QueryUserInfo {
struct samr_SetUserInfo {
struct {
struct policy_handle *user_handle;/* [ref] */
- uint16_t level;
+ enum samr_UserInfoLevel level;
union samr_UserInfo *info;/* [ref,switch_is(level)] */
} in;
@@ -1490,7 +1580,7 @@ struct samr_RemoveMemberFromForeignDomain {
struct samr_QueryDomainInfo2 {
struct {
struct policy_handle *domain_handle;/* [ref] */
- uint16_t level;
+ enum samr_DomainInfoClass level;
} in;
struct {
@@ -1504,7 +1594,7 @@ struct samr_QueryDomainInfo2 {
struct samr_QueryUserInfo2 {
struct {
struct policy_handle *user_handle;/* [ref] */
- uint16_t level;
+ enum samr_UserInfoLevel level;
} in;
struct {
@@ -1675,7 +1765,7 @@ struct samr_Connect2 {
struct samr_SetUserInfo2 {
struct {
struct policy_handle *user_handle;/* [ref] */
- uint16_t level;
+ enum samr_UserInfoLevel level;
union samr_UserInfo *info;/* [ref,switch_is(level)] */
} in;