summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-09-25 22:41:14 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-08 09:49:56 +0200
commitc2685cdedb430ae75a94e86f34484292b4269363 (patch)
tree1d5f48f071f53e4b0ee4afd470cd5f9cdb4974f2 /librpc
parent14dc32a4f58c3336c8ecf2d918b443768d94451e (diff)
downloadsamba-c2685cdedb430ae75a94e86f34484292b4269363.tar.gz
samba-c2685cdedb430ae75a94e86f34484292b4269363.tar.bz2
samba-c2685cdedb430ae75a94e86f34484292b4269363.zip
s3/s4:samr.idl - Corrects the "userPwdChangeFailureInformation" structure
This I've done according to WSPP doc MS-SAMR 2.2.7.23.
Diffstat (limited to 'librpc')
-rw-r--r--librpc/gen_ndr/cli_samr.c4
-rw-r--r--librpc/gen_ndr/cli_samr.h4
-rw-r--r--librpc/gen_ndr/ndr_samr.c126
-rw-r--r--librpc/gen_ndr/ndr_samr.h8
-rw-r--r--librpc/gen_ndr/samr.h53
-rw-r--r--librpc/gen_ndr/srv_samr.c4
-rw-r--r--librpc/idl/samr.idl30
7 files changed, 135 insertions, 94 deletions
diff --git a/librpc/gen_ndr/cli_samr.c b/librpc/gen_ndr/cli_samr.c
index 27119e53cc..72f5f74864 100644
--- a/librpc/gen_ndr/cli_samr.c
+++ b/librpc/gen_ndr/cli_samr.c
@@ -10448,7 +10448,7 @@ struct tevent_req *rpccli_samr_ChangePasswordUser3_send(TALLOC_CTX *mem_ctx,
struct samr_Password *_lm_verifier /* [in] [unique] */,
struct samr_CryptPassword *_password3 /* [in] [unique] */,
struct samr_DomInfo1 **_dominfo /* [out] [ref] */,
- struct samr_ChangeReject **_reject /* [out] [ref] */)
+ struct userPwdChangeFailureInformation **_reject /* [out] [ref] */)
{
struct tevent_req *req;
struct rpccli_samr_ChangePasswordUser3_state *state;
@@ -10576,7 +10576,7 @@ NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli,
struct samr_Password *lm_verifier /* [in] [unique] */,
struct samr_CryptPassword *password3 /* [in] [unique] */,
struct samr_DomInfo1 **dominfo /* [out] [ref] */,
- struct samr_ChangeReject **reject /* [out] [ref] */)
+ struct userPwdChangeFailureInformation **reject /* [out] [ref] */)
{
struct samr_ChangePasswordUser3 r;
NTSTATUS status;
diff --git a/librpc/gen_ndr/cli_samr.h b/librpc/gen_ndr/cli_samr.h
index ed2baa9aba..c94ff11cc7 100644
--- a/librpc/gen_ndr/cli_samr.h
+++ b/librpc/gen_ndr/cli_samr.h
@@ -963,7 +963,7 @@ struct tevent_req *rpccli_samr_ChangePasswordUser3_send(TALLOC_CTX *mem_ctx,
struct samr_Password *_lm_verifier /* [in] [unique] */,
struct samr_CryptPassword *_password3 /* [in] [unique] */,
struct samr_DomInfo1 **_dominfo /* [out] [ref] */,
- struct samr_ChangeReject **_reject /* [out] [ref] */);
+ struct userPwdChangeFailureInformation **_reject /* [out] [ref] */);
NTSTATUS rpccli_samr_ChangePasswordUser3_recv(struct tevent_req *req,
TALLOC_CTX *mem_ctx,
NTSTATUS *result);
@@ -978,7 +978,7 @@ NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli,
struct samr_Password *lm_verifier /* [in] [unique] */,
struct samr_CryptPassword *password3 /* [in] [unique] */,
struct samr_DomInfo1 **dominfo /* [out] [ref] */,
- struct samr_ChangeReject **reject /* [out] [ref] */);
+ struct userPwdChangeFailureInformation **reject /* [out] [ref] */);
struct tevent_req *rpccli_samr_Connect5_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct rpc_pipe_client *cli,
diff --git a/librpc/gen_ndr/ndr_samr.c b/librpc/gen_ndr/ndr_samr.c
index 8e6e0059c0..f4c1a0cfcf 100644
--- a/librpc/gen_ndr/ndr_samr.c
+++ b/librpc/gen_ndr/ndr_samr.c
@@ -32,33 +32,6 @@ _PUBLIC_ void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *na
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-_PUBLIC_ enum ndr_err_code ndr_push_samr_RejectReason(struct ndr_push *ndr, int ndr_flags, enum samr_RejectReason r)
-{
- NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_samr_RejectReason(struct ndr_pull *ndr, int ndr_flags, enum samr_RejectReason *r)
-{
- uint32_t v;
- NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
- *r = v;
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_samr_RejectReason(struct ndr_print *ndr, const char *name, enum samr_RejectReason r)
-{
- const char *val = NULL;
-
- switch (r) {
- case SAMR_REJECT_OTHER: val = "SAMR_REJECT_OTHER"; break;
- case SAMR_REJECT_TOO_SHORT: val = "SAMR_REJECT_TOO_SHORT"; break;
- case SAMR_REJECT_IN_HISTORY: val = "SAMR_REJECT_IN_HISTORY"; break;
- case SAMR_REJECT_COMPLEXITY: val = "SAMR_REJECT_COMPLEXITY"; break;
- }
- ndr_print_enum(ndr, name, "ENUM", val, r);
-}
-
_PUBLIC_ enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
@@ -4738,41 +4711,100 @@ _PUBLIC_ void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *n
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-static enum ndr_err_code ndr_push_samr_ChangeReject(struct ndr_push *ndr, int ndr_flags, const struct samr_ChangeReject *r)
+_PUBLIC_ enum ndr_err_code ndr_push_samPwdChangeReason(struct ndr_push *ndr, int ndr_flags, enum samPwdChangeReason r)
+{
+ NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_samPwdChangeReason(struct ndr_pull *ndr, int ndr_flags, enum samPwdChangeReason *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_samPwdChangeReason(struct ndr_print *ndr, const char *name, enum samPwdChangeReason r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case SAM_PWD_CHANGE_NO_ERROR: val = "SAM_PWD_CHANGE_NO_ERROR"; break;
+ case SAM_PWD_CHANGE_PASSWORD_TOO_SHORT: val = "SAM_PWD_CHANGE_PASSWORD_TOO_SHORT"; break;
+ case SAM_PWD_CHANGE_PWD_IN_HISTORY: val = "SAM_PWD_CHANGE_PWD_IN_HISTORY"; break;
+ case SAM_PWD_CHANGE_USERNAME_IN_PASSWORD: val = "SAM_PWD_CHANGE_USERNAME_IN_PASSWORD"; break;
+ case SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD: val = "SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD"; break;
+ case SAM_PWD_CHANGE_NOT_COMPLEX: val = "SAM_PWD_CHANGE_NOT_COMPLEX"; break;
+ case SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT: val = "SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT"; break;
+ case SAM_PWD_CHANGE_FAILED_BY_FILTER: val = "SAM_PWD_CHANGE_FAILED_BY_FILTER"; break;
+ case SAM_PWD_CHANGE_PASSWORD_TOO_LONG: val = "SAM_PWD_CHANGE_PASSWORD_TOO_LONG"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_userPwdChangeFailureInformation(struct ndr_push *ndr, int ndr_flags, const struct userPwdChangeFailureInformation *r)
{
if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_samr_RejectReason(ndr, NDR_SCALARS, r->reason));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
- NDR_CHECK(ndr_push_trailer_align(ndr, 4));
+ NDR_CHECK(ndr_push_align(ndr, 5));
+ NDR_CHECK(ndr_push_samPwdChangeReason(ndr, NDR_SCALARS, r->extendedFailureReason));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->filterModuleName));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 5));
}
if (ndr_flags & NDR_BUFFERS) {
+ if (r->filterModuleName) {
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->filterModuleName, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->filterModuleName, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->filterModuleName, ndr_charset_length(r->filterModuleName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
}
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_samr_ChangeReject(struct ndr_pull *ndr, int ndr_flags, struct samr_ChangeReject *r)
+static enum ndr_err_code ndr_pull_userPwdChangeFailureInformation(struct ndr_pull *ndr, int ndr_flags, struct userPwdChangeFailureInformation *r)
{
+ uint32_t _ptr_filterModuleName;
+ TALLOC_CTX *_mem_save_filterModuleName_0;
if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_samr_RejectReason(ndr, NDR_SCALARS, &r->reason));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
- NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
+ NDR_CHECK(ndr_pull_align(ndr, 5));
+ NDR_CHECK(ndr_pull_samPwdChangeReason(ndr, NDR_SCALARS, &r->extendedFailureReason));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_filterModuleName));
+ if (_ptr_filterModuleName) {
+ NDR_PULL_ALLOC(ndr, r->filterModuleName);
+ } else {
+ r->filterModuleName = NULL;
+ }
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
}
if (ndr_flags & NDR_BUFFERS) {
+ if (r->filterModuleName) {
+ _mem_save_filterModuleName_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->filterModuleName, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->filterModuleName));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->filterModuleName));
+ if (ndr_get_array_length(ndr, &r->filterModuleName) > ndr_get_array_size(ndr, &r->filterModuleName)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->filterModuleName), ndr_get_array_length(ndr, &r->filterModuleName));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->filterModuleName), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->filterModuleName, ndr_get_array_length(ndr, &r->filterModuleName), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filterModuleName_0, 0);
+ }
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r)
+_PUBLIC_ void ndr_print_userPwdChangeFailureInformation(struct ndr_print *ndr, const char *name, const struct userPwdChangeFailureInformation *r)
{
- ndr_print_struct(ndr, name, "samr_ChangeReject");
+ ndr_print_struct(ndr, name, "userPwdChangeFailureInformation");
ndr->depth++;
- ndr_print_samr_RejectReason(ndr, "reason", r->reason);
- ndr_print_uint32(ndr, "unknown1", r->unknown1);
- ndr_print_uint32(ndr, "unknown2", r->unknown2);
+ ndr_print_samPwdChangeReason(ndr, "extendedFailureReason", r->extendedFailureReason);
+ ndr_print_ptr(ndr, "filterModuleName", r->filterModuleName);
+ ndr->depth++;
+ if (r->filterModuleName) {
+ ndr_print_string(ndr, "filterModuleName", r->filterModuleName);
+ }
+ ndr->depth--;
ndr->depth--;
}
@@ -11806,7 +11838,7 @@ static enum ndr_err_code ndr_push_samr_ChangePasswordUser3(struct ndr_push *ndr,
}
NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.reject));
if (*r->out.reject) {
- NDR_CHECK(ndr_push_samr_ChangeReject(ndr, NDR_SCALARS, *r->out.reject));
+ NDR_CHECK(ndr_push_userPwdChangeFailureInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.reject));
}
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
@@ -11955,7 +11987,7 @@ static enum ndr_err_code ndr_pull_samr_ChangePasswordUser3(struct ndr_pull *ndr,
if (*r->out.reject) {
_mem_save_reject_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, *r->out.reject, 0);
- NDR_CHECK(ndr_pull_samr_ChangeReject(ndr, NDR_SCALARS, *r->out.reject));
+ NDR_CHECK(ndr_pull_userPwdChangeFailureInformation(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.reject));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_1, 0);
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reject_0, LIBNDR_FLAG_REF_ALLOC);
@@ -12034,7 +12066,7 @@ _PUBLIC_ void ndr_print_samr_ChangePasswordUser3(struct ndr_print *ndr, const ch
ndr_print_ptr(ndr, "reject", *r->out.reject);
ndr->depth++;
if (*r->out.reject) {
- ndr_print_samr_ChangeReject(ndr, "reject", *r->out.reject);
+ ndr_print_userPwdChangeFailureInformation(ndr, "reject", *r->out.reject);
}
ndr->depth--;
ndr->depth--;
diff --git a/librpc/gen_ndr/ndr_samr.h b/librpc/gen_ndr/ndr_samr.h
index a341f69af0..9ece0ed5ca 100644
--- a/librpc/gen_ndr/ndr_samr.h
+++ b/librpc/gen_ndr/ndr_samr.h
@@ -151,9 +151,6 @@ extern const struct ndr_interface_table ndr_table_samr;
enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r);
enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r);
void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r);
-enum ndr_err_code ndr_push_samr_RejectReason(struct ndr_push *ndr, int ndr_flags, enum samr_RejectReason r);
-enum ndr_err_code ndr_pull_samr_RejectReason(struct ndr_pull *ndr, int ndr_flags, enum samr_RejectReason *r);
-void ndr_print_samr_RejectReason(struct ndr_print *ndr, const char *name, enum samr_RejectReason r);
enum ndr_err_code ndr_push_samr_AcctFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r);
enum ndr_err_code ndr_pull_samr_AcctFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
void ndr_print_samr_AcctFlags(struct ndr_print *ndr, const char *name, uint32_t r);
@@ -248,7 +245,10 @@ void ndr_print_samr_DispInfoAscii(struct ndr_print *ndr, const char *name, const
void ndr_print_samr_DispInfo(struct ndr_print *ndr, const char *name, const union samr_DispInfo *r);
void ndr_print_samr_PwInfo(struct ndr_print *ndr, const char *name, const struct samr_PwInfo *r);
void ndr_print_samr_ConnectVersion(struct ndr_print *ndr, const char *name, enum samr_ConnectVersion r);
-void ndr_print_samr_ChangeReject(struct ndr_print *ndr, const char *name, const struct samr_ChangeReject *r);
+enum ndr_err_code ndr_push_samPwdChangeReason(struct ndr_push *ndr, int ndr_flags, enum samPwdChangeReason r);
+enum ndr_err_code ndr_pull_samPwdChangeReason(struct ndr_pull *ndr, int ndr_flags, enum samPwdChangeReason *r);
+void ndr_print_samPwdChangeReason(struct ndr_print *ndr, const char *name, enum samPwdChangeReason r);
+void ndr_print_userPwdChangeFailureInformation(struct ndr_print *ndr, const char *name, const struct userPwdChangeFailureInformation *r);
void ndr_print_samr_ConnectInfo1(struct ndr_print *ndr, const char *name, const struct samr_ConnectInfo1 *r);
void ndr_print_samr_ConnectInfo(struct ndr_print *ndr, const char *name, const union samr_ConnectInfo *r);
void ndr_print_samr_ValidateFieldsPresent(struct ndr_print *ndr, const char *name, uint32_t r);
diff --git a/librpc/gen_ndr/samr.h b/librpc/gen_ndr/samr.h
index 33b21d2d05..75462dec73 100644
--- a/librpc/gen_ndr/samr.h
+++ b/librpc/gen_ndr/samr.h
@@ -53,23 +53,6 @@ enum netr_SamDatabaseID
#endif
;
-enum samr_RejectReason
-#ifndef USE_UINT_ENUMS
- {
- SAMR_REJECT_OTHER=(int)(0),
- SAMR_REJECT_TOO_SHORT=(int)(1),
- SAMR_REJECT_IN_HISTORY=(int)(2),
- SAMR_REJECT_COMPLEXITY=(int)(5)
-}
-#else
- { __donnot_use_enum_samr_RejectReason=0x7FFFFFFF}
-#define SAMR_REJECT_OTHER ( 0 )
-#define SAMR_REJECT_TOO_SHORT ( 1 )
-#define SAMR_REJECT_IN_HISTORY ( 2 )
-#define SAMR_REJECT_COMPLEXITY ( 5 )
-#endif
-;
-
/* bitmap samr_AcctFlags */
#define ACB_DISABLED ( 0x00000001 )
#define ACB_HOMDIRREQ ( 0x00000002 )
@@ -790,10 +773,36 @@ enum samr_ConnectVersion
#endif
;
-struct samr_ChangeReject {
- enum samr_RejectReason reason;
- uint32_t unknown1;
- uint32_t unknown2;
+enum samPwdChangeReason
+#ifndef USE_UINT_ENUMS
+ {
+ SAM_PWD_CHANGE_NO_ERROR=(int)(0),
+ SAM_PWD_CHANGE_PASSWORD_TOO_SHORT=(int)(1),
+ SAM_PWD_CHANGE_PWD_IN_HISTORY=(int)(2),
+ SAM_PWD_CHANGE_USERNAME_IN_PASSWORD=(int)(3),
+ SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD=(int)(4),
+ SAM_PWD_CHANGE_NOT_COMPLEX=(int)(5),
+ SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT=(int)(6),
+ SAM_PWD_CHANGE_FAILED_BY_FILTER=(int)(7),
+ SAM_PWD_CHANGE_PASSWORD_TOO_LONG=(int)(8)
+}
+#else
+ { __donnot_use_enum_samPwdChangeReason=0x7FFFFFFF}
+#define SAM_PWD_CHANGE_NO_ERROR ( 0 )
+#define SAM_PWD_CHANGE_PASSWORD_TOO_SHORT ( 1 )
+#define SAM_PWD_CHANGE_PWD_IN_HISTORY ( 2 )
+#define SAM_PWD_CHANGE_USERNAME_IN_PASSWORD ( 3 )
+#define SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD ( 4 )
+#define SAM_PWD_CHANGE_NOT_COMPLEX ( 5 )
+#define SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT ( 6 )
+#define SAM_PWD_CHANGE_FAILED_BY_FILTER ( 7 )
+#define SAM_PWD_CHANGE_PASSWORD_TOO_LONG ( 8 )
+#endif
+;
+
+struct userPwdChangeFailureInformation {
+ enum samPwdChangeReason extendedFailureReason;
+ const char *filterModuleName;/* [unique,charset(UTF16)] */
};
struct samr_ConnectInfo1 {
@@ -1852,7 +1861,7 @@ struct samr_ChangePasswordUser3 {
struct {
struct samr_DomInfo1 **dominfo;/* [ref] */
- struct samr_ChangeReject **reject;/* [ref] */
+ struct userPwdChangeFailureInformation **reject;/* [ref] */
NTSTATUS result;
} out;
diff --git a/librpc/gen_ndr/srv_samr.c b/librpc/gen_ndr/srv_samr.c
index e1b6951b3c..eba50b3e11 100644
--- a/librpc/gen_ndr/srv_samr.c
+++ b/librpc/gen_ndr/srv_samr.c
@@ -5030,7 +5030,7 @@ static bool api_samr_ChangePasswordUser3(pipes_struct *p)
return false;
}
- r->out.reject = talloc_zero(r, struct samr_ChangeReject *);
+ r->out.reject = talloc_zero(r, struct userPwdChangeFailureInformation *);
if (r->out.reject == NULL) {
talloc_free(r);
return false;
@@ -6195,7 +6195,7 @@ NTSTATUS rpc_samr_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, con
return NT_STATUS_NO_MEMORY;
}
- r->out.reject = talloc_zero(mem_ctx, struct samr_ChangeReject *);
+ r->out.reject = talloc_zero(mem_ctx, struct userPwdChangeFailureInformation *);
if (r->out.reject == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/librpc/idl/samr.idl b/librpc/idl/samr.idl
index 8a5692fe17..da7b1aa82e 100644
--- a/librpc/idl/samr.idl
+++ b/librpc/idl/samr.idl
@@ -24,15 +24,6 @@ import "misc.idl", "lsa.idl", "security.idl";
SAM_DATABASE_PRIVS = 2 /* Privileges */
} netr_SamDatabaseID;
- typedef [public,v1_enum] enum {
- SAMR_REJECT_OTHER = 0,
- SAMR_REJECT_TOO_SHORT = 1,
- SAMR_REJECT_IN_HISTORY = 2,
- SAMR_REJECT_COMPLEXITY = 5
- } samr_RejectReason;
-
-
-
/* account control (acct_flags) bits */
typedef [public,bitmap32bit] bitmap {
ACB_DISABLED = 0x00000001, /* 1 = User account disabled */
@@ -1447,13 +1438,22 @@ import "misc.idl", "lsa.idl", "security.idl";
/************************/
/* Function 0x3f */
- typedef enum samr_RejectReason samr_RejectReason;
+ typedef [public,v1_enum] enum {
+ SAM_PWD_CHANGE_NO_ERROR = 0,
+ SAM_PWD_CHANGE_PASSWORD_TOO_SHORT = 1,
+ SAM_PWD_CHANGE_PWD_IN_HISTORY = 2,
+ SAM_PWD_CHANGE_USERNAME_IN_PASSWORD = 3,
+ SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD = 4,
+ SAM_PWD_CHANGE_NOT_COMPLEX = 5,
+ SAM_PWD_CHANGE_MACHINE_NOT_DEFAULT = 6,
+ SAM_PWD_CHANGE_FAILED_BY_FILTER = 7,
+ SAM_PWD_CHANGE_PASSWORD_TOO_LONG = 8
+ } samPwdChangeReason;
typedef struct {
- samr_RejectReason reason;
- uint32 unknown1;
- uint32 unknown2;
- } samr_ChangeReject;
+ samPwdChangeReason extendedFailureReason;
+ [string,charset(UTF16)] uint16 *filterModuleName;
+ } userPwdChangeFailureInformation;
NTSTATUS samr_ChangePasswordUser3(
[in,unique] lsa_String *server,
@@ -1465,7 +1465,7 @@ import "misc.idl", "lsa.idl", "security.idl";
[in,unique] samr_Password *lm_verifier,
[in,unique] samr_CryptPassword *password3,
[out,ref] samr_DomInfo1 **dominfo,
- [out,ref] samr_ChangeReject **reject
+ [out,ref] userPwdChangeFailureInformation **reject
);
/************************/