summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-12-03 17:47:39 +1100
committerAndrew Tridgell <tridge@samba.org>2008-12-03 17:47:39 +1100
commita226d86dcec393b2cd657d5441c3041dfdf5cd8f (patch)
tree03ef7f3207607a4e5351bf50892b0a39dcf6f219 /source3/librpc
parent30eff4f31b497ac94d8ee02ee2ec24bc8865ce0d (diff)
parent85b8cccab072bab263061654b677bc84826646c9 (diff)
downloadsamba-a226d86dcec393b2cd657d5441c3041dfdf5cd8f.tar.gz
samba-a226d86dcec393b2cd657d5441c3041dfdf5cd8f.tar.bz2
samba-a226d86dcec393b2cd657d5441c3041dfdf5cd8f.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/gen_ndr/cli_eventlog.c8
-rw-r--r--source3/librpc/gen_ndr/cli_eventlog.h4
-rw-r--r--source3/librpc/gen_ndr/cli_netlogon.c4
-rw-r--r--source3/librpc/gen_ndr/cli_netlogon.h4
-rw-r--r--source3/librpc/gen_ndr/cli_ntsvcs.c40
-rw-r--r--source3/librpc/gen_ndr/cli_ntsvcs.h18
-rw-r--r--source3/librpc/gen_ndr/cli_samr.c2
-rw-r--r--source3/librpc/gen_ndr/cli_samr.h2
-rw-r--r--source3/librpc/gen_ndr/cli_svcctl.c36
-rw-r--r--source3/librpc/gen_ndr/cli_svcctl.h34
-rw-r--r--source3/librpc/gen_ndr/dom_sid.h15
-rw-r--r--source3/librpc/gen_ndr/eventlog.h4
-rw-r--r--source3/librpc/gen_ndr/misc.h32
-rw-r--r--source3/librpc/gen_ndr/named_pipe_auth.h32
-rw-r--r--source3/librpc/gen_ndr/ndr_dom_sid.h10
-rw-r--r--source3/librpc/gen_ndr/ndr_eventlog.c43
-rw-r--r--source3/librpc/gen_ndr/ndr_eventlog.h1
-rw-r--r--source3/librpc/gen_ndr/ndr_misc.c53
-rw-r--r--source3/librpc/gen_ndr/ndr_misc.h6
-rw-r--r--source3/librpc/gen_ndr/ndr_named_pipe_auth.c302
-rw-r--r--source3/librpc/gen_ndr/ndr_named_pipe_auth.h20
-rw-r--r--source3/librpc/gen_ndr/ndr_netlogon.c260
-rw-r--r--source3/librpc/gen_ndr/ndr_netlogon.h7
-rw-r--r--source3/librpc/gen_ndr/ndr_ntsvcs.c196
-rw-r--r--source3/librpc/gen_ndr/ndr_samr.c129
-rw-r--r--source3/librpc/gen_ndr/ndr_samr.h7
-rw-r--r--source3/librpc/gen_ndr/ndr_security.c32
-rw-r--r--source3/librpc/gen_ndr/ndr_security.h7
-rw-r--r--source3/librpc/gen_ndr/ndr_svcctl.c216
-rw-r--r--source3/librpc/gen_ndr/ndr_svcctl.h1
-rw-r--r--source3/librpc/gen_ndr/ndr_xattr.c48
-rw-r--r--source3/librpc/gen_ndr/ndr_xattr.h6
-rw-r--r--source3/librpc/gen_ndr/netlogon.h34
-rw-r--r--source3/librpc/gen_ndr/ntsvcs.h31
-rw-r--r--source3/librpc/gen_ndr/samr.h57
-rw-r--r--source3/librpc/gen_ndr/security.h8
-rw-r--r--source3/librpc/gen_ndr/srv_lsa.c28
-rw-r--r--source3/librpc/gen_ndr/srv_netlogon.c10
-rw-r--r--source3/librpc/gen_ndr/srv_ntsvcs.c10
-rw-r--r--source3/librpc/gen_ndr/srv_samr.c2
-rw-r--r--source3/librpc/gen_ndr/srv_srvsvc.c20
-rw-r--r--source3/librpc/gen_ndr/srv_svcctl.c22
-rw-r--r--source3/librpc/gen_ndr/srv_winreg.c2
-rw-r--r--source3/librpc/gen_ndr/srv_wkssvc.c6
-rw-r--r--source3/librpc/gen_ndr/svcctl.h48
-rw-r--r--source3/librpc/gen_ndr/xattr.h6
-rw-r--r--source3/librpc/idl/dom_sid.idl29
-rw-r--r--source3/librpc/idl/samr.idl1554
-rw-r--r--source3/librpc/ndr/ndr_sec.h35
-rw-r--r--source3/librpc/ndr/ndr_sec_helper.c117
-rw-r--r--source3/librpc/ndr/sid.c53
51 files changed, 1393 insertions, 2258 deletions
diff --git a/source3/librpc/gen_ndr/cli_eventlog.c b/source3/librpc/gen_ndr/cli_eventlog.c
index 08456fc994..02d8fb2e65 100644
--- a/source3/librpc/gen_ndr/cli_eventlog.c
+++ b/source3/librpc/gen_ndr/cli_eventlog.c
@@ -278,8 +278,8 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli,
struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
struct lsa_String *logname /* [in] [ref] */,
struct lsa_String *servername /* [in] [ref] */,
- uint32_t unknown2 /* [in] */,
- uint32_t unknown3 /* [in] */,
+ uint32_t major_version /* [in] */,
+ uint32_t minor_version /* [in] */,
struct policy_handle *handle /* [out] [ref] */)
{
struct eventlog_OpenEventLogW r;
@@ -289,8 +289,8 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli,
r.in.unknown0 = unknown0;
r.in.logname = logname;
r.in.servername = servername;
- r.in.unknown2 = unknown2;
- r.in.unknown3 = unknown3;
+ r.in.major_version = major_version;
+ r.in.minor_version = minor_version;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW, &r);
diff --git a/source3/librpc/gen_ndr/cli_eventlog.h b/source3/librpc/gen_ndr/cli_eventlog.h
index 6945683340..0594a06f59 100644
--- a/source3/librpc/gen_ndr/cli_eventlog.h
+++ b/source3/librpc/gen_ndr/cli_eventlog.h
@@ -27,8 +27,8 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli,
struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */,
struct lsa_String *logname /* [in] [ref] */,
struct lsa_String *servername /* [in] [ref] */,
- uint32_t unknown2 /* [in] */,
- uint32_t unknown3 /* [in] */,
+ uint32_t major_version /* [in] */,
+ uint32_t minor_version /* [in] */,
struct policy_handle *handle /* [out] [ref] */);
NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx);
diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c
index 275c83a450..1af3249473 100644
--- a/source3/librpc/gen_ndr/cli_netlogon.c
+++ b/source3/librpc/gen_ndr/cli_netlogon.c
@@ -892,8 +892,8 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
const char *computername /* [in] [charset(UTF16)] */,
struct netr_Authenticator *credential /* [in] [ref] */,
struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
- uint8_t *change_log_entry /* [in] [ref,size_is(change_log_entry_size)] */,
- uint32_t change_log_entry_size /* [in] */,
+ struct netr_ChangeLogEntry change_log_entry /* [in] [subcontext_size(change_log_entry_size),subcontext(4)] */,
+ uint32_t change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->flags))] */,
struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */)
{
struct netr_DatabaseRedo r;
diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h
index 5adf8e8cad..9f5eac15b2 100644
--- a/source3/librpc/gen_ndr/cli_netlogon.h
+++ b/source3/librpc/gen_ndr/cli_netlogon.h
@@ -158,8 +158,8 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli,
const char *computername /* [in] [charset(UTF16)] */,
struct netr_Authenticator *credential /* [in] [ref] */,
struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
- uint8_t *change_log_entry /* [in] [ref,size_is(change_log_entry_size)] */,
- uint32_t change_log_entry_size /* [in] */,
+ struct netr_ChangeLogEntry change_log_entry /* [in] [subcontext_size(change_log_entry_size),subcontext(4)] */,
+ uint32_t change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->flags))] */,
struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */);
NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.c b/source3/librpc/gen_ndr/cli_ntsvcs.c
index f8ef7a99ad..0f97970e0b 100644
--- a/source3/librpc/gen_ndr/cli_ntsvcs.c
+++ b/source3/librpc/gen_ndr/cli_ntsvcs.c
@@ -564,7 +564,7 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *devicepath /* [in] [ref,charset(UTF16)] */,
uint32_t property /* [in] */,
- uint32_t *reg_data_type /* [in,out] [ref] */,
+ enum winreg_Type *reg_data_type /* [in,out] [ref] */,
uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
uint32_t *buffer_size /* [in,out] [ref] */,
uint32_t *needed /* [in,out] [ref] */,
@@ -1686,29 +1686,29 @@ NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli,
NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- uint32_t unknown1 /* [in] */,
+ uint32_t action /* [in] */,
const char *devicepath /* [in] [ref,charset(UTF16)] */,
- uint32_t unknown2 /* [in] */,
- uint32_t *unknown3 /* [in,out] [ref] */,
- uint16_t *unknown4 /* [in,out] [unique] */,
+ uint32_t config /* [in] */,
+ uint32_t *profile_flags /* [in,out] [ref] */,
+ uint16_t *veto_type /* [in,out] [unique] */,
const char *unknown5 /* [in] [unique,charset(UTF16)] */,
const char **unknown5a /* [out] [unique,charset(UTF16)] */,
- uint32_t unknown6 /* [in] */,
- uint32_t unknown7 /* [in] */,
+ uint32_t name_length /* [in] */,
+ uint32_t flags /* [in] */,
WERROR *werror)
{
struct PNP_HwProfFlags r;
NTSTATUS status;
/* In parameters */
- r.in.unknown1 = unknown1;
+ r.in.action = action;
r.in.devicepath = devicepath;
- r.in.unknown2 = unknown2;
- r.in.unknown3 = unknown3;
- r.in.unknown4 = unknown4;
+ r.in.config = config;
+ r.in.profile_flags = profile_flags;
+ r.in.veto_type = veto_type;
r.in.unknown5 = unknown5;
- r.in.unknown6 = unknown6;
- r.in.unknown7 = unknown7;
+ r.in.name_length = name_length;
+ r.in.flags = flags;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, &r);
@@ -1733,9 +1733,9 @@ NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli,
}
/* Return variables */
- *unknown3 = *r.out.unknown3;
- if (unknown4 && r.out.unknown4) {
- *unknown4 = *r.out.unknown4;
+ *profile_flags = *r.out.profile_flags;
+ if (veto_type && r.out.veto_type) {
+ *veto_type = *r.out.veto_type;
}
if (unknown5a && r.out.unknown5a) {
*unknown5a = *r.out.unknown5a;
@@ -1753,8 +1753,8 @@ NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32_t idx /* [in] */,
struct PNP_HwProfInfo *info /* [in,out] [ref] */,
- uint32_t unknown1 /* [in] */,
- uint32_t unknown2 /* [in] */,
+ uint32_t size /* [in] */,
+ uint32_t flags /* [in] */,
WERROR *werror)
{
struct PNP_GetHwProfInfo r;
@@ -1763,8 +1763,8 @@ NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli,
/* In parameters */
r.in.idx = idx;
r.in.info = info;
- r.in.unknown1 = unknown1;
- r.in.unknown2 = unknown2;
+ r.in.size = size;
+ r.in.flags = flags;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, &r);
diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.h b/source3/librpc/gen_ndr/cli_ntsvcs.h
index 4ed8a401ec..fc4a9f4a71 100644
--- a/source3/librpc/gen_ndr/cli_ntsvcs.h
+++ b/source3/librpc/gen_ndr/cli_ntsvcs.h
@@ -54,7 +54,7 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *devicepath /* [in] [ref,charset(UTF16)] */,
uint32_t property /* [in] */,
- uint32_t *reg_data_type /* [in,out] [ref] */,
+ enum winreg_Type *reg_data_type /* [in,out] [ref] */,
uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
uint32_t *buffer_size /* [in,out] [ref] */,
uint32_t *needed /* [in,out] [ref] */,
@@ -140,22 +140,22 @@ NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli,
WERROR *werror);
NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- uint32_t unknown1 /* [in] */,
+ uint32_t action /* [in] */,
const char *devicepath /* [in] [ref,charset(UTF16)] */,
- uint32_t unknown2 /* [in] */,
- uint32_t *unknown3 /* [in,out] [ref] */,
- uint16_t *unknown4 /* [in,out] [unique] */,
+ uint32_t config /* [in] */,
+ uint32_t *profile_flags /* [in,out] [ref] */,
+ uint16_t *veto_type /* [in,out] [unique] */,
const char *unknown5 /* [in] [unique,charset(UTF16)] */,
const char **unknown5a /* [out] [unique,charset(UTF16)] */,
- uint32_t unknown6 /* [in] */,
- uint32_t unknown7 /* [in] */,
+ uint32_t name_length /* [in] */,
+ uint32_t flags /* [in] */,
WERROR *werror);
NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
uint32_t idx /* [in] */,
struct PNP_HwProfInfo *info /* [in,out] [ref] */,
- uint32_t unknown1 /* [in] */,
- uint32_t unknown2 /* [in] */,
+ uint32_t size /* [in] */,
+ uint32_t flags /* [in] */,
WERROR *werror);
NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c
index 179bd0007f..7edb790286 100644
--- a/source3/librpc/gen_ndr/cli_samr.c
+++ b/source3/librpc/gen_ndr/cli_samr.c
@@ -2838,7 +2838,7 @@ NTSTATUS rpccli_samr_RidToSid(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle /* [in] [ref] */,
uint32_t rid /* [in] */,
- struct dom_sid2 *sid /* [out] [ref] */)
+ struct dom_sid2 **sid /* [out] [ref] */)
{
struct samr_RidToSid r;
NTSTATUS status;
diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h
index 7216d0cf3d..b57d63334e 100644
--- a/source3/librpc/gen_ndr/cli_samr.h
+++ b/source3/librpc/gen_ndr/cli_samr.h
@@ -375,7 +375,7 @@ NTSTATUS rpccli_samr_RidToSid(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *domain_handle /* [in] [ref] */,
uint32_t rid /* [in] */,
- struct dom_sid2 *sid /* [out] [ref] */);
+ struct dom_sid2 **sid /* [out] [ref] */);
NTSTATUS rpccli_samr_SetDsrmPassword(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct lsa_String *name /* [in] [unique] */,
diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c
index e5fd4dac87..9f11a40d7e 100644
--- a/source3/librpc/gen_ndr/cli_svcctl.c
+++ b/source3/librpc/gen_ndr/cli_svcctl.c
@@ -53,7 +53,7 @@ NTSTATUS rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli,
NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
- uint32_t control /* [in] */,
+ enum SERVICE_CONTROL control /* [in] */,
struct SERVICE_STATUS *service_status /* [out] [ref] */,
WERROR *werror)
{
@@ -702,10 +702,10 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
uint32_t type /* [in] */,
uint32_t state /* [in] */,
- uint32_t buf_size /* [in] */,
- uint8_t *service /* [out] [size_is(buf_size)] */,
- uint32_t *bytes_needed /* [out] [ref] */,
- uint32_t *services_returned /* [out] [ref] */,
+ uint8_t *service /* [out] [ref,size_is(buf_size)] */,
+ uint32_t buf_size /* [in] [range(0,262144)] */,
+ uint32_t *bytes_needed /* [out] [ref,range(0,262144)] */,
+ uint32_t *services_returned /* [out] [ref,range(0,262144)] */,
uint32_t *resume_handle /* [in,out] [unique] */,
WERROR *werror)
{
@@ -1976,9 +1976,9 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint32_t info_level /* [in] */,
- uint8_t *buffer /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint8_t *buffer /* [out] [ref,size_is(buf_size)] */,
+ uint32_t buf_size /* [in] [range(0,8192)] */,
+ uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */,
WERROR *werror)
{
struct svcctl_QueryServiceConfig2W r;
@@ -2027,9 +2027,9 @@ NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint32_t info_level /* [in] */,
- uint8_t *buffer /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint8_t *buffer /* [out] [ref,size_is(buf_size)] */,
+ uint32_t buf_size /* [in] [range(0,8192)] */,
+ uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */,
WERROR *werror)
{
struct svcctl_QueryServiceStatusEx r;
@@ -2144,12 +2144,12 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli,
uint32_t info_level /* [in] */,
uint32_t type /* [in] */,
uint32_t state /* [in] */,
- uint8_t *services /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
- uint32_t *service_returned /* [out] [ref] */,
- uint32_t *resume_handle /* [in,out] [unique] */,
- const char **group_name /* [out] [ref,charset(UTF16)] */,
+ uint8_t *services /* [out] [ref,size_is(buf_size)] */,
+ uint32_t buf_size /* [in] [range(0,262144)] */,
+ uint32_t *bytes_needed /* [out] [ref,range(0,262144)] */,
+ uint32_t *service_returned /* [out] [ref,range(0,262144)] */,
+ uint32_t *resume_handle /* [in,out] [unique,range(0,262144)] */,
+ const char *group_name /* [in] [unique,charset(UTF16)] */,
WERROR *werror)
{
struct EnumServicesStatusExW r;
@@ -2162,6 +2162,7 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli,
r.in.state = state;
r.in.buf_size = buf_size;
r.in.resume_handle = resume_handle;
+ r.in.group_name = group_name;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &r);
@@ -2192,7 +2193,6 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli,
if (resume_handle && r.out.resume_handle) {
*resume_handle = *r.out.resume_handle;
}
- *group_name = *r.out.group_name;
/* Return result */
if (werror) {
diff --git a/source3/librpc/gen_ndr/cli_svcctl.h b/source3/librpc/gen_ndr/cli_svcctl.h
index 02abbadf1e..78c9bf40d8 100644
--- a/source3/librpc/gen_ndr/cli_svcctl.h
+++ b/source3/librpc/gen_ndr/cli_svcctl.h
@@ -8,7 +8,7 @@ NTSTATUS rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli,
NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
- uint32_t control /* [in] */,
+ enum SERVICE_CONTROL control /* [in] */,
struct SERVICE_STATUS *service_status /* [out] [ref] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli,
@@ -104,10 +104,10 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
uint32_t type /* [in] */,
uint32_t state /* [in] */,
- uint32_t buf_size /* [in] */,
- uint8_t *service /* [out] [size_is(buf_size)] */,
- uint32_t *bytes_needed /* [out] [ref] */,
- uint32_t *services_returned /* [out] [ref] */,
+ uint8_t *service /* [out] [ref,size_is(buf_size)] */,
+ uint32_t buf_size /* [in] [range(0,262144)] */,
+ uint32_t *bytes_needed /* [out] [ref,range(0,262144)] */,
+ uint32_t *services_returned /* [out] [ref,range(0,262144)] */,
uint32_t *resume_handle /* [in,out] [unique] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli,
@@ -292,17 +292,17 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint32_t info_level /* [in] */,
- uint8_t *buffer /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint8_t *buffer /* [out] [ref,size_is(buf_size)] */,
+ uint32_t buf_size /* [in] [range(0,8192)] */,
+ uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint32_t info_level /* [in] */,
- uint8_t *buffer /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint8_t *buffer /* [out] [ref,size_is(buf_size)] */,
+ uint32_t buf_size /* [in] [range(0,8192)] */,
+ uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */,
WERROR *werror);
NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -323,12 +323,12 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli,
uint32_t info_level /* [in] */,
uint32_t type /* [in] */,
uint32_t state /* [in] */,
- uint8_t *services /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
- uint32_t *service_returned /* [out] [ref] */,
- uint32_t *resume_handle /* [in,out] [unique] */,
- const char **group_name /* [out] [ref,charset(UTF16)] */,
+ uint8_t *services /* [out] [ref,size_is(buf_size)] */,
+ uint32_t buf_size /* [in] [range(0,262144)] */,
+ uint32_t *bytes_needed /* [out] [ref,range(0,262144)] */,
+ uint32_t *service_returned /* [out] [ref,range(0,262144)] */,
+ uint32_t *resume_handle /* [in,out] [unique,range(0,262144)] */,
+ const char *group_name /* [in] [unique,charset(UTF16)] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/dom_sid.h b/source3/librpc/gen_ndr/dom_sid.h
new file mode 100644
index 0000000000..57dd16855a
--- /dev/null
+++ b/source3/librpc/gen_ndr/dom_sid.h
@@ -0,0 +1,15 @@
+/* header auto-generated by pidl */
+
+#include <stdint.h>
+
+#define dom_sid2 dom_sid
+#define dom_sid28 dom_sid
+#define dom_sid0 dom_sid
+#ifndef _HEADER_dom_sid
+#define _HEADER_dom_sid
+
+struct _dummy_domsid {
+ uint8_t dummy;
+};
+
+#endif /* _HEADER_dom_sid */
diff --git a/source3/librpc/gen_ndr/eventlog.h b/source3/librpc/gen_ndr/eventlog.h
index 0fd929dd99..76b9e863bb 100644
--- a/source3/librpc/gen_ndr/eventlog.h
+++ b/source3/librpc/gen_ndr/eventlog.h
@@ -131,8 +131,8 @@ struct eventlog_OpenEventLogW {
struct eventlog_OpenUnknown0 *unknown0;/* [unique] */
struct lsa_String *logname;/* [ref] */
struct lsa_String *servername;/* [ref] */
- uint32_t unknown2;
- uint32_t unknown3;
+ uint32_t major_version;
+ uint32_t minor_version;
} in;
struct {
diff --git a/source3/librpc/gen_ndr/misc.h b/source3/librpc/gen_ndr/misc.h
index b3740faf34..d1cf64e0eb 100644
--- a/source3/librpc/gen_ndr/misc.h
+++ b/source3/librpc/gen_ndr/misc.h
@@ -42,36 +42,4 @@ enum netr_SchannelType
#endif
;
-enum netr_SamDatabaseID
-#ifndef USE_UINT_ENUMS
- {
- SAM_DATABASE_DOMAIN=0,
- SAM_DATABASE_BUILTIN=1,
- SAM_DATABASE_PRIVS=2
-}
-#else
- { __donnot_use_enum_netr_SamDatabaseID=0x7FFFFFFF}
-#define SAM_DATABASE_DOMAIN ( 0 )
-#define SAM_DATABASE_BUILTIN ( 1 )
-#define SAM_DATABASE_PRIVS ( 2 )
-#endif
-;
-
-enum samr_RejectReason
-#ifndef USE_UINT_ENUMS
- {
- SAMR_REJECT_OTHER=0,
- SAMR_REJECT_TOO_SHORT=1,
- SAMR_REJECT_IN_HISTORY=2,
- SAMR_REJECT_COMPLEXITY=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
-;
-
#endif /* _HEADER_misc */
diff --git a/source3/librpc/gen_ndr/named_pipe_auth.h b/source3/librpc/gen_ndr/named_pipe_auth.h
new file mode 100644
index 0000000000..5f4ba9afb1
--- /dev/null
+++ b/source3/librpc/gen_ndr/named_pipe_auth.h
@@ -0,0 +1,32 @@
+/* header auto-generated by pidl */
+
+#include <stdint.h>
+
+#include "librpc/gen_ndr/netlogon.h"
+#ifndef _HEADER_named_pipe_auth
+#define _HEADER_named_pipe_auth
+
+#define NAMED_PIPE_AUTH_MAGIC ( "NPAM" )
+union named_pipe_auth_req_info {
+ struct netr_SamInfo3 info1;/* [case] */
+}/* [switch_type(uint32)] */;
+
+struct named_pipe_auth_req {
+ uint32_t length;/* [value(ndr_size_named_pipe_auth_req(r,ndr->flags)-4),flag(LIBNDR_FLAG_BIGENDIAN)] */
+ const char *magic;/* [value(NAMED_PIPE_AUTH_MAGIC),charset(DOS)] */
+ uint32_t level;
+ union named_pipe_auth_req_info info;/* [switch_is(level)] */
+}/* [gensize,public] */;
+
+union named_pipe_auth_rep_info {
+}/* [switch_type(uint32)] */;
+
+struct named_pipe_auth_rep {
+ uint32_t length;/* [value(ndr_size_named_pipe_auth_rep(r,ndr->flags)-4),flag(LIBNDR_FLAG_BIGENDIAN)] */
+ const char *magic;/* [value(NAMED_PIPE_AUTH_MAGIC),charset(DOS)] */
+ uint32_t level;
+ union named_pipe_auth_rep_info info;/* [switch_is(level)] */
+ NTSTATUS status;
+}/* [gensize,public] */;
+
+#endif /* _HEADER_named_pipe_auth */
diff --git a/source3/librpc/gen_ndr/ndr_dom_sid.h b/source3/librpc/gen_ndr/ndr_dom_sid.h
new file mode 100644
index 0000000000..145ec1db46
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_dom_sid.h
@@ -0,0 +1,10 @@
+/* header auto-generated by pidl */
+
+#include "librpc/ndr/libndr.h"
+#include "librpc/gen_ndr/dom_sid.h"
+
+#ifndef _HEADER_NDR_dom_sid
+#define _HEADER_NDR_dom_sid
+
+#define NDR_DOM_SID_CALL_COUNT (0)
+#endif /* _HEADER_NDR_dom_sid */
diff --git a/source3/librpc/gen_ndr/ndr_eventlog.c b/source3/librpc/gen_ndr/ndr_eventlog.c
index f0c7ee4d61..12fa9fcec4 100644
--- a/source3/librpc/gen_ndr/ndr_eventlog.c
+++ b/source3/librpc/gen_ndr/ndr_eventlog.c
@@ -5,6 +5,31 @@
#include "librpc/gen_ndr/ndr_lsa.h"
#include "librpc/gen_ndr/ndr_security.h"
+static enum ndr_err_code ndr_push_eventlogReadFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_eventlogReadFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_eventlogReadFlags(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+ ndr_print_uint32(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_SEQUENTIAL_READ", EVENTLOG_SEQUENTIAL_READ, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_SEEK_READ", EVENTLOG_SEEK_READ, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_FORWARDS_READ", EVENTLOG_FORWARDS_READ, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_BACKWARDS_READ", EVENTLOG_BACKWARDS_READ, r);
+ ndr->depth--;
+}
+
static enum ndr_err_code ndr_push_eventlog_OpenUnknown0(struct ndr_push *ndr, int ndr_flags, const struct eventlog_OpenUnknown0 *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -635,8 +660,8 @@ static enum ndr_err_code ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, i
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
}
if (flags & NDR_OUT) {
if (r->out.handle == NULL) {
@@ -684,8 +709,8 @@ static enum ndr_err_code ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, i
NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
NDR_PULL_ALLOC(ndr, r->out.handle);
ZERO_STRUCTP(r->out.handle);
}
@@ -726,8 +751,8 @@ _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char
ndr->depth++;
ndr_print_lsa_String(ndr, "servername", r->in.servername);
ndr->depth--;
- ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
- ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
+ ndr_print_uint32(ndr, "major_version", r->in.major_version);
+ ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -832,7 +857,7 @@ static enum ndr_err_code ndr_push_eventlog_ReadEventLogW(struct ndr_push *ndr, i
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
+ NDR_CHECK(ndr_push_eventlogReadFlags(ndr, NDR_SCALARS, r->in.flags));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offset));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.number_of_bytes));
}
@@ -870,7 +895,7 @@ static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, i
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ NDR_CHECK(ndr_pull_eventlogReadFlags(ndr, NDR_SCALARS, &r->in.flags));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offset));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.number_of_bytes));
if (r->in.number_of_bytes < 0 || r->in.number_of_bytes > 0x7FFFF) {
@@ -925,7 +950,7 @@ _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct ndr_print *ndr, const char
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint32(ndr, "flags", r->in.flags);
+ ndr_print_eventlogReadFlags(ndr, "flags", r->in.flags);
ndr_print_uint32(ndr, "offset", r->in.offset);
ndr_print_uint32(ndr, "number_of_bytes", r->in.number_of_bytes);
ndr->depth--;
diff --git a/source3/librpc/gen_ndr/ndr_eventlog.h b/source3/librpc/gen_ndr/ndr_eventlog.h
index 6c6e679eca..6002f35a7d 100644
--- a/source3/librpc/gen_ndr/ndr_eventlog.h
+++ b/source3/librpc/gen_ndr/ndr_eventlog.h
@@ -60,6 +60,7 @@ extern const struct ndr_interface_table ndr_table_eventlog;
#define NDR_EVENTLOG_FLUSHEVENTLOG (0x17)
#define NDR_EVENTLOG_CALL_COUNT (24)
+void ndr_print_eventlogReadFlags(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char *name, const struct eventlog_OpenUnknown0 *r);
enum ndr_err_code ndr_push_eventlog_Record(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record *r);
enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int ndr_flags, struct eventlog_Record *r);
diff --git a/source3/librpc/gen_ndr/ndr_misc.c b/source3/librpc/gen_ndr/ndr_misc.c
index 22c416a0d7..971cbdac24 100644
--- a/source3/librpc/gen_ndr/ndr_misc.c
+++ b/source3/librpc/gen_ndr/ndr_misc.c
@@ -132,56 +132,3 @@ _PUBLIC_ void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *nam
ndr_print_enum(ndr, name, "ENUM", val, r);
}
-_PUBLIC_ enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r)
-{
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r)
-{
- uint32_t v;
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
- *r = v;
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r)
-{
- const char *val = NULL;
-
- switch (r) {
- case SAM_DATABASE_DOMAIN: val = "SAM_DATABASE_DOMAIN"; break;
- case SAM_DATABASE_BUILTIN: val = "SAM_DATABASE_BUILTIN"; break;
- case SAM_DATABASE_PRIVS: val = "SAM_DATABASE_PRIVS"; break;
- }
- 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_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_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);
-}
-
diff --git a/source3/librpc/gen_ndr/ndr_misc.h b/source3/librpc/gen_ndr/ndr_misc.h
index a15a781367..b907af0605 100644
--- a/source3/librpc/gen_ndr/ndr_misc.h
+++ b/source3/librpc/gen_ndr/ndr_misc.h
@@ -20,10 +20,4 @@ void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const stru
enum ndr_err_code ndr_push_netr_SchannelType(struct ndr_push *ndr, int ndr_flags, enum netr_SchannelType r);
enum ndr_err_code ndr_pull_netr_SchannelType(struct ndr_pull *ndr, int ndr_flags, enum netr_SchannelType *r);
void ndr_print_netr_SchannelType(struct ndr_print *ndr, const char *name, enum netr_SchannelType r);
-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);
#endif /* _HEADER_NDR_misc */
diff --git a/source3/librpc/gen_ndr/ndr_named_pipe_auth.c b/source3/librpc/gen_ndr/ndr_named_pipe_auth.c
new file mode 100644
index 0000000000..69412bf427
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_named_pipe_auth.c
@@ -0,0 +1,302 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_named_pipe_auth.h"
+
+#include "librpc/gen_ndr/ndr_netlogon.h"
+static enum ndr_err_code ndr_push_named_pipe_auth_req_info(struct ndr_push *ndr, int ndr_flags, const union named_pipe_auth_req_info *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0: {
+ break; }
+
+ case 1: {
+ NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_push_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_named_pipe_auth_req_info(struct ndr_pull *ndr, int ndr_flags, union named_pipe_auth_req_info *r)
+{
+ int level;
+ uint32_t _level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+ }
+ switch (level) {
+ case 0: {
+ break; }
+
+ case 1: {
+ NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_SCALARS, &r->info1));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ NDR_CHECK(ndr_pull_netr_SamInfo3(ndr, NDR_BUFFERS, &r->info1));
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_named_pipe_auth_req_info(struct ndr_print *ndr, const char *name, const union named_pipe_auth_req_info *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "named_pipe_auth_req_info");
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ ndr_print_netr_SamInfo3(ndr, "info1", &r->info1);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_named_pipe_auth_req(struct ndr_push *ndr, int ndr_flags, const struct named_pipe_auth_req *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_uint32 = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_named_pipe_auth_req(r, ndr->flags) - 4));
+ ndr->flags = _flags_save_uint32;
+ }
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, NAMED_PIPE_AUTH_MAGIC, 4, sizeof(uint8_t), CH_DOS));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
+ NDR_CHECK(ndr_push_named_pipe_auth_req_info(ndr, NDR_SCALARS, &r->info));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_named_pipe_auth_req_info(ndr, NDR_BUFFERS, &r->info));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_named_pipe_auth_req(struct ndr_pull *ndr, int ndr_flags, struct named_pipe_auth_req *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_uint32 = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
+ ndr->flags = _flags_save_uint32;
+ }
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->magic, 4, sizeof(uint8_t), CH_DOS));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
+ NDR_CHECK(ndr_pull_named_pipe_auth_req_info(ndr, NDR_SCALARS, &r->info));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_named_pipe_auth_req_info(ndr, NDR_BUFFERS, &r->info));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_named_pipe_auth_req(struct ndr_print *ndr, const char *name, const struct named_pipe_auth_req *r)
+{
+ ndr_print_struct(ndr, name, "named_pipe_auth_req");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_named_pipe_auth_req(r, ndr->flags) - 4:r->length);
+ ndr_print_string(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NAMED_PIPE_AUTH_MAGIC:r->magic);
+ ndr_print_uint32(ndr, "level", r->level);
+ ndr_print_set_switch_value(ndr, &r->info, r->level);
+ ndr_print_named_pipe_auth_req_info(ndr, "info", &r->info);
+ ndr->depth--;
+}
+
+_PUBLIC_ size_t ndr_size_named_pipe_auth_req(const struct named_pipe_auth_req *r, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_named_pipe_auth_req);
+}
+
+static enum ndr_err_code ndr_push_named_pipe_auth_rep_info(struct ndr_push *ndr, int ndr_flags, const union named_pipe_auth_rep_info *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 0: {
+ break; }
+
+ case 1: {
+ break; }
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_named_pipe_auth_rep_info(struct ndr_pull *ndr, int ndr_flags, union named_pipe_auth_rep_info *r)
+{
+ int level;
+ uint32_t _level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+ }
+ switch (level) {
+ case 0: {
+ break; }
+
+ case 1: {
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_named_pipe_auth_rep_info(struct ndr_print *ndr, const char *name, const union named_pipe_auth_rep_info *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "named_pipe_auth_rep_info");
+ switch (level) {
+ case 0:
+ break;
+
+ case 1:
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_named_pipe_auth_rep(struct ndr_push *ndr, int ndr_flags, const struct named_pipe_auth_rep *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ {
+ uint32_t _flags_save_uint32 = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_named_pipe_auth_rep(r, ndr->flags) - 4));
+ ndr->flags = _flags_save_uint32;
+ }
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, NAMED_PIPE_AUTH_MAGIC, 4, sizeof(uint8_t), CH_DOS));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
+ NDR_CHECK(ndr_push_named_pipe_auth_rep_info(ndr, NDR_SCALARS, &r->info));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->status));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_named_pipe_auth_rep_info(ndr, NDR_BUFFERS, &r->info));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_named_pipe_auth_rep(struct ndr_pull *ndr, int ndr_flags, struct named_pipe_auth_rep *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ {
+ uint32_t _flags_save_uint32 = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_BIGENDIAN);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
+ ndr->flags = _flags_save_uint32;
+ }
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->magic, 4, sizeof(uint8_t), CH_DOS));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
+ NDR_CHECK(ndr_pull_named_pipe_auth_rep_info(ndr, NDR_SCALARS, &r->info));
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_named_pipe_auth_rep_info(ndr, NDR_BUFFERS, &r->info));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_named_pipe_auth_rep(struct ndr_print *ndr, const char *name, const struct named_pipe_auth_rep *r)
+{
+ ndr_print_struct(ndr, name, "named_pipe_auth_rep");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_named_pipe_auth_rep(r, ndr->flags) - 4:r->length);
+ ndr_print_string(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?NAMED_PIPE_AUTH_MAGIC:r->magic);
+ ndr_print_uint32(ndr, "level", r->level);
+ ndr_print_set_switch_value(ndr, &r->info, r->level);
+ ndr_print_named_pipe_auth_rep_info(ndr, "info", &r->info);
+ ndr_print_NTSTATUS(ndr, "status", r->status);
+ ndr->depth--;
+}
+
+_PUBLIC_ size_t ndr_size_named_pipe_auth_rep(const struct named_pipe_auth_rep *r, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_named_pipe_auth_rep);
+}
+
diff --git a/source3/librpc/gen_ndr/ndr_named_pipe_auth.h b/source3/librpc/gen_ndr/ndr_named_pipe_auth.h
new file mode 100644
index 0000000000..fbef9d5f1c
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_named_pipe_auth.h
@@ -0,0 +1,20 @@
+/* header auto-generated by pidl */
+
+#include "librpc/ndr/libndr.h"
+#include "librpc/gen_ndr/named_pipe_auth.h"
+
+#ifndef _HEADER_NDR_named_pipe_auth
+#define _HEADER_NDR_named_pipe_auth
+
+#define NDR_NAMED_PIPE_AUTH_CALL_COUNT (0)
+void ndr_print_named_pipe_auth_req_info(struct ndr_print *ndr, const char *name, const union named_pipe_auth_req_info *r);
+enum ndr_err_code ndr_push_named_pipe_auth_req(struct ndr_push *ndr, int ndr_flags, const struct named_pipe_auth_req *r);
+enum ndr_err_code ndr_pull_named_pipe_auth_req(struct ndr_pull *ndr, int ndr_flags, struct named_pipe_auth_req *r);
+void ndr_print_named_pipe_auth_req(struct ndr_print *ndr, const char *name, const struct named_pipe_auth_req *r);
+size_t ndr_size_named_pipe_auth_req(const struct named_pipe_auth_req *r, int flags);
+void ndr_print_named_pipe_auth_rep_info(struct ndr_print *ndr, const char *name, const union named_pipe_auth_rep_info *r);
+enum ndr_err_code ndr_push_named_pipe_auth_rep(struct ndr_push *ndr, int ndr_flags, const struct named_pipe_auth_rep *r);
+enum ndr_err_code ndr_pull_named_pipe_auth_rep(struct ndr_pull *ndr, int ndr_flags, struct named_pipe_auth_rep *r);
+void ndr_print_named_pipe_auth_rep(struct ndr_print *ndr, const char *name, const struct named_pipe_auth_rep *r);
+size_t ndr_size_named_pipe_auth_rep(const struct named_pipe_auth_rep *r, int flags);
+#endif /* _HEADER_NDR_named_pipe_auth */
diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c
index 12ab98e610..c4102eba6e 100644
--- a/source3/librpc/gen_ndr/ndr_netlogon.c
+++ b/source3/librpc/gen_ndr/ndr_netlogon.c
@@ -363,8 +363,6 @@ static enum ndr_err_code ndr_push_netr_PasswordInfo(struct ndr_push *ndr, int nd
}
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_push_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
- NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->lmpassword));
- NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->ntpassword));
}
return NDR_ERR_SUCCESS;
}
@@ -379,8 +377,6 @@ static enum ndr_err_code ndr_pull_netr_PasswordInfo(struct ndr_pull *ndr, int nd
}
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_pull_netr_IdentityInfo(ndr, NDR_BUFFERS, &r->identity_info));
- NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->lmpassword));
- NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->ntpassword));
}
return NDR_ERR_SUCCESS;
}
@@ -2212,7 +2208,6 @@ static enum ndr_err_code ndr_push_netr_USER_KEY16(struct ndr_push *ndr, int ndr_
NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->pwd));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->pwd));
}
return NDR_ERR_SUCCESS;
}
@@ -2227,7 +2222,6 @@ static enum ndr_err_code ndr_pull_netr_USER_KEY16(struct ndr_pull *ndr, int ndr_
NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->pwd));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->pwd));
}
return NDR_ERR_SUCCESS;
}
@@ -2305,8 +2299,6 @@ static enum ndr_err_code ndr_push_netr_USER_KEYS2(struct ndr_push *ndr, int ndr_
NDR_CHECK(ndr_push_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_BUFFERS, &r->lmpassword));
- NDR_CHECK(ndr_push_netr_USER_KEY16(ndr, NDR_BUFFERS, &r->ntpassword));
}
return NDR_ERR_SUCCESS;
}
@@ -2320,8 +2312,6 @@ static enum ndr_err_code ndr_pull_netr_USER_KEYS2(struct ndr_pull *ndr, int ndr_
NDR_CHECK(ndr_pull_netr_PasswordHistory(ndr, NDR_SCALARS, &r->history));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_BUFFERS, &r->lmpassword));
- NDR_CHECK(ndr_pull_netr_USER_KEY16(ndr, NDR_BUFFERS, &r->ntpassword));
}
return NDR_ERR_SUCCESS;
}
@@ -2343,7 +2333,6 @@ static enum ndr_err_code ndr_push_netr_USER_KEY_UNION(struct ndr_push *ndr, int
NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_push_netr_USER_KEYS2(ndr, NDR_BUFFERS, &r->keys2));
}
return NDR_ERR_SUCCESS;
}
@@ -2355,7 +2344,6 @@ static enum ndr_err_code ndr_pull_netr_USER_KEY_UNION(struct ndr_pull *ndr, int
NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr, NDR_SCALARS, &r->keys2));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_pull_netr_USER_KEYS2(ndr, NDR_BUFFERS, &r->keys2));
}
return NDR_ERR_SUCCESS;
}
@@ -2376,7 +2364,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_netr_USER_KEYS(struct ndr_push *ndr, int ndr
NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_push_netr_USER_KEY_UNION(ndr, NDR_BUFFERS, &r->keys));
}
return NDR_ERR_SUCCESS;
}
@@ -2389,7 +2376,6 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netr_USER_KEYS(struct ndr_pull *ndr, int ndr
NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr, NDR_SCALARS, &r->keys));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_pull_netr_USER_KEY_UNION(ndr, NDR_BUFFERS, &r->keys));
}
return NDR_ERR_SUCCESS;
}
@@ -2513,7 +2499,7 @@ static enum ndr_err_code ndr_push_netr_DELTA_USER(struct ndr_push *ndr, int ndr_
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->lm_password_present));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->comment));
- NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->parameters));
+ NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->country_code));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->code_page));
NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
@@ -2537,10 +2523,8 @@ static enum ndr_err_code ndr_push_netr_DELTA_USER(struct ndr_push *ndr, int ndr_
NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->description));
NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
NDR_CHECK(ndr_push_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
- NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->lmpassword));
- NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->ntpassword));
NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->comment));
- NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->parameters));
+ NDR_CHECK(ndr_push_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
NDR_CHECK(ndr_push_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info));
NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
@@ -2578,7 +2562,7 @@ static enum ndr_err_code ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, int ndr_
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->lm_password_present));
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->comment));
- NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->parameters));
+ NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_SCALARS, &r->parameters));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->country_code));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->code_page));
NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_SCALARS, &r->user_private_info));
@@ -2602,10 +2586,8 @@ static enum ndr_err_code ndr_pull_netr_DELTA_USER(struct ndr_pull *ndr, int ndr_
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->description));
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->workstations));
NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
- NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->lmpassword));
- NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->ntpassword));
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->comment));
- NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->parameters));
+ NDR_CHECK(ndr_pull_lsa_BinaryString(ndr, NDR_BUFFERS, &r->parameters));
NDR_CHECK(ndr_pull_netr_USER_PRIVATE_INFO(ndr, NDR_BUFFERS, &r->user_private_info));
NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sdbuf));
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->profile_path));
@@ -2643,7 +2625,7 @@ _PUBLIC_ void ndr_print_netr_DELTA_USER(struct ndr_print *ndr, const char *name,
ndr_print_uint8(ndr, "lm_password_present", r->lm_password_present);
ndr_print_uint8(ndr, "password_expired", r->password_expired);
ndr_print_lsa_String(ndr, "comment", &r->comment);
- ndr_print_lsa_String(ndr, "parameters", &r->parameters);
+ ndr_print_lsa_BinaryString(ndr, "parameters", &r->parameters);
ndr_print_uint16(ndr, "country_code", r->country_code);
ndr_print_uint16(ndr, "code_page", r->code_page);
ndr_print_netr_USER_PRIVATE_INFO(ndr, "user_private_info", &r->user_private_info);
@@ -6232,6 +6214,192 @@ _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *n
ndr->depth--;
}
+static enum ndr_err_code ndr_push_netr_ChangeLogFlags(struct ndr_push *ndr, int ndr_flags, uint16_t r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_netr_ChangeLogFlags(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_ChangeLogFlags(struct ndr_print *ndr, const char *name, uint16_t r)
+{
+ ndr_print_uint16(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED", NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_CHANGED_PASSWORD", NETR_CHANGELOG_CHANGED_PASSWORD, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_SID_INCLUDED", NETR_CHANGELOG_SID_INCLUDED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_NAME_INCLUDED", NETR_CHANGELOG_NAME_INCLUDED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "NETR_CHANGELOG_FIRST_PROMOTION_OBJ", NETR_CHANGELOG_FIRST_PROMOTION_OBJ, r);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_netr_ChangeLogObject(struct ndr_push *ndr, int ndr_flags, const union netr_ChangeLogObject *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case NETR_CHANGELOG_SID_INCLUDED: {
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->object_sid));
+ break; }
+
+ case NETR_CHANGELOG_NAME_INCLUDED: {
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->object_name));
+ ndr->flags = _flags_save_string;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case NETR_CHANGELOG_SID_INCLUDED:
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_BUFFERS, &r->object_sid));
+ break;
+
+ case NETR_CHANGELOG_NAME_INCLUDED:
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_netr_ChangeLogObject(struct ndr_pull *ndr, int ndr_flags, union netr_ChangeLogObject *r)
+{
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case NETR_CHANGELOG_SID_INCLUDED: {
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->object_sid));
+ break; }
+
+ case NETR_CHANGELOG_NAME_INCLUDED: {
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->object_name));
+ ndr->flags = _flags_save_string;
+ }
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case NETR_CHANGELOG_SID_INCLUDED:
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_BUFFERS, &r->object_sid));
+ break;
+
+ case NETR_CHANGELOG_NAME_INCLUDED:
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_ChangeLogObject(struct ndr_print *ndr, const char *name, const union netr_ChangeLogObject *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "netr_ChangeLogObject");
+ switch (level) {
+ case NETR_CHANGELOG_SID_INCLUDED:
+ ndr_print_dom_sid(ndr, "object_sid", &r->object_sid);
+ break;
+
+ case NETR_CHANGELOG_NAME_INCLUDED:
+ ndr_print_string(ndr, "object_name", r->object_name);
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_netr_ChangeLogEntry(struct ndr_push *ndr, int ndr_flags, const struct netr_ChangeLogEntry *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serial_number2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_rid));
+ NDR_CHECK(ndr_push_netr_ChangeLogFlags(ndr, NDR_SCALARS, r->flags));
+ NDR_CHECK(ndr_push_netr_SamDatabaseID8Bit(ndr, NDR_SCALARS, r->db_index));
+ NDR_CHECK(ndr_push_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, r->delta_type));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
+ NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_netr_ChangeLogEntry(struct ndr_pull *ndr, int ndr_flags, struct netr_ChangeLogEntry *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number1));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serial_number2));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_rid));
+ NDR_CHECK(ndr_pull_netr_ChangeLogFlags(ndr, NDR_SCALARS, &r->flags));
+ NDR_CHECK(ndr_pull_netr_SamDatabaseID8Bit(ndr, NDR_SCALARS, &r->db_index));
+ NDR_CHECK(ndr_pull_netr_DeltaEnum8Bit(ndr, NDR_SCALARS, &r->delta_type));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED)));
+ NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_SCALARS, &r->object));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_netr_ChangeLogObject(ndr, NDR_BUFFERS, &r->object));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, const struct netr_ChangeLogEntry *r)
+{
+ ndr_print_struct(ndr, name, "netr_ChangeLogEntry");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "serial_number1", r->serial_number1);
+ ndr_print_uint32(ndr, "serial_number2", r->serial_number2);
+ ndr_print_uint32(ndr, "object_rid", r->object_rid);
+ ndr_print_netr_ChangeLogFlags(ndr, "flags", r->flags);
+ ndr_print_netr_SamDatabaseID8Bit(ndr, "db_index", r->db_index);
+ ndr_print_netr_DeltaEnum8Bit(ndr, "delta_type", r->delta_type);
+ ndr_print_set_switch_value(ndr, &r->object, r->flags & (NETR_CHANGELOG_SID_INCLUDED | NETR_CHANGELOG_NAME_INCLUDED));
+ ndr_print_netr_ChangeLogObject(ndr, "object", &r->object);
+ ndr->depth--;
+}
+
+_PUBLIC_ size_t ndr_size_netr_ChangeLogEntry(const struct netr_ChangeLogEntry *r, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry);
+}
+
static enum ndr_err_code ndr_push_netr_Blob(struct ndr_push *ndr, int ndr_flags, const struct netr_Blob *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -9422,7 +9590,7 @@ static enum ndr_err_code ndr_push_netr_ServerPasswordSet(struct ndr_push *ndr, i
if (r->in.new_password == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_password));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->in.new_password));
}
if (flags & NDR_OUT) {
if (r->out.return_authenticator == NULL) {
@@ -9489,7 +9657,7 @@ static enum ndr_err_code ndr_pull_netr_ServerPasswordSet(struct ndr_pull *ndr, i
}
_mem_save_new_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.new_password, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_password));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->in.new_password));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_password_0, LIBNDR_FLAG_REF_ALLOC);
NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
ZERO_STRUCTP(r->out.return_authenticator);
@@ -11307,12 +11475,13 @@ static enum ndr_err_code ndr_push_netr_DatabaseRedo(struct ndr_push *ndr, int fl
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
- if (r->in.change_log_entry == NULL) {
- return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ {
+ struct ndr_push *_ndr_change_log_entry;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_change_log_entry, 4, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags)));
+ NDR_CHECK(ndr_push_netr_ChangeLogEntry(_ndr_change_log_entry, NDR_SCALARS|NDR_BUFFERS, &r->in.change_log_entry));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_change_log_entry, 4, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags)));
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.change_log_entry_size));
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.change_log_entry, r->in.change_log_entry_size));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.change_log_entry_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags)));
}
if (flags & NDR_OUT) {
if (r->out.return_authenticator == NULL) {
@@ -11369,19 +11538,17 @@ static enum ndr_err_code ndr_pull_netr_DatabaseRedo(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_array_size(ndr, &r->in.change_log_entry));
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC_N(ndr, r->in.change_log_entry, ndr_get_array_size(ndr, &r->in.change_log_entry));
+ {
+ struct ndr_pull *_ndr_change_log_entry;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_change_log_entry, 4, r->in.change_log_entry_size));
+ NDR_CHECK(ndr_pull_netr_ChangeLogEntry(_ndr_change_log_entry, NDR_SCALARS|NDR_BUFFERS, &r->in.change_log_entry));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_change_log_entry, 4, r->in.change_log_entry_size));
}
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.change_log_entry, ndr_get_array_size(ndr, &r->in.change_log_entry)));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.change_log_entry_size));
NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
*r->out.return_authenticator = *r->in.return_authenticator;
NDR_PULL_ALLOC(ndr, r->out.delta_enum_array);
ZERO_STRUCTP(r->out.delta_enum_array);
- if (r->in.change_log_entry) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.change_log_entry, r->in.change_log_entry_size));
- }
}
if (flags & NDR_OUT) {
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
@@ -11434,11 +11601,8 @@ _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *nam
ndr->depth++;
ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
ndr->depth--;
- ndr_print_ptr(ndr, "change_log_entry", r->in.change_log_entry);
- ndr->depth++;
- ndr_print_array_uint8(ndr, "change_log_entry", r->in.change_log_entry, r->in.change_log_entry_size);
- ndr->depth--;
- ndr_print_uint32(ndr, "change_log_entry_size", r->in.change_log_entry_size);
+ ndr_print_netr_ChangeLogEntry(ndr, "change_log_entry", &r->in.change_log_entry);
+ ndr_print_uint32(ndr, "change_log_entry_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_netr_ChangeLogEntry(&r->in.change_log_entry, ndr->flags):r->in.change_log_entry_size);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -13028,7 +13192,7 @@ static enum ndr_err_code ndr_push_netr_ServerPasswordGet(struct ndr_push *ndr, i
if (r->out.password == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.password));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -13102,7 +13266,7 @@ static enum ndr_err_code ndr_pull_netr_ServerPasswordGet(struct ndr_pull *ndr, i
}
_mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.password, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.password));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
@@ -14522,11 +14686,11 @@ static enum ndr_err_code ndr_push_netr_ServerTrustPasswordsGet(struct ndr_push *
if (r->out.password == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.password));
if (r->out.password2 == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password2));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, r->out.password2));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -14603,14 +14767,14 @@ static enum ndr_err_code ndr_pull_netr_ServerTrustPasswordsGet(struct ndr_pull *
}
_mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.password, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.password));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.password2);
}
_mem_save_password2_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.password2, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.password2));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, r->out.password2));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password2_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
diff --git a/source3/librpc/gen_ndr/ndr_netlogon.h b/source3/librpc/gen_ndr/ndr_netlogon.h
index 8561a5b5ca..be20448636 100644
--- a/source3/librpc/gen_ndr/ndr_netlogon.h
+++ b/source3/librpc/gen_ndr/ndr_netlogon.h
@@ -6,6 +6,7 @@
#ifndef _HEADER_NDR_netlogon
#define _HEADER_NDR_netlogon
+#include "../librpc/ndr/ndr_netlogon.h"
#define NDR_NETLOGON_UUID "12345678-1234-abcd-ef00-01234567cffb"
#define NDR_NETLOGON_VERSION 1.0
#define NDR_NETLOGON_NAME "netlogon"
@@ -190,6 +191,12 @@ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char
void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r);
void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r);
void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *name, uint32_t r);
+void ndr_print_netr_ChangeLogFlags(struct ndr_print *ndr, const char *name, uint16_t r);
+void ndr_print_netr_ChangeLogObject(struct ndr_print *ndr, const char *name, const union netr_ChangeLogObject *r);
+enum ndr_err_code ndr_push_netr_ChangeLogEntry(struct ndr_push *ndr, int ndr_flags, const struct netr_ChangeLogEntry *r);
+enum ndr_err_code ndr_pull_netr_ChangeLogEntry(struct ndr_pull *ndr, int ndr_flags, struct netr_ChangeLogEntry *r);
+void ndr_print_netr_ChangeLogEntry(struct ndr_print *ndr, const char *name, const struct netr_ChangeLogEntry *r);
+size_t ndr_size_netr_ChangeLogEntry(const struct netr_ChangeLogEntry *r, int flags);
void ndr_print_netr_Blob(struct ndr_print *ndr, const char *name, const struct netr_Blob *r);
void ndr_print_netr_DsRGetDCName_flags(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_netr_DsRGetDCNameInfo_AddressType(struct ndr_print *ndr, const char *name, enum netr_DsRGetDCNameInfo_AddressType r);
diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c
index 35d02a0dcb..ced6fb7767 100644
--- a/source3/librpc/gen_ndr/ndr_ntsvcs.c
+++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c
@@ -3,16 +3,17 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_ntsvcs.h"
+#include "librpc/gen_ndr/ndr_winreg.h"
static enum ndr_err_code ndr_push_PNP_HwProfInfo(struct ndr_push *ndr, int ndr_flags, const struct PNP_HwProfInfo *r)
{
- uint32_t cntr_unknown2_0;
+ uint32_t cntr_friendly_name_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
- for (cntr_unknown2_0 = 0; cntr_unknown2_0 < 160; cntr_unknown2_0++) {
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown2[cntr_unknown2_0]));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->profile_handle));
+ for (cntr_friendly_name_0 = 0; cntr_friendly_name_0 < 80; cntr_friendly_name_0++) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->friendly_name[cntr_friendly_name_0]));
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -21,14 +22,14 @@ static enum ndr_err_code ndr_push_PNP_HwProfInfo(struct ndr_push *ndr, int ndr_f
static enum ndr_err_code ndr_pull_PNP_HwProfInfo(struct ndr_pull *ndr, int ndr_flags, struct PNP_HwProfInfo *r)
{
- uint32_t cntr_unknown2_0;
+ uint32_t cntr_friendly_name_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
- for (cntr_unknown2_0 = 0; cntr_unknown2_0 < 160; cntr_unknown2_0++) {
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown2[cntr_unknown2_0]));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->profile_handle));
+ for (cntr_friendly_name_0 = 0; cntr_friendly_name_0 < 80; cntr_friendly_name_0++) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->friendly_name[cntr_friendly_name_0]));
}
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -37,21 +38,21 @@ static enum ndr_err_code ndr_pull_PNP_HwProfInfo(struct ndr_pull *ndr, int ndr_f
_PUBLIC_ void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name, const struct PNP_HwProfInfo *r)
{
- uint32_t cntr_unknown2_0;
+ uint32_t cntr_friendly_name_0;
ndr_print_struct(ndr, name, "PNP_HwProfInfo");
ndr->depth++;
- ndr_print_uint32(ndr, "unknown1", r->unknown1);
- ndr->print(ndr, "%s: ARRAY(%d)", "unknown2", (int)160);
+ ndr_print_uint32(ndr, "profile_handle", r->profile_handle);
+ ndr->print(ndr, "%s: ARRAY(%d)", "friendly_name", (int)80);
ndr->depth++;
- for (cntr_unknown2_0=0;cntr_unknown2_0<160;cntr_unknown2_0++) {
+ for (cntr_friendly_name_0=0;cntr_friendly_name_0<80;cntr_friendly_name_0++) {
char *idx_0=NULL;
- if (asprintf(&idx_0, "[%d]", cntr_unknown2_0) != -1) {
- ndr_print_uint16(ndr, "unknown2", r->unknown2[cntr_unknown2_0]);
+ if (asprintf(&idx_0, "[%d]", cntr_friendly_name_0) != -1) {
+ ndr_print_uint16(ndr, "friendly_name", r->friendly_name[cntr_friendly_name_0]);
free(idx_0);
}
}
ndr->depth--;
- ndr_print_uint32(ndr, "unknown3", r->unknown3);
+ ndr_print_uint32(ndr, "flags", r->flags);
ndr->depth--;
}
@@ -818,7 +819,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
if (r->in.reg_data_type == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.reg_data_type));
+ NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->in.reg_data_type));
if (r->in.buffer_size == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -833,7 +834,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
if (r->out.reg_data_type == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.reg_data_type));
+ NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.reg_data_type));
if (r->out.buffer == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -875,7 +876,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
}
_mem_save_reg_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.reg_data_type, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.reg_data_type));
+ NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->in.reg_data_type));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_data_type_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.buffer_size);
@@ -907,7 +908,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
}
_mem_save_reg_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.reg_data_type, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.reg_data_type));
+ NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.reg_data_type));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_data_type_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
@@ -960,7 +961,7 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *
ndr_print_uint32(ndr, "property", r->in.property);
ndr_print_ptr(ndr, "reg_data_type", r->in.reg_data_type);
ndr->depth++;
- ndr_print_uint32(ndr, "reg_data_type", *r->in.reg_data_type);
+ ndr_print_winreg_Type(ndr, "reg_data_type", *r->in.reg_data_type);
ndr->depth--;
ndr_print_ptr(ndr, "buffer_size", r->in.buffer_size);
ndr->depth++;
@@ -978,7 +979,7 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *
ndr->depth++;
ndr_print_ptr(ndr, "reg_data_type", r->out.reg_data_type);
ndr->depth++;
- ndr_print_uint32(ndr, "reg_data_type", *r->out.reg_data_type);
+ ndr_print_winreg_Type(ndr, "reg_data_type", *r->out.reg_data_type);
ndr->depth--;
ndr_print_ptr(ndr, "buffer", r->out.buffer);
ndr->depth++;
@@ -2067,7 +2068,7 @@ _PUBLIC_ void ndr_print_PNP_RequestEjectPC(struct ndr_print *ndr, const char *na
static enum ndr_err_code ndr_push_PNP_HwProfFlags(struct ndr_push *ndr, int flags, const struct PNP_HwProfFlags *r)
{
if (flags & NDR_IN) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.action));
if (r->in.devicepath == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -2075,14 +2076,14 @@ static enum ndr_err_code ndr_push_PNP_HwProfFlags(struct ndr_push *ndr, int flag
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16)));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicepath, ndr_charset_length(r->in.devicepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
- if (r->in.unknown3 == NULL) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.config));
+ if (r->in.profile_flags == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown3));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown4));
- if (r->in.unknown4) {
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.profile_flags));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.veto_type));
+ if (r->in.veto_type) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.veto_type));
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown5));
if (r->in.unknown5) {
@@ -2091,17 +2092,17 @@ static enum ndr_err_code ndr_push_PNP_HwProfFlags(struct ndr_push *ndr, int flag
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.unknown5, CH_UTF16)));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.unknown5, ndr_charset_length(r->in.unknown5, CH_UTF16), sizeof(uint16_t), CH_UTF16));
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown6));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown7));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_length));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
}
if (flags & NDR_OUT) {
- if (r->out.unknown3 == NULL) {
+ if (r->out.profile_flags == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown3));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown4));
- if (r->out.unknown4) {
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.unknown4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.profile_flags));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.veto_type));
+ if (r->out.veto_type) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.veto_type));
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown5a));
if (r->out.unknown5a) {
@@ -2120,18 +2121,18 @@ static enum ndr_err_code ndr_push_PNP_HwProfFlags(struct ndr_push *ndr, int flag
static enum ndr_err_code ndr_pull_PNP_HwProfFlags(struct ndr_pull *ndr, int flags, struct PNP_HwProfFlags *r)
{
- uint32_t _ptr_unknown4;
+ uint32_t _ptr_veto_type;
uint32_t _ptr_unknown5;
uint32_t _ptr_unknown5a;
- TALLOC_CTX *_mem_save_unknown3_0;
- TALLOC_CTX *_mem_save_unknown4_0;
+ TALLOC_CTX *_mem_save_profile_flags_0;
+ TALLOC_CTX *_mem_save_veto_type_0;
TALLOC_CTX *_mem_save_unknown5_0;
TALLOC_CTX *_mem_save_unknown5a_0;
TALLOC_CTX *_mem_save_unknown5a_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.action));
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.devicepath));
NDR_CHECK(ndr_pull_array_length(ndr, &r->in.devicepath));
if (ndr_get_array_length(ndr, &r->in.devicepath) > ndr_get_array_size(ndr, &r->in.devicepath)) {
@@ -2139,25 +2140,25 @@ static enum ndr_err_code ndr_pull_PNP_HwProfFlags(struct ndr_pull *ndr, int flag
}
NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t)));
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicepath, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t), CH_UTF16));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.config));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->in.unknown3);
- }
- _mem_save_unknown3_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown3, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown3));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown3_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown4));
- if (_ptr_unknown4) {
- NDR_PULL_ALLOC(ndr, r->in.unknown4);
+ NDR_PULL_ALLOC(ndr, r->in.profile_flags);
+ }
+ _mem_save_profile_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.profile_flags, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.profile_flags));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_profile_flags_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_veto_type));
+ if (_ptr_veto_type) {
+ NDR_PULL_ALLOC(ndr, r->in.veto_type);
} else {
- r->in.unknown4 = NULL;
+ r->in.veto_type = NULL;
}
- if (r->in.unknown4) {
- _mem_save_unknown4_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown4, 0);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.unknown4));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown4_0, 0);
+ if (r->in.veto_type) {
+ _mem_save_veto_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.veto_type, 0);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.veto_type));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_veto_type_0, 0);
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown5));
if (_ptr_unknown5) {
@@ -2177,30 +2178,30 @@ static enum ndr_err_code ndr_pull_PNP_HwProfFlags(struct ndr_pull *ndr, int flag
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.unknown5, ndr_get_array_length(ndr, &r->in.unknown5), sizeof(uint16_t), CH_UTF16));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown5_0, 0);
}
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown6));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown7));
- NDR_PULL_ALLOC(ndr, r->out.unknown3);
- *r->out.unknown3 = *r->in.unknown3;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_length));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ NDR_PULL_ALLOC(ndr, r->out.profile_flags);
+ *r->out.profile_flags = *r->in.profile_flags;
}
if (flags & NDR_OUT) {
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.unknown3);
- }
- _mem_save_unknown3_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown3, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown3));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown3_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown4));
- if (_ptr_unknown4) {
- NDR_PULL_ALLOC(ndr, r->out.unknown4);
+ NDR_PULL_ALLOC(ndr, r->out.profile_flags);
+ }
+ _mem_save_profile_flags_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.profile_flags, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.profile_flags));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_profile_flags_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_veto_type));
+ if (_ptr_veto_type) {
+ NDR_PULL_ALLOC(ndr, r->out.veto_type);
} else {
- r->out.unknown4 = NULL;
+ r->out.veto_type = NULL;
}
- if (r->out.unknown4) {
- _mem_save_unknown4_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown4, 0);
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.unknown4));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown4_0, 0);
+ if (r->out.veto_type) {
+ _mem_save_veto_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.veto_type, 0);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.veto_type));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_veto_type_0, 0);
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown5a));
if (_ptr_unknown5a) {
@@ -2246,20 +2247,20 @@ _PUBLIC_ void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name,
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "PNP_HwProfFlags");
ndr->depth++;
- ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
+ ndr_print_uint32(ndr, "action", r->in.action);
ndr_print_ptr(ndr, "devicepath", r->in.devicepath);
ndr->depth++;
ndr_print_string(ndr, "devicepath", r->in.devicepath);
ndr->depth--;
- ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
- ndr_print_ptr(ndr, "unknown3", r->in.unknown3);
+ ndr_print_uint32(ndr, "config", r->in.config);
+ ndr_print_ptr(ndr, "profile_flags", r->in.profile_flags);
ndr->depth++;
- ndr_print_uint32(ndr, "unknown3", *r->in.unknown3);
+ ndr_print_uint32(ndr, "profile_flags", *r->in.profile_flags);
ndr->depth--;
- ndr_print_ptr(ndr, "unknown4", r->in.unknown4);
+ ndr_print_ptr(ndr, "veto_type", r->in.veto_type);
ndr->depth++;
- if (r->in.unknown4) {
- ndr_print_uint16(ndr, "unknown4", *r->in.unknown4);
+ if (r->in.veto_type) {
+ ndr_print_uint16(ndr, "veto_type", *r->in.veto_type);
}
ndr->depth--;
ndr_print_ptr(ndr, "unknown5", r->in.unknown5);
@@ -2268,21 +2269,21 @@ _PUBLIC_ void ndr_print_PNP_HwProfFlags(struct ndr_print *ndr, const char *name,
ndr_print_string(ndr, "unknown5", r->in.unknown5);
}
ndr->depth--;
- ndr_print_uint32(ndr, "unknown6", r->in.unknown6);
- ndr_print_uint32(ndr, "unknown7", r->in.unknown7);
+ ndr_print_uint32(ndr, "name_length", r->in.name_length);
+ ndr_print_uint32(ndr, "flags", r->in.flags);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "PNP_HwProfFlags");
ndr->depth++;
- ndr_print_ptr(ndr, "unknown3", r->out.unknown3);
+ ndr_print_ptr(ndr, "profile_flags", r->out.profile_flags);
ndr->depth++;
- ndr_print_uint32(ndr, "unknown3", *r->out.unknown3);
+ ndr_print_uint32(ndr, "profile_flags", *r->out.profile_flags);
ndr->depth--;
- ndr_print_ptr(ndr, "unknown4", r->out.unknown4);
+ ndr_print_ptr(ndr, "veto_type", r->out.veto_type);
ndr->depth++;
- if (r->out.unknown4) {
- ndr_print_uint16(ndr, "unknown4", *r->out.unknown4);
+ if (r->out.veto_type) {
+ ndr_print_uint16(ndr, "veto_type", *r->out.veto_type);
}
ndr->depth--;
ndr_print_ptr(ndr, "unknown5a", r->out.unknown5a);
@@ -2310,8 +2311,8 @@ static enum ndr_err_code ndr_push_PNP_GetHwProfInfo(struct ndr_push *ndr, int fl
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_PNP_HwProfInfo(ndr, NDR_SCALARS, r->in.info));
- 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_uint32(ndr, NDR_SCALARS, r->in.size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
}
if (flags & NDR_OUT) {
if (r->out.info == NULL) {
@@ -2337,8 +2338,8 @@ static enum ndr_err_code ndr_pull_PNP_GetHwProfInfo(struct ndr_pull *ndr, int fl
NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_PNP_HwProfInfo(ndr, NDR_SCALARS, r->in.info));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_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_uint32(ndr, NDR_SCALARS, &r->in.size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
NDR_PULL_ALLOC(ndr, r->out.info);
*r->out.info = *r->in.info;
}
@@ -2370,8 +2371,8 @@ _PUBLIC_ void ndr_print_PNP_GetHwProfInfo(struct ndr_print *ndr, const char *nam
ndr->depth++;
ndr_print_PNP_HwProfInfo(ndr, "info", r->in.info);
ndr->depth--;
- ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
- ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+ ndr_print_uint32(ndr, "size", r->in.size);
+ ndr_print_uint32(ndr, "flags", r->in.flags);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -3856,10 +3857,11 @@ static const struct ndr_interface_call ntsvcs_calls[] = {
static const char * const ntsvcs_endpoint_strings[] = {
"ncacn_np:[\\pipe\\ntsvcs]",
+ "ncacn_np:[\\pipe\\plugplay]",
};
static const struct ndr_interface_string_array ntsvcs_endpoints = {
- .count = 1,
+ .count = 2,
.names = ntsvcs_endpoint_strings
};
diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c
index f83d0f0875..975bde3340 100644
--- a/source3/librpc/gen_ndr/ndr_samr.c
+++ b/source3/librpc/gen_ndr/ndr_samr.c
@@ -6,6 +6,59 @@
#include "librpc/gen_ndr/ndr_misc.h"
#include "librpc/gen_ndr/ndr_lsa.h"
#include "librpc/gen_ndr/ndr_security.h"
+_PUBLIC_ enum ndr_err_code ndr_push_netr_SamDatabaseID(struct ndr_push *ndr, int ndr_flags, enum netr_SamDatabaseID r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_netr_SamDatabaseID(struct ndr_pull *ndr, int ndr_flags, enum netr_SamDatabaseID *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_SamDatabaseID(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case SAM_DATABASE_DOMAIN: val = "SAM_DATABASE_DOMAIN"; break;
+ case SAM_DATABASE_BUILTIN: val = "SAM_DATABASE_BUILTIN"; break;
+ case SAM_DATABASE_PRIVS: val = "SAM_DATABASE_PRIVS"; break;
+ }
+ 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_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_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));
@@ -364,6 +417,31 @@ _PUBLIC_ void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const cha
ndr->depth--;
}
+static enum ndr_err_code ndr_push_samr_DomainServerState(struct ndr_push *ndr, int ndr_flags, enum samr_DomainServerState r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_samr_DomainServerState(struct ndr_pull *ndr, int ndr_flags, enum samr_DomainServerState *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_samr_DomainServerState(struct ndr_print *ndr, const char *name, enum samr_DomainServerState r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case DOMAIN_SERVER_ENABLED: val = "DOMAIN_SERVER_ENABLED"; break;
+ case DOMAIN_SERVER_DISABLED: val = "DOMAIN_SERVER_DISABLED"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
static enum ndr_err_code ndr_push_samr_DomInfo1(struct ndr_push *ndr, int ndr_flags, const struct samr_DomInfo1 *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -415,7 +493,7 @@ static enum ndr_err_code ndr_push_samr_DomGeneralInformation(struct ndr_push *nd
NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->primary));
NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->sequence_num));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
+ NDR_CHECK(ndr_push_samr_DomainServerState(ndr, NDR_SCALARS, r->domain_server_state));
NDR_CHECK(ndr_push_samr_Role(ndr, NDR_SCALARS, r->role));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
@@ -439,7 +517,7 @@ static enum ndr_err_code ndr_pull_samr_DomGeneralInformation(struct ndr_pull *nd
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->domain_name));
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->primary));
NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->sequence_num));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
+ NDR_CHECK(ndr_pull_samr_DomainServerState(ndr, NDR_SCALARS, &r->domain_server_state));
NDR_CHECK(ndr_pull_samr_Role(ndr, NDR_SCALARS, &r->role));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
@@ -463,7 +541,7 @@ _PUBLIC_ void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const
ndr_print_lsa_String(ndr, "domain_name", &r->domain_name);
ndr_print_lsa_String(ndr, "primary", &r->primary);
ndr_print_udlong(ndr, "sequence_num", r->sequence_num);
- ndr_print_uint32(ndr, "unknown2", r->unknown2);
+ ndr_print_samr_DomainServerState(ndr, "domain_server_state", r->domain_server_state);
ndr_print_samr_Role(ndr, "role", r->role);
ndr_print_uint32(ndr, "unknown3", r->unknown3);
ndr_print_uint32(ndr, "num_users", r->num_users);
@@ -665,7 +743,7 @@ static enum ndr_err_code ndr_push_samr_DomInfo9(struct ndr_push *ndr, int ndr_fl
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+ NDR_CHECK(ndr_push_samr_DomainServerState(ndr, NDR_SCALARS, r->domain_server_state));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -676,7 +754,7 @@ static enum ndr_err_code ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_fl
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+ NDR_CHECK(ndr_pull_samr_DomainServerState(ndr, NDR_SCALARS, &r->domain_server_state));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -687,7 +765,7 @@ _PUBLIC_ void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, c
{
ndr_print_struct(ndr, name, "samr_DomInfo9");
ndr->depth++;
- ndr_print_uint32(ndr, "unknown", r->unknown);
+ ndr_print_samr_DomainServerState(ndr, "domain_server_state", r->domain_server_state);
ndr->depth--;
}
@@ -2961,7 +3039,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo24(struct ndr_push *ndr, int ndr_
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
NDR_CHECK(ndr_push_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
- NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pw_len));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -2973,7 +3051,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo24(struct ndr_pull *ndr, int ndr_
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
NDR_CHECK(ndr_pull_samr_CryptPassword(ndr, NDR_SCALARS, &r->password));
- NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pw_len));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -2985,7 +3063,7 @@ _PUBLIC_ void ndr_print_samr_UserInfo24(struct ndr_print *ndr, const char *name,
ndr_print_struct(ndr, name, "samr_UserInfo24");
ndr->depth++;
ndr_print_samr_CryptPassword(ndr, "password", &r->password);
- ndr_print_uint8(ndr, "pw_len", r->pw_len);
+ ndr_print_uint8(ndr, "password_expired", r->password_expired);
ndr->depth--;
}
@@ -3074,7 +3152,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo26(struct ndr_push *ndr, int ndr_
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 1));
NDR_CHECK(ndr_push_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
- NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->pw_len));
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->password_expired));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -3086,7 +3164,7 @@ static enum ndr_err_code ndr_pull_samr_UserInfo26(struct ndr_pull *ndr, int ndr_
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
NDR_CHECK(ndr_pull_samr_CryptPasswordEx(ndr, NDR_SCALARS, &r->password));
- NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->pw_len));
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->password_expired));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -3098,7 +3176,7 @@ _PUBLIC_ void ndr_print_samr_UserInfo26(struct ndr_print *ndr, const char *name,
ndr_print_struct(ndr, name, "samr_UserInfo26");
ndr->depth++;
ndr_print_samr_CryptPasswordEx(ndr, "password", &r->password);
- ndr_print_uint8(ndr, "pw_len", r->pw_len);
+ ndr_print_uint8(ndr, "password_expired", r->password_expired);
ndr->depth--;
}
@@ -11907,7 +11985,10 @@ static enum ndr_err_code ndr_push_samr_RidToSid(struct ndr_push *ndr, int flags,
if (r->out.sid == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sid));
+ if (*r->out.sid) {
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
+ }
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -11915,8 +11996,10 @@ static enum ndr_err_code ndr_push_samr_RidToSid(struct ndr_push *ndr, int flags,
static enum ndr_err_code ndr_pull_samr_RidToSid(struct ndr_pull *ndr, int flags, struct samr_RidToSid *r)
{
+ uint32_t _ptr_sid;
TALLOC_CTX *_mem_save_domain_handle_0;
TALLOC_CTX *_mem_save_sid_0;
+ TALLOC_CTX *_mem_save_sid_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -11937,7 +12020,18 @@ static enum ndr_err_code ndr_pull_samr_RidToSid(struct ndr_pull *ndr, int flags,
}
_mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.sid, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sid));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, *r->out.sid);
+ } else {
+ *r->out.sid = NULL;
+ }
+ if (*r->out.sid) {
+ _mem_save_sid_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.sid, 0);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_1, 0);
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
@@ -11966,7 +12060,12 @@ _PUBLIC_ void ndr_print_samr_RidToSid(struct ndr_print *ndr, const char *name, i
ndr->depth++;
ndr_print_ptr(ndr, "sid", r->out.sid);
ndr->depth++;
- ndr_print_dom_sid2(ndr, "sid", r->out.sid);
+ ndr_print_ptr(ndr, "sid", *r->out.sid);
+ ndr->depth++;
+ if (*r->out.sid) {
+ ndr_print_dom_sid2(ndr, "sid", *r->out.sid);
+ }
+ ndr->depth--;
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
diff --git a/source3/librpc/gen_ndr/ndr_samr.h b/source3/librpc/gen_ndr/ndr_samr.h
index 1f582061f9..64c60ee704 100644
--- a/source3/librpc/gen_ndr/ndr_samr.h
+++ b/source3/librpc/gen_ndr/ndr_samr.h
@@ -148,6 +148,12 @@ extern const struct ndr_interface_table ndr_table_samr;
#define NDR_SAMR_VALIDATEPASSWORD (0x43)
#define NDR_SAMR_CALL_COUNT (68)
+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);
@@ -162,6 +168,7 @@ void ndr_print_samr_Role(struct ndr_print *ndr, const char *name, enum samr_Role
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);
void ndr_print_samr_PasswordProperties(struct ndr_print *ndr, const char *name, uint32_t r);
+void ndr_print_samr_DomainServerState(struct ndr_print *ndr, const char *name, enum samr_DomainServerState r);
void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, const struct samr_DomInfo1 *r);
void ndr_print_samr_DomGeneralInformation(struct ndr_print *ndr, const char *name, const struct samr_DomGeneralInformation *r);
void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, const struct samr_DomInfo3 *r);
diff --git a/source3/librpc/gen_ndr/ndr_security.c b/source3/librpc/gen_ndr/ndr_security.c
index de899241ab..108f2f689c 100644
--- a/source3/librpc/gen_ndr/ndr_security.c
+++ b/source3/librpc/gen_ndr/ndr_security.c
@@ -4,13 +4,14 @@
#include "librpc/gen_ndr/ndr_security.h"
#include "librpc/gen_ndr/ndr_misc.h"
-static enum ndr_err_code ndr_push_security_ace_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r)
+#include "librpc/gen_ndr/ndr_dom_sid.h"
+_PUBLIC_ enum ndr_err_code ndr_push_security_ace_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r)
{
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_security_ace_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_security_ace_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
{
uint8_t v;
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
@@ -33,13 +34,13 @@ _PUBLIC_ void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *na
ndr->depth--;
}
-static enum ndr_err_code ndr_push_security_ace_type(struct ndr_push *ndr, int ndr_flags, enum security_ace_type r)
+_PUBLIC_ enum ndr_err_code ndr_push_security_ace_type(struct ndr_push *ndr, int ndr_flags, enum security_ace_type r)
{
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_security_ace_type(struct ndr_pull *ndr, int ndr_flags, enum security_ace_type *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_security_ace_type(struct ndr_pull *ndr, int ndr_flags, enum security_ace_type *r)
{
uint8_t v;
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
@@ -278,7 +279,7 @@ _PUBLIC_ void ndr_print_security_ace_object(struct ndr_print *ndr, const char *n
ndr->depth--;
}
-static enum ndr_err_code ndr_push_security_ace_object_ctr(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_ctr *r)
+_PUBLIC_ enum ndr_err_code ndr_push_security_ace_object_ctr(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_ctr *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
@@ -331,7 +332,7 @@ static enum ndr_err_code ndr_push_security_ace_object_ctr(struct ndr_push *ndr,
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_ctr *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_ctr *r)
{
int level;
level = ndr_pull_get_switch_value(ndr, r);
@@ -431,25 +432,6 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_f
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_security_ace_type(ndr, NDR_SCALARS, &r->type));
- NDR_CHECK(ndr_pull_security_ace_flags(ndr, NDR_SCALARS, &r->flags));
- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->access_mask));
- NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->type));
- NDR_CHECK(ndr_pull_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object));
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->trustee));
- }
- if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_pull_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object));
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_BUFFERS, &r->trustee));
- }
- return NDR_ERR_SUCCESS;
-}
-
_PUBLIC_ void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r)
{
ndr_print_struct(ndr, name, "security_ace");
diff --git a/source3/librpc/gen_ndr/ndr_security.h b/source3/librpc/gen_ndr/ndr_security.h
index 7a2ff74309..bddf1bd2b7 100644
--- a/source3/librpc/gen_ndr/ndr_security.h
+++ b/source3/librpc/gen_ndr/ndr_security.h
@@ -6,13 +6,20 @@
#ifndef _HEADER_NDR_security
#define _HEADER_NDR_security
+#include "librpc/gen_ndr/ndr_dom_sid.h"
#define NDR_SECURITY_CALL_COUNT (0)
+enum ndr_err_code ndr_push_security_ace_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r);
+enum ndr_err_code ndr_pull_security_ace_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r);
void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8_t r);
+enum ndr_err_code ndr_push_security_ace_type(struct ndr_push *ndr, int ndr_flags, enum security_ace_type r);
+enum ndr_err_code ndr_pull_security_ace_type(struct ndr_pull *ndr, int ndr_flags, enum security_ace_type *r);
void ndr_print_security_ace_type(struct ndr_print *ndr, const char *name, enum security_ace_type r);
void ndr_print_security_ace_object_flags(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_security_ace_object_type(struct ndr_print *ndr, const char *name, const union security_ace_object_type *r);
void ndr_print_security_ace_object_inherited_type(struct ndr_print *ndr, const char *name, const union security_ace_object_inherited_type *r);
void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, const struct security_ace_object *r);
+enum ndr_err_code ndr_push_security_ace_object_ctr(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_ctr *r);
+enum ndr_err_code ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_ctr *r);
void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name, const union security_ace_object_ctr *r);
enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r);
enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r);
diff --git a/source3/librpc/gen_ndr/ndr_svcctl.c b/source3/librpc/gen_ndr/ndr_svcctl.c
index d04c89b9a1..2bccde9ba0 100644
--- a/source3/librpc/gen_ndr/ndr_svcctl.c
+++ b/source3/librpc/gen_ndr/ndr_svcctl.c
@@ -297,6 +297,34 @@ _PUBLIC_ void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
+static enum ndr_err_code ndr_push_SERVICE_CONTROL(struct ndr_push *ndr, int ndr_flags, enum SERVICE_CONTROL r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_SERVICE_CONTROL(struct ndr_pull *ndr, int ndr_flags, enum SERVICE_CONTROL *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_SERVICE_CONTROL(struct ndr_print *ndr, const char *name, enum SERVICE_CONTROL r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case SVCCTL_CONTROL_STOP: val = "SVCCTL_CONTROL_STOP"; break;
+ case SVCCTL_CONTROL_PAUSE: val = "SVCCTL_CONTROL_PAUSE"; break;
+ case SVCCTL_CONTROL_CONTINUE: val = "SVCCTL_CONTROL_CONTINUE"; break;
+ case SVCCTL_CONTROL_INTERROGATE: val = "SVCCTL_CONTROL_INTERROGATE"; break;
+ case SVCCTL_CONTROL_SHUTDOWN: val = "SVCCTL_CONTROL_SHUTDOWN"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
static enum ndr_err_code ndr_push_svcctl_MgrAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
@@ -646,7 +674,7 @@ static enum ndr_err_code ndr_push_svcctl_ControlService(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.handle));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.control));
+ NDR_CHECK(ndr_push_SERVICE_CONTROL(ndr, NDR_SCALARS, r->in.control));
}
if (flags & NDR_OUT) {
if (r->out.service_status == NULL) {
@@ -672,7 +700,7 @@ static enum ndr_err_code ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, in
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.control));
+ NDR_CHECK(ndr_pull_SERVICE_CONTROL(ndr, NDR_SCALARS, &r->in.control));
NDR_PULL_ALLOC(ndr, r->out.service_status);
ZERO_STRUCTP(r->out.service_status);
}
@@ -703,7 +731,7 @@ _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint32(ndr, "control", r->in.control);
+ ndr_print_SERVICE_CONTROL(ndr, "control", r->in.control);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -2095,6 +2123,9 @@ static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *nd
}
}
if (flags & NDR_OUT) {
+ if (r->out.service == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.buf_size));
if (r->out.bytes_needed == NULL) {
@@ -2134,6 +2165,9 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ if (r->in.buf_size < 0 || r->in.buf_size > 262144) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
if (_ptr_resume_handle) {
NDR_PULL_ALLOC(ndr, r->in.resume_handle);
@@ -2146,6 +2180,8 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
}
+ NDR_PULL_ALLOC_N(ndr, r->out.service, r->in.buf_size);
+ memset(r->out.service, 0, (r->in.buf_size) * sizeof(*r->out.service));
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
ZERO_STRUCTP(r->out.bytes_needed);
NDR_PULL_ALLOC(ndr, r->out.services_returned);
@@ -2153,7 +2189,9 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
- NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
+ }
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
@@ -2161,6 +2199,9 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
_mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 262144) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.services_returned);
@@ -2168,6 +2209,9 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
_mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
+ if (*r->out.services_returned < 0 || *r->out.services_returned > 262144) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
if (_ptr_resume_handle) {
@@ -2217,7 +2261,10 @@ _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusW");
ndr->depth++;
+ ndr_print_ptr(ndr, "service", r->out.service);
+ ndr->depth++;
ndr_print_array_uint8(ndr, "service", r->out.service, r->in.buf_size);
+ ndr->depth--;
ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
ndr->depth++;
ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
@@ -5305,6 +5352,10 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *n
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
}
if (flags & NDR_OUT) {
+ if (r->out.buffer == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
if (r->out.bytes_needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -5331,20 +5382,34 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *n
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ if (r->in.buf_size < 0 || r->in.buf_size > 8192) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
+ memset(r->out.buffer, 0, (r->in.buf_size) * sizeof(*r->out.buffer));
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
ZERO_STRUCTP(r->out.bytes_needed);
}
if (flags & NDR_OUT) {
- NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
+ }
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
}
_mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 8192) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.buf_size));
+ }
}
return NDR_ERR_SUCCESS;
}
@@ -5370,7 +5435,10 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2W");
ndr->depth++;
+ ndr_print_ptr(ndr, "buffer", r->out.buffer);
+ ndr->depth++;
ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buf_size);
+ ndr->depth--;
ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
ndr->depth++;
ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
@@ -5392,6 +5460,10 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *n
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
}
if (flags & NDR_OUT) {
+ if (r->out.buffer == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
if (r->out.bytes_needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -5418,20 +5490,34 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *n
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ if (r->in.buf_size < 0 || r->in.buf_size > 8192) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
+ memset(r->out.buffer, 0, (r->in.buf_size) * sizeof(*r->out.buffer));
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
ZERO_STRUCTP(r->out.bytes_needed);
}
if (flags & NDR_OUT) {
- NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
+ }
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
}
_mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 8192) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.buf_size));
+ }
}
return NDR_ERR_SUCCESS;
}
@@ -5457,7 +5543,10 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatusEx");
ndr->depth++;
+ ndr_print_ptr(ndr, "buffer", r->out.buffer);
+ ndr->depth++;
ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buf_size);
+ ndr->depth--;
ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
ndr->depth++;
ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
@@ -5688,8 +5777,19 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, in
if (r->in.resume_handle) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
}
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.group_name));
+ if (r->in.group_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.group_name, ndr_charset_length(r->in.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
}
if (flags & NDR_OUT) {
+ if (r->out.services == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.buf_size));
if (r->out.bytes_needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
@@ -5703,16 +5803,6 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, in
if (r->out.resume_handle) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
}
- if (r->out.group_name == NULL) {
- return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
- }
- NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.group_name));
- if (*r->out.group_name) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
- NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.group_name, ndr_charset_length(*r->out.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
- }
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -5727,7 +5817,6 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
TALLOC_CTX *_mem_save_service_returned_0;
TALLOC_CTX *_mem_save_resume_handle_0;
TALLOC_CTX *_mem_save_group_name_0;
- TALLOC_CTX *_mem_save_group_name_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -5742,6 +5831,9 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ if (r->in.buf_size < 0 || r->in.buf_size > 262144) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
if (_ptr_resume_handle) {
NDR_PULL_ALLOC(ndr, r->in.resume_handle);
@@ -5752,24 +5844,51 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
_mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+ if (*r->in.resume_handle < 0 || *r->in.resume_handle > 262144) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
}
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
+ if (_ptr_group_name) {
+ NDR_PULL_ALLOC(ndr, r->in.group_name);
+ } else {
+ r->in.group_name = NULL;
+ }
+ if (r->in.group_name) {
+ _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.group_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.group_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.group_name));
+ if (ndr_get_array_length(ndr, &r->in.group_name) > ndr_get_array_size(ndr, &r->in.group_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.group_name), ndr_get_array_length(ndr, &r->in.group_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.group_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.group_name, ndr_get_array_length(ndr, &r->in.group_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, 0);
+ }
+ NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.buf_size);
+ memset(r->out.services, 0, (r->in.buf_size) * sizeof(*r->out.services));
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
ZERO_STRUCTP(r->out.bytes_needed);
NDR_PULL_ALLOC(ndr, r->out.service_returned);
ZERO_STRUCTP(r->out.service_returned);
- NDR_PULL_ALLOC(ndr, r->out.group_name);
- ZERO_STRUCTP(r->out.group_name);
}
if (flags & NDR_OUT) {
- NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.buf_size);
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.buf_size));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.services));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->out.services, ndr_get_array_size(ndr, &r->out.services));
+ }
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, ndr_get_array_size(ndr, &r->out.services)));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
}
_mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
+ if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 262144) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.service_returned);
@@ -5777,6 +5896,9 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
_mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
+ if (*r->out.service_returned < 0 || *r->out.service_returned > 262144) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
if (_ptr_resume_handle) {
@@ -5788,33 +5910,15 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
_mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
- }
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.group_name);
- }
- _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
- if (_ptr_group_name) {
- NDR_PULL_ALLOC(ndr, *r->out.group_name);
- } else {
- *r->out.group_name = NULL;
- }
- if (*r->out.group_name) {
- _mem_save_group_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, *r->out.group_name, 0);
- NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name));
- NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name));
- if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) {
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.group_name), ndr_get_array_length(ndr, r->out.group_name));
+ if (*r->out.resume_handle < 0 || *r->out.resume_handle > 262144) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
- NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t)));
- NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.group_name, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t), CH_UTF16));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
}
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.services) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.services, r->in.buf_size));
+ }
}
return NDR_ERR_SUCCESS;
}
@@ -5843,12 +5947,21 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char
ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
}
ndr->depth--;
+ ndr_print_ptr(ndr, "group_name", r->in.group_name);
+ ndr->depth++;
+ if (r->in.group_name) {
+ ndr_print_string(ndr, "group_name", r->in.group_name);
+ }
+ ndr->depth--;
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "EnumServicesStatusExW");
ndr->depth++;
+ ndr_print_ptr(ndr, "services", r->out.services);
+ ndr->depth++;
ndr_print_array_uint8(ndr, "services", r->out.services, r->in.buf_size);
+ ndr->depth--;
ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
ndr->depth++;
ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
@@ -5863,15 +5976,6 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char
ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
}
ndr->depth--;
- ndr_print_ptr(ndr, "group_name", r->out.group_name);
- ndr->depth++;
- ndr_print_ptr(ndr, "group_name", *r->out.group_name);
- ndr->depth++;
- if (*r->out.group_name) {
- ndr_print_string(ndr, "group_name", *r->out.group_name);
- }
- ndr->depth--;
- ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
}
diff --git a/source3/librpc/gen_ndr/ndr_svcctl.h b/source3/librpc/gen_ndr/ndr_svcctl.h
index 0bebd3401a..8d7739a7db 100644
--- a/source3/librpc/gen_ndr/ndr_svcctl.h
+++ b/source3/librpc/gen_ndr/ndr_svcctl.h
@@ -106,6 +106,7 @@ void ndr_print_ENUM_SERVICE_STATUS(struct ndr_print *ndr, const char *name, cons
enum ndr_err_code ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r);
enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r);
+void ndr_print_SERVICE_CONTROL(struct ndr_print *ndr, const char *name, enum SERVICE_CONTROL r);
void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r);
enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r);
diff --git a/source3/librpc/gen_ndr/ndr_xattr.c b/source3/librpc/gen_ndr/ndr_xattr.c
index 0e9dda9f47..75781d763d 100644
--- a/source3/librpc/gen_ndr/ndr_xattr.c
+++ b/source3/librpc/gen_ndr/ndr_xattr.c
@@ -546,12 +546,12 @@ _PUBLIC_ void ndr_print_xattr_DosStreams(struct ndr_print *ndr, const char *name
ndr->depth--;
}
-_PUBLIC_ enum ndr_err_code ndr_push_security_descriptor_timestamp(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor_timestamp *r)
+_PUBLIC_ enum ndr_err_code ndr_push_security_descriptor_hash(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor_hash *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd));
- NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->last_changed));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->sd) {
@@ -561,7 +561,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_descriptor_timestamp(struct ndr_pus
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor_timestamp(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor_timestamp *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor_hash(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor_hash *r)
{
uint32_t _ptr_sd;
TALLOC_CTX *_mem_save_sd_0;
@@ -573,7 +573,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor_timestamp(struct ndr_pul
} else {
r->sd = NULL;
}
- NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->last_changed));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->sd) {
@@ -586,9 +586,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_descriptor_timestamp(struct ndr_pul
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_security_descriptor_timestamp(struct ndr_print *ndr, const char *name, const struct security_descriptor_timestamp *r)
+_PUBLIC_ void ndr_print_security_descriptor_hash(struct ndr_print *ndr, const char *name, const struct security_descriptor_hash *r)
{
- ndr_print_struct(ndr, name, "security_descriptor_timestamp");
+ ndr_print_struct(ndr, name, "security_descriptor_hash");
ndr->depth++;
ndr_print_ptr(ndr, "sd", r->sd);
ndr->depth++;
@@ -596,7 +596,7 @@ _PUBLIC_ void ndr_print_security_descriptor_timestamp(struct ndr_print *ndr, con
ndr_print_security_descriptor(ndr, "sd", r->sd);
}
ndr->depth--;
- ndr_print_NTTIME(ndr, "last_changed", r->last_changed);
+ ndr_print_array_uint8(ndr, "hash", r->hash, 16);
ndr->depth--;
}
@@ -611,7 +611,7 @@ static enum ndr_err_code ndr_push_xattr_NTACL_Info(struct ndr_push *ndr, int ndr
break; }
case 2: {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd_ts));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd_hs));
break; }
default:
@@ -628,8 +628,8 @@ static enum ndr_err_code ndr_push_xattr_NTACL_Info(struct ndr_push *ndr, int ndr
break;
case 2:
- if (r->sd_ts) {
- NDR_CHECK(ndr_push_security_descriptor_timestamp(ndr, NDR_SCALARS|NDR_BUFFERS, r->sd_ts));
+ if (r->sd_hs) {
+ NDR_CHECK(ndr_push_security_descriptor_hash(ndr, NDR_SCALARS|NDR_BUFFERS, r->sd_hs));
}
break;
@@ -645,7 +645,7 @@ static enum ndr_err_code ndr_pull_xattr_NTACL_Info(struct ndr_pull *ndr, int ndr
int level;
uint16_t _level;
TALLOC_CTX *_mem_save_sd_0;
- TALLOC_CTX *_mem_save_sd_ts_0;
+ TALLOC_CTX *_mem_save_sd_hs_0;
level = ndr_pull_get_switch_value(ndr, r);
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
@@ -664,12 +664,12 @@ static enum ndr_err_code ndr_pull_xattr_NTACL_Info(struct ndr_pull *ndr, int ndr
break; }
case 2: {
- uint32_t _ptr_sd_ts;
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd_ts));
- if (_ptr_sd_ts) {
- NDR_PULL_ALLOC(ndr, r->sd_ts);
+ uint32_t _ptr_sd_hs;
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd_hs));
+ if (_ptr_sd_hs) {
+ NDR_PULL_ALLOC(ndr, r->sd_hs);
} else {
- r->sd_ts = NULL;
+ r->sd_hs = NULL;
}
break; }
@@ -689,11 +689,11 @@ static enum ndr_err_code ndr_pull_xattr_NTACL_Info(struct ndr_pull *ndr, int ndr
break;
case 2:
- if (r->sd_ts) {
- _mem_save_sd_ts_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->sd_ts, 0);
- NDR_CHECK(ndr_pull_security_descriptor_timestamp(ndr, NDR_SCALARS|NDR_BUFFERS, r->sd_ts));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_ts_0, 0);
+ if (r->sd_hs) {
+ _mem_save_sd_hs_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sd_hs, 0);
+ NDR_CHECK(ndr_pull_security_descriptor_hash(ndr, NDR_SCALARS|NDR_BUFFERS, r->sd_hs));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_hs_0, 0);
}
break;
@@ -720,10 +720,10 @@ _PUBLIC_ void ndr_print_xattr_NTACL_Info(struct ndr_print *ndr, const char *name
break;
case 2:
- ndr_print_ptr(ndr, "sd_ts", r->sd_ts);
+ ndr_print_ptr(ndr, "sd_hs", r->sd_hs);
ndr->depth++;
- if (r->sd_ts) {
- ndr_print_security_descriptor_timestamp(ndr, "sd_ts", r->sd_ts);
+ if (r->sd_hs) {
+ ndr_print_security_descriptor_hash(ndr, "sd_hs", r->sd_hs);
}
ndr->depth--;
break;
diff --git a/source3/librpc/gen_ndr/ndr_xattr.h b/source3/librpc/gen_ndr/ndr_xattr.h
index 38701b1aca..c565e8513a 100644
--- a/source3/librpc/gen_ndr/ndr_xattr.h
+++ b/source3/librpc/gen_ndr/ndr_xattr.h
@@ -24,9 +24,9 @@ void ndr_print_xattr_DosStream(struct ndr_print *ndr, const char *name, const st
enum ndr_err_code ndr_push_xattr_DosStreams(struct ndr_push *ndr, int ndr_flags, const struct xattr_DosStreams *r);
enum ndr_err_code ndr_pull_xattr_DosStreams(struct ndr_pull *ndr, int ndr_flags, struct xattr_DosStreams *r);
void ndr_print_xattr_DosStreams(struct ndr_print *ndr, const char *name, const struct xattr_DosStreams *r);
-enum ndr_err_code ndr_push_security_descriptor_timestamp(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor_timestamp *r);
-enum ndr_err_code ndr_pull_security_descriptor_timestamp(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor_timestamp *r);
-void ndr_print_security_descriptor_timestamp(struct ndr_print *ndr, const char *name, const struct security_descriptor_timestamp *r);
+enum ndr_err_code ndr_push_security_descriptor_hash(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor_hash *r);
+enum ndr_err_code ndr_pull_security_descriptor_hash(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor_hash *r);
+void ndr_print_security_descriptor_hash(struct ndr_print *ndr, const char *name, const struct security_descriptor_hash *r);
void ndr_print_xattr_NTACL_Info(struct ndr_print *ndr, const char *name, const union xattr_NTACL_Info *r);
enum ndr_err_code ndr_push_xattr_NTACL(struct ndr_push *ndr, int ndr_flags, const struct xattr_NTACL *r);
enum ndr_err_code ndr_pull_xattr_NTACL(struct ndr_pull *ndr, int ndr_flags, struct xattr_NTACL *r);
diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h
index fd9e08b461..4d9b549e75 100644
--- a/source3/librpc/gen_ndr/netlogon.h
+++ b/source3/librpc/gen_ndr/netlogon.h
@@ -7,11 +7,17 @@
#include "librpc/gen_ndr/samr.h"
#include "librpc/gen_ndr/security.h"
#include "librpc/gen_ndr/nbt.h"
+#define netr_DeltaEnum8Bit netr_DeltaEnum
+#define netr_SamDatabaseID8Bit netr_SamDatabaseID
#ifndef _HEADER_netlogon
#define _HEADER_netlogon
#define DSGETDC_VALID_FLAGS ( (DS_FORCE_REDISCOVERY|DS_DIRECTORY_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_PREFERRED|DS_GC_SERVER_REQUIRED|DS_PDC_REQUIRED|DS_BACKGROUND_ONLY|DS_IP_REQUIRED|DS_KDC_REQUIRED|DS_TIMESERV_REQUIRED|DS_WRITABLE_REQUIRED|DS_GOOD_TIMESERV_PREFERRED|DS_AVOID_SELF|DS_ONLY_LDAP_NEEDED|DS_IS_FLAT_NAME|DS_IS_DNS_NAME|DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME) )
#define DS_GFTI_UPDATE_TDO ( 0x1 )
+enum netr_DeltaEnum8Bit;
+
+enum netr_SamDatabaseID8Bit;
+
struct netr_UasInfo {
const char *account_name;/* [unique,charset(UTF16)] */
uint32_t priv;
@@ -324,7 +330,7 @@ struct netr_DELTA_USER {
uint8_t lm_password_present;
uint8_t password_expired;
struct lsa_String comment;
- struct lsa_String parameters;
+ struct lsa_BinaryString parameters;
uint16_t country_code;
uint16_t code_page;
struct netr_USER_PRIVATE_INFO user_private_info;
@@ -712,6 +718,28 @@ union netr_CONTROL_DATA_INFORMATION {
#define NETLOGON_NEG_AUTHENTICATED_RPC_LSASS ( 0x20000000 )
#define NETLOGON_NEG_SCHANNEL ( 0x40000000 )
+/* bitmap netr_ChangeLogFlags */
+#define NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED ( 0x0001 )
+#define NETR_CHANGELOG_CHANGED_PASSWORD ( 0x0002 )
+#define NETR_CHANGELOG_SID_INCLUDED ( 0x0004 )
+#define NETR_CHANGELOG_NAME_INCLUDED ( 0x0008 )
+#define NETR_CHANGELOG_FIRST_PROMOTION_OBJ ( 0x0010 )
+
+union netr_ChangeLogObject {
+ struct dom_sid object_sid;/* [case(NETR_CHANGELOG_SID_INCLUDED)] */
+ const char * object_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM),case(NETR_CHANGELOG_NAME_INCLUDED)] */
+}/* [nodiscriminant] */;
+
+struct netr_ChangeLogEntry {
+ uint32_t serial_number1;
+ uint32_t serial_number2;
+ uint32_t object_rid;
+ uint16_t flags;
+ enum netr_SamDatabaseID8Bit db_index;
+ enum netr_DeltaEnum8Bit delta_type;
+ union netr_ChangeLogObject object;/* [switch_is(flags&(NETR_CHANGELOG_SID_INCLUDED|NETR_CHANGELOG_NAME_INCLUDED))] */
+}/* [gensize,public] */;
+
struct netr_Blob {
uint32_t length;
uint8_t *data;/* [unique,size_is(length)] */
@@ -1252,8 +1280,8 @@ struct netr_DatabaseRedo {
const char *logon_server;/* [charset(UTF16)] */
const char *computername;/* [charset(UTF16)] */
struct netr_Authenticator *credential;/* [ref] */
- uint8_t *change_log_entry;/* [ref,size_is(change_log_entry_size)] */
- uint32_t change_log_entry_size;
+ struct netr_ChangeLogEntry change_log_entry;/* [subcontext_size(change_log_entry_size),subcontext(4)] */
+ uint32_t change_log_entry_size;/* [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->flags))] */
struct netr_Authenticator *return_authenticator;/* [ref] */
} in;
diff --git a/source3/librpc/gen_ndr/ntsvcs.h b/source3/librpc/gen_ndr/ntsvcs.h
index b56b552ae2..5021aa2252 100644
--- a/source3/librpc/gen_ndr/ntsvcs.h
+++ b/source3/librpc/gen_ndr/ntsvcs.h
@@ -2,14 +2,15 @@
#include <stdint.h>
+#include "librpc/gen_ndr/winreg.h"
#ifndef _HEADER_ntsvcs
#define _HEADER_ntsvcs
#define DEV_REGPROP_DESC ( 1 )
struct PNP_HwProfInfo {
- uint32_t unknown1;
- uint16_t unknown2[160];
- uint32_t unknown3;
+ uint32_t profile_handle;
+ uint16_t friendly_name[80];
+ uint32_t flags;
};
@@ -142,14 +143,14 @@ struct PNP_GetDeviceRegProp {
const char *devicepath;/* [ref,charset(UTF16)] */
uint32_t property;
uint32_t flags;
- uint32_t *reg_data_type;/* [ref] */
+ enum winreg_Type *reg_data_type;/* [ref] */
uint32_t *buffer_size;/* [ref] */
uint32_t *needed;/* [ref] */
} in;
struct {
uint8_t *buffer;/* [ref,length_is(*buffer_size),size_is(*buffer_size)] */
- uint32_t *reg_data_type;/* [ref] */
+ enum winreg_Type *reg_data_type;/* [ref] */
uint32_t *buffer_size;/* [ref] */
uint32_t *needed;/* [ref] */
WERROR result;
@@ -368,20 +369,20 @@ struct PNP_RequestEjectPC {
struct PNP_HwProfFlags {
struct {
- uint32_t unknown1;
+ uint32_t action;
const char *devicepath;/* [ref,charset(UTF16)] */
- uint32_t unknown2;
+ uint32_t config;
const char *unknown5;/* [unique,charset(UTF16)] */
- uint32_t unknown6;
- uint32_t unknown7;
- uint32_t *unknown3;/* [ref] */
- uint16_t *unknown4;/* [unique] */
+ uint32_t name_length;
+ uint32_t flags;
+ uint32_t *profile_flags;/* [ref] */
+ uint16_t *veto_type;/* [unique] */
} in;
struct {
const char **unknown5a;/* [unique,charset(UTF16)] */
- uint32_t *unknown3;/* [ref] */
- uint16_t *unknown4;/* [unique] */
+ uint32_t *profile_flags;/* [ref] */
+ uint16_t *veto_type;/* [unique] */
WERROR result;
} out;
@@ -391,8 +392,8 @@ struct PNP_HwProfFlags {
struct PNP_GetHwProfInfo {
struct {
uint32_t idx;
- uint32_t unknown1;
- uint32_t unknown2;
+ uint32_t size;
+ uint32_t flags;
struct PNP_HwProfInfo *info;/* [ref] */
} in;
diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h
index 8c8f3f70f9..537f144940 100644
--- a/source3/librpc/gen_ndr/samr.h
+++ b/source3/librpc/gen_ndr/samr.h
@@ -33,11 +33,41 @@
#define GENERIC_RIGHTS_ALIAS_READ ( (STANDARD_RIGHTS_READ_ACCESS|SAMR_ALIAS_ACCESS_GET_MEMBERS) )
#define GENERIC_RIGHTS_ALIAS_WRITE ( (STANDARD_RIGHTS_WRITE_ACCESS|SAMR_ALIAS_ACCESS_REMOVE_MEMBER|SAMR_ALIAS_ACCESS_ADD_MEMBER|SAMR_ALIAS_ACCESS_SET_INFO) )
#define GENERIC_RIGHTS_ALIAS_EXECUTE ( (STANDARD_RIGHTS_EXECUTE_ACCESS|SAMR_ALIAS_ACCESS_LOOKUP_INFO) )
-#define MAX_SAM_ENTRIES_W2K ( 0x400 )
-#define MAX_SAM_ENTRIES_W95 ( 50 )
#define SAMR_ENUM_USERS_MULTIPLIER ( 54 )
#define PASS_MUST_CHANGE_AT_NEXT_LOGON ( 0x01 )
#define PASS_DONT_CHANGE_AT_NEXT_LOGON ( 0x00 )
+enum netr_SamDatabaseID
+#ifndef USE_UINT_ENUMS
+ {
+ SAM_DATABASE_DOMAIN=0,
+ SAM_DATABASE_BUILTIN=1,
+ SAM_DATABASE_PRIVS=2
+}
+#else
+ { __donnot_use_enum_netr_SamDatabaseID=0x7FFFFFFF}
+#define SAM_DATABASE_DOMAIN ( 0 )
+#define SAM_DATABASE_BUILTIN ( 1 )
+#define SAM_DATABASE_PRIVS ( 2 )
+#endif
+;
+
+enum samr_RejectReason
+#ifndef USE_UINT_ENUMS
+ {
+ SAMR_REJECT_OTHER=0,
+ SAMR_REJECT_TOO_SHORT=1,
+ SAMR_REJECT_IN_HISTORY=2,
+ SAMR_REJECT_COMPLEXITY=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 )
@@ -142,6 +172,19 @@ enum samr_Role
#define DOMAIN_PASSWORD_STORE_CLEARTEXT ( 0x00000010 )
#define DOMAIN_REFUSE_PASSWORD_CHANGE ( 0x00000020 )
+enum samr_DomainServerState
+#ifndef USE_UINT_ENUMS
+ {
+ DOMAIN_SERVER_ENABLED=1,
+ DOMAIN_SERVER_DISABLED=2
+}
+#else
+ { __donnot_use_enum_samr_DomainServerState=0x7FFFFFFF}
+#define DOMAIN_SERVER_ENABLED ( 1 )
+#define DOMAIN_SERVER_DISABLED ( 2 )
+#endif
+;
+
struct samr_DomInfo1 {
uint16_t min_password_length;
uint16_t password_history_length;
@@ -156,7 +199,7 @@ struct samr_DomGeneralInformation {
struct lsa_String domain_name;
struct lsa_String primary;
uint64_t sequence_num;
- uint32_t unknown2;
+ enum samr_DomainServerState domain_server_state;
enum samr_Role role;
uint32_t unknown3;
uint32_t num_users;
@@ -190,7 +233,7 @@ struct samr_DomInfo8 {
};
struct samr_DomInfo9 {
- uint32_t unknown;
+ enum samr_DomainServerState domain_server_state;
};
struct samr_DomGeneralInformation2 {
@@ -524,7 +567,7 @@ struct samr_UserInfo23 {
struct samr_UserInfo24 {
struct samr_CryptPassword password;
- uint8_t pw_len;
+ uint8_t password_expired;
};
struct samr_CryptPasswordEx {
@@ -538,7 +581,7 @@ struct samr_UserInfo25 {
struct samr_UserInfo26 {
struct samr_CryptPasswordEx password;
- uint8_t pw_len;
+ uint8_t password_expired;
};
union samr_UserInfo {
@@ -1747,7 +1790,7 @@ struct samr_RidToSid {
} in;
struct {
- struct dom_sid2 *sid;/* [ref] */
+ struct dom_sid2 **sid;/* [ref] */
NTSTATUS result;
} out;
diff --git a/source3/librpc/gen_ndr/security.h b/source3/librpc/gen_ndr/security.h
index bb06dc2584..fe23347fdf 100644
--- a/source3/librpc/gen_ndr/security.h
+++ b/source3/librpc/gen_ndr/security.h
@@ -3,9 +3,7 @@
#include <stdint.h>
#include "librpc/gen_ndr/misc.h"
-#define dom_sid2 dom_sid
-#define dom_sid28 dom_sid
-#define dom_sid0 dom_sid
+#include "librpc/gen_ndr/dom_sid.h"
#ifndef _HEADER_security
#define _HEADER_security
@@ -245,7 +243,7 @@ struct security_ace_object {
union security_ace_object_ctr {
struct security_ace_object object;/* [case(SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT)] */
-}/* [nodiscriminant] */;
+}/* [public,nodiscriminant] */;
struct security_ace {
enum security_ace_type type;
@@ -254,7 +252,7 @@ struct security_ace {
uint32_t access_mask;
union security_ace_object_ctr object;/* [switch_is(type)] */
struct dom_sid trustee;
-}/* [gensize,public,nosize] */;
+}/* [gensize,public,nopull,nosize] */;
enum security_acl_revision
#ifndef USE_UINT_ENUMS
diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c
index b0893623a8..c30f276800 100644
--- a/source3/librpc/gen_ndr/srv_lsa.c
+++ b/source3/librpc/gen_ndr/srv_lsa.c
@@ -1128,14 +1128,14 @@ static bool api_lsa_LookupNames(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.sids = r->in.sids;
+ r->out.count = r->in.count;
r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
}
- r->out.sids = r->in.sids;
- r->out.count = r->in.count;
r->out.result = _lsa_LookupNames(p, r);
if (p->rng_fault_state) {
@@ -1210,14 +1210,14 @@ static bool api_lsa_LookupSids(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.names = r->in.names;
+ r->out.count = r->in.count;
r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
}
- r->out.names = r->in.names;
- r->out.count = r->in.count;
r->out.result = _lsa_LookupSids(p, r);
if (p->rng_fault_state) {
@@ -4444,14 +4444,14 @@ static bool api_lsa_LookupSids2(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.names = r->in.names;
+ r->out.count = r->in.count;
r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
}
- r->out.names = r->in.names;
- r->out.count = r->in.count;
r->out.result = _lsa_LookupSids2(p, r);
if (p->rng_fault_state) {
@@ -4526,14 +4526,14 @@ static bool api_lsa_LookupNames2(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.sids = r->in.sids;
+ r->out.count = r->in.count;
r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
}
- r->out.sids = r->in.sids;
- r->out.count = r->in.count;
r->out.result = _lsa_LookupNames2(p, r);
if (p->rng_fault_state) {
@@ -5272,14 +5272,14 @@ static bool api_lsa_LookupNames3(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.sids = r->in.sids;
+ r->out.count = r->in.count;
r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
}
- r->out.sids = r->in.sids;
- r->out.count = r->in.count;
r->out.result = _lsa_LookupNames3(p, r);
if (p->rng_fault_state) {
@@ -5872,14 +5872,14 @@ static bool api_lsa_LookupSids3(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.names = r->in.names;
+ r->out.count = r->in.count;
r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
}
- r->out.names = r->in.names;
- r->out.count = r->in.count;
r->out.result = _lsa_LookupSids3(p, r);
if (p->rng_fault_state) {
@@ -5954,14 +5954,14 @@ static bool api_lsa_LookupNames4(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.sids = r->in.sids;
+ r->out.count = r->in.count;
r->out.domains = talloc_zero(r, struct lsa_RefDomainList *);
if (r->out.domains == NULL) {
talloc_free(r);
return false;
}
- r->out.sids = r->in.sids;
- r->out.count = r->in.count;
r->out.result = _lsa_LookupNames4(p, r);
if (p->rng_fault_state) {
diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c
index 9546b2551b..2cb2978af2 100644
--- a/source3/librpc/gen_ndr/srv_netlogon.c
+++ b/source3/librpc/gen_ndr/srv_netlogon.c
@@ -871,6 +871,7 @@ static bool api_netr_AccountSync(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.return_authenticator = r->in.return_authenticator;
+ r->out.recordid = r->in.recordid;
r->out.buffer = talloc_zero(r, struct netr_AccountBuffer);
if (r->out.buffer == NULL) {
talloc_free(r);
@@ -895,7 +896,6 @@ static bool api_netr_AccountSync(pipes_struct *p)
return false;
}
- r->out.recordid = r->in.recordid;
r->out.result = _netr_AccountSync(p, r);
if (p->rng_fault_state) {
@@ -1290,13 +1290,13 @@ static bool api_netr_ServerAuthenticate2(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.negotiate_flags = r->in.negotiate_flags;
r->out.return_credentials = talloc_zero(r, struct netr_Credential);
if (r->out.return_credentials == NULL) {
talloc_free(r);
return false;
}
- r->out.negotiate_flags = r->in.negotiate_flags;
r->out.result = _netr_ServerAuthenticate2(p, r);
if (p->rng_fault_state) {
@@ -2146,13 +2146,13 @@ static bool api_netr_ServerAuthenticate3(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.negotiate_flags = r->in.negotiate_flags;
r->out.return_credentials = talloc_zero(r, struct netr_Credential);
if (r->out.return_credentials == NULL) {
talloc_free(r);
return false;
}
- r->out.negotiate_flags = r->in.negotiate_flags;
r->out.rid = talloc_zero(r, uint32_t);
if (r->out.rid == NULL) {
talloc_free(r);
@@ -3186,6 +3186,7 @@ static bool api_netr_LogonSamLogonEx(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.flags = r->in.flags;
r->out.validation = talloc_zero(r, union netr_Validation);
if (r->out.validation == NULL) {
talloc_free(r);
@@ -3198,7 +3199,6 @@ static bool api_netr_LogonSamLogonEx(pipes_struct *p)
return false;
}
- r->out.flags = r->in.flags;
r->out.result = _netr_LogonSamLogonEx(p, r);
if (p->rng_fault_state) {
@@ -3685,6 +3685,7 @@ static bool api_netr_LogonSamLogonWithFlags(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.return_authenticator = r->in.return_authenticator;
+ r->out.flags = r->in.flags;
r->out.validation = talloc_zero(r, union netr_Validation);
if (r->out.validation == NULL) {
talloc_free(r);
@@ -3697,7 +3698,6 @@ static bool api_netr_LogonSamLogonWithFlags(pipes_struct *p)
return false;
}
- r->out.flags = r->in.flags;
r->out.result = _netr_LogonSamLogonWithFlags(p, r);
if (p->rng_fault_state) {
diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.c b/source3/librpc/gen_ndr/srv_ntsvcs.c
index 87f5d51695..288f3ed5d7 100644
--- a/source3/librpc/gen_ndr/srv_ntsvcs.c
+++ b/source3/librpc/gen_ndr/srv_ntsvcs.c
@@ -782,13 +782,13 @@ static bool api_PNP_GetDeviceList(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.length = r->in.length;
r->out.buffer = talloc_zero_array(r, uint16_t, *r->out.length);
if (r->out.buffer == NULL) {
talloc_free(r);
return false;
}
- r->out.length = r->in.length;
r->out.result = _PNP_GetDeviceList(p, r);
if (p->rng_fault_state) {
@@ -1017,14 +1017,14 @@ static bool api_PNP_GetDeviceRegProp(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.reg_data_type = r->in.reg_data_type;
+ r->out.buffer_size = r->in.buffer_size;
+ r->out.needed = r->in.needed;
r->out.buffer = talloc_zero_array(r, uint8_t, *r->out.buffer_size);
if (r->out.buffer == NULL) {
talloc_free(r);
return false;
}
- r->out.buffer_size = r->in.buffer_size;
- r->out.needed = r->in.needed;
r->out.result = _PNP_GetDeviceRegProp(p, r);
if (p->rng_fault_state) {
@@ -2997,8 +2997,8 @@ static bool api_PNP_HwProfFlags(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.unknown3 = r->in.unknown3;
- r->out.unknown4 = r->in.unknown4;
+ r->out.profile_flags = r->in.profile_flags;
+ r->out.veto_type = r->in.veto_type;
r->out.unknown5a = talloc_zero(r, const char *);
if (r->out.unknown5a == NULL) {
talloc_free(r);
diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c
index 3e3a1cc6c1..f4facd2914 100644
--- a/source3/librpc/gen_ndr/srv_samr.c
+++ b/source3/librpc/gen_ndr/srv_samr.c
@@ -5202,7 +5202,7 @@ static bool api_samr_RidToSid(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.sid = talloc_zero(r, struct dom_sid2);
+ r->out.sid = talloc_zero(r, struct dom_sid2 *);
if (r->out.sid == NULL) {
talloc_free(r);
return false;
diff --git a/source3/librpc/gen_ndr/srv_srvsvc.c b/source3/librpc/gen_ndr/srv_srvsvc.c
index f995930b89..59f51ba774 100644
--- a/source3/librpc/gen_ndr/srv_srvsvc.c
+++ b/source3/librpc/gen_ndr/srv_srvsvc.c
@@ -46,13 +46,13 @@ static bool api_srvsvc_NetCharDevEnum(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
r->out.totalentries = talloc_zero(r, uint32_t);
if (r->out.totalentries == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _srvsvc_NetCharDevEnum(p, r);
if (p->rng_fault_state) {
@@ -281,13 +281,13 @@ static bool api_srvsvc_NetCharDevQEnum(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
r->out.totalentries = talloc_zero(r, uint32_t);
if (r->out.totalentries == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _srvsvc_NetCharDevQEnum(p, r);
if (p->rng_fault_state) {
@@ -664,13 +664,13 @@ static bool api_srvsvc_NetConnEnum(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
r->out.totalentries = talloc_zero(r, uint32_t);
if (r->out.totalentries == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _srvsvc_NetConnEnum(p, r);
if (p->rng_fault_state) {
@@ -746,13 +746,13 @@ static bool api_srvsvc_NetFileEnum(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
r->out.totalentries = talloc_zero(r, uint32_t);
if (r->out.totalentries == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _srvsvc_NetFileEnum(p, r);
if (p->rng_fault_state) {
@@ -981,13 +981,13 @@ static bool api_srvsvc_NetSessEnum(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
r->out.totalentries = talloc_zero(r, uint32_t);
if (r->out.totalentries == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _srvsvc_NetSessEnum(p, r);
if (p->rng_fault_state) {
@@ -1211,13 +1211,13 @@ static bool api_srvsvc_NetShareEnumAll(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
r->out.totalentries = talloc_zero(r, uint32_t);
if (r->out.totalentries == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _srvsvc_NetShareEnumAll(p, r);
if (p->rng_fault_state) {
@@ -1829,13 +1829,13 @@ static bool api_srvsvc_NetDiskEnum(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info = r->in.info;
+ r->out.resume_handle = r->in.resume_handle;
r->out.totalentries = talloc_zero(r, uint32_t);
if (r->out.totalentries == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _srvsvc_NetDiskEnum(p, r);
if (p->rng_fault_state) {
@@ -2064,13 +2064,13 @@ static bool api_srvsvc_NetTransportEnum(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.transports = r->in.transports;
+ r->out.resume_handle = r->in.resume_handle;
r->out.totalentries = talloc_zero(r, uint32_t);
if (r->out.totalentries == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _srvsvc_NetTransportEnum(p, r);
if (p->rng_fault_state) {
@@ -2451,13 +2451,13 @@ static bool api_srvsvc_NetPathCanonicalize(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.pathtype = r->in.pathtype;
r->out.can_path = talloc_zero_array(r, uint8_t, r->in.maxbuf);
if (r->out.can_path == NULL) {
talloc_free(r);
return false;
}
- r->out.pathtype = r->in.pathtype;
r->out.result = _srvsvc_NetPathCanonicalize(p, r);
if (p->rng_fault_state) {
@@ -2825,13 +2825,13 @@ static bool api_srvsvc_NetShareEnum(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info_ctr = r->in.info_ctr;
+ r->out.resume_handle = r->in.resume_handle;
r->out.totalentries = talloc_zero(r, uint32_t);
if (r->out.totalentries == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _srvsvc_NetShareEnum(p, r);
if (p->rng_fault_state) {
diff --git a/source3/librpc/gen_ndr/srv_svcctl.c b/source3/librpc/gen_ndr/srv_svcctl.c
index 2349b4fd93..5b30bf00f7 100644
--- a/source3/librpc/gen_ndr/srv_svcctl.c
+++ b/source3/librpc/gen_ndr/srv_svcctl.c
@@ -1139,6 +1139,7 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.resume_handle = r->in.resume_handle;
r->out.service = talloc_zero_array(r, uint8_t, r->in.buf_size);
if (r->out.service == NULL) {
talloc_free(r);
@@ -1157,7 +1158,6 @@ static bool api_svcctl_EnumServicesStatusW(pipes_struct *p)
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _svcctl_EnumServicesStatusW(p, r);
if (p->rng_fault_state) {
@@ -1637,13 +1637,13 @@ static bool api_svcctl_GetServiceDisplayNameW(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.display_name_length = r->in.display_name_length;
r->out.display_name = talloc_zero(r, const char *);
if (r->out.display_name == NULL) {
talloc_free(r);
return false;
}
- r->out.display_name_length = r->in.display_name_length;
r->out.result = _svcctl_GetServiceDisplayNameW(p, r);
if (p->rng_fault_state) {
@@ -1718,13 +1718,13 @@ static bool api_svcctl_GetServiceKeyNameW(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.display_name_length = r->in.display_name_length;
r->out.key_name = talloc_zero(r, const char *);
if (r->out.key_name == NULL) {
talloc_free(r);
return false;
}
- r->out.display_name_length = r->in.display_name_length;
r->out.result = _svcctl_GetServiceKeyNameW(p, r);
if (p->rng_fault_state) {
@@ -2124,6 +2124,7 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.resume_handle = r->in.resume_handle;
r->out.service = talloc_zero_array(r, uint8_t, r->in.buf_size);
if (r->out.service == NULL) {
talloc_free(r);
@@ -2142,7 +2143,6 @@ static bool api_svcctl_EnumServicesStatusA(pipes_struct *p)
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _svcctl_EnumServicesStatusA(p, r);
if (p->rng_fault_state) {
@@ -2615,13 +2615,13 @@ static bool api_svcctl_GetServiceDisplayNameA(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.display_name_length = r->in.display_name_length;
r->out.display_name = talloc_zero(r, const char *);
if (r->out.display_name == NULL) {
talloc_free(r);
return false;
}
- r->out.display_name_length = r->in.display_name_length;
r->out.result = _svcctl_GetServiceDisplayNameA(p, r);
if (p->rng_fault_state) {
@@ -2696,13 +2696,13 @@ static bool api_svcctl_GetServiceKeyNameA(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.display_name_length = r->in.display_name_length;
r->out.key_name = talloc_zero(r, const char *);
if (r->out.key_name == NULL) {
talloc_free(r);
return false;
}
- r->out.display_name_length = r->in.display_name_length;
r->out.result = _svcctl_GetServiceKeyNameA(p, r);
if (p->rng_fault_state) {
@@ -3327,6 +3327,7 @@ static bool api_EnumServicesStatusExA(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.resume_handle = r->in.resume_handle;
r->out.services = talloc_zero_array(r, uint8_t, r->in.buf_size);
if (r->out.services == NULL) {
talloc_free(r);
@@ -3345,7 +3346,6 @@ static bool api_EnumServicesStatusExA(pipes_struct *p)
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.group_name = talloc_zero(r, const char *);
if (r->out.group_name == NULL) {
talloc_free(r);
@@ -3426,6 +3426,7 @@ static bool api_EnumServicesStatusExW(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.resume_handle = r->in.resume_handle;
r->out.services = talloc_zero_array(r, uint8_t, r->in.buf_size);
if (r->out.services == NULL) {
talloc_free(r);
@@ -3444,13 +3445,6 @@ static bool api_EnumServicesStatusExW(pipes_struct *p)
return false;
}
- r->out.resume_handle = r->in.resume_handle;
- r->out.group_name = talloc_zero(r, const char *);
- if (r->out.group_name == NULL) {
- talloc_free(r);
- return false;
- }
-
r->out.result = _EnumServicesStatusExW(p, r);
if (p->rng_fault_state) {
diff --git a/source3/librpc/gen_ndr/srv_winreg.c b/source3/librpc/gen_ndr/srv_winreg.c
index 77b0a1c5d2..ac70b41219 100644
--- a/source3/librpc/gen_ndr/srv_winreg.c
+++ b/source3/librpc/gen_ndr/srv_winreg.c
@@ -520,13 +520,13 @@ static bool api_winreg_CreateKey(pipes_struct *p)
}
ZERO_STRUCT(r->out);
+ r->out.action_taken = r->in.action_taken;
r->out.new_handle = talloc_zero(r, struct policy_handle);
if (r->out.new_handle == NULL) {
talloc_free(r);
return false;
}
- r->out.action_taken = r->in.action_taken;
r->out.result = _winreg_CreateKey(p, r);
if (p->rng_fault_state) {
diff --git a/source3/librpc/gen_ndr/srv_wkssvc.c b/source3/librpc/gen_ndr/srv_wkssvc.c
index 9c07fa86ea..61a5be081f 100644
--- a/source3/librpc/gen_ndr/srv_wkssvc.c
+++ b/source3/librpc/gen_ndr/srv_wkssvc.c
@@ -201,13 +201,13 @@ static bool api_wkssvc_NetWkstaEnumUsers(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info = r->in.info;
+ r->out.resume_handle = r->in.resume_handle;
r->out.entries_read = talloc_zero(r, uint32_t);
if (r->out.entries_read == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _wkssvc_NetWkstaEnumUsers(p, r);
if (p->rng_fault_state) {
@@ -438,13 +438,13 @@ static bool api_wkssvc_NetWkstaTransportEnum(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info = r->in.info;
+ r->out.resume_handle = r->in.resume_handle;
r->out.total_entries = talloc_zero(r, uint32_t);
if (r->out.total_entries == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _wkssvc_NetWkstaTransportEnum(p, r);
if (p->rng_fault_state) {
@@ -896,13 +896,13 @@ static bool api_wkssvc_NetrUseEnum(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.info = r->in.info;
+ r->out.resume_handle = r->in.resume_handle;
r->out.entries_read = talloc_zero(r, uint32_t);
if (r->out.entries_read == NULL) {
talloc_free(r);
return false;
}
- r->out.resume_handle = r->in.resume_handle;
r->out.result = _wkssvc_NetrUseEnum(p, r);
if (p->rng_fault_state) {
diff --git a/source3/librpc/gen_ndr/svcctl.h b/source3/librpc/gen_ndr/svcctl.h
index b098eb1c42..9baa122e56 100644
--- a/source3/librpc/gen_ndr/svcctl.h
+++ b/source3/librpc/gen_ndr/svcctl.h
@@ -81,11 +81,19 @@ struct ENUM_SERVICE_STATUS {
enum SERVICE_CONTROL
#ifndef USE_UINT_ENUMS
{
- FIXME=1
+ SVCCTL_CONTROL_STOP=0x00000001,
+ SVCCTL_CONTROL_PAUSE=0x00000002,
+ SVCCTL_CONTROL_CONTINUE=0x00000003,
+ SVCCTL_CONTROL_INTERROGATE=0x00000004,
+ SVCCTL_CONTROL_SHUTDOWN=0x00000005
}
#else
{ __donnot_use_enum_SERVICE_CONTROL=0x7FFFFFFF}
-#define FIXME ( 1 )
+#define SVCCTL_CONTROL_STOP ( 0x00000001 )
+#define SVCCTL_CONTROL_PAUSE ( 0x00000002 )
+#define SVCCTL_CONTROL_CONTINUE ( 0x00000003 )
+#define SVCCTL_CONTROL_INTERROGATE ( 0x00000004 )
+#define SVCCTL_CONTROL_SHUTDOWN ( 0x00000005 )
#endif
;
@@ -137,7 +145,7 @@ struct svcctl_CloseServiceHandle {
struct svcctl_ControlService {
struct {
struct policy_handle *handle;/* [ref] */
- uint32_t control;
+ enum SERVICE_CONTROL control;
} in;
struct {
@@ -333,14 +341,14 @@ struct svcctl_EnumServicesStatusW {
struct policy_handle *handle;/* [ref] */
uint32_t type;
uint32_t state;
- uint32_t buf_size;
+ uint32_t buf_size;/* [range(0,262144)] */
uint32_t *resume_handle;/* [unique] */
} in;
struct {
- uint8_t *service;/* [size_is(buf_size)] */
- uint32_t *bytes_needed;/* [ref] */
- uint32_t *services_returned;/* [ref] */
+ uint8_t *service;/* [ref,size_is(buf_size)] */
+ uint32_t *bytes_needed;/* [ref,range(0,262144)] */
+ uint32_t *services_returned;/* [ref,range(0,262144)] */
uint32_t *resume_handle;/* [unique] */
WERROR result;
} out;
@@ -721,12 +729,12 @@ struct svcctl_QueryServiceConfig2W {
struct {
struct policy_handle *handle;/* [ref] */
uint32_t info_level;
- uint32_t buf_size;
+ uint32_t buf_size;/* [range(0,8192)] */
} in;
struct {
- uint8_t *buffer;
- uint32_t *bytes_needed;/* [ref] */
+ uint8_t *buffer;/* [ref,size_is(buf_size)] */
+ uint32_t *bytes_needed;/* [ref,range(0,8192)] */
WERROR result;
} out;
@@ -737,12 +745,12 @@ struct svcctl_QueryServiceStatusEx {
struct {
struct policy_handle *handle;/* [ref] */
uint32_t info_level;
- uint32_t buf_size;
+ uint32_t buf_size;/* [range(0,8192)] */
} in;
struct {
- uint8_t *buffer;
- uint32_t *bytes_needed;/* [ref] */
+ uint8_t *buffer;/* [ref,size_is(buf_size)] */
+ uint32_t *bytes_needed;/* [ref,range(0,8192)] */
WERROR result;
} out;
@@ -777,16 +785,16 @@ struct EnumServicesStatusExW {
uint32_t info_level;
uint32_t type;
uint32_t state;
- uint32_t buf_size;
- uint32_t *resume_handle;/* [unique] */
+ uint32_t buf_size;/* [range(0,262144)] */
+ const char *group_name;/* [unique,charset(UTF16)] */
+ uint32_t *resume_handle;/* [unique,range(0,262144)] */
} in;
struct {
- uint8_t *services;
- uint32_t *bytes_needed;/* [ref] */
- uint32_t *service_returned;/* [ref] */
- const char **group_name;/* [ref,charset(UTF16)] */
- uint32_t *resume_handle;/* [unique] */
+ uint8_t *services;/* [ref,size_is(buf_size)] */
+ uint32_t *bytes_needed;/* [ref,range(0,262144)] */
+ uint32_t *service_returned;/* [ref,range(0,262144)] */
+ uint32_t *resume_handle;/* [unique,range(0,262144)] */
WERROR result;
} out;
diff --git a/source3/librpc/gen_ndr/xattr.h b/source3/librpc/gen_ndr/xattr.h
index 1d8da3f5e2..1148a0acec 100644
--- a/source3/librpc/gen_ndr/xattr.h
+++ b/source3/librpc/gen_ndr/xattr.h
@@ -73,14 +73,14 @@ struct xattr_DosStreams {
struct xattr_DosStream *streams;/* [unique,size_is(num_streams)] */
}/* [public] */;
-struct security_descriptor_timestamp {
+struct security_descriptor_hash {
struct security_descriptor *sd;/* [unique] */
- NTTIME last_changed;
+ uint8_t hash[16];
}/* [public] */;
union xattr_NTACL_Info {
struct security_descriptor *sd;/* [unique,case] */
- struct security_descriptor_timestamp *sd_ts;/* [unique,case(2)] */
+ struct security_descriptor_hash *sd_hs;/* [unique,case(2)] */
}/* [switch_type(uint16)] */;
struct xattr_NTACL {
diff --git a/source3/librpc/idl/dom_sid.idl b/source3/librpc/idl/dom_sid.idl
new file mode 100644
index 0000000000..c405c18726
--- /dev/null
+++ b/source3/librpc/idl/dom_sid.idl
@@ -0,0 +1,29 @@
+/*
+ use the same structure for dom_sid2 as dom_sid. A dom_sid2 is really
+ just a dom sid, but with the sub_auths represented as a conformant
+ array. As with all in-structure conformant arrays, the array length
+ is placed before the start of the structure. That's what gives rise
+ to the extra num_auths elemenent. We don't want the Samba code to
+ have to bother with such esoteric NDR details, so its easier to just
+ define it as a dom_sid and use pidl magic to make it all work. It
+ just means you need to mark a sid as a "dom_sid2" in the IDL when you
+ know it is of the conformant array variety
+*/
+cpp_quote("#define dom_sid2 dom_sid")
+
+/* same struct as dom_sid but inside a 28 bytes fixed buffer in NDR */
+cpp_quote("#define dom_sid28 dom_sid")
+
+/* same struct as dom_sid but in a variable byte buffer, which is maybe empty in NDR */
+cpp_quote("#define dom_sid0 dom_sid")
+
+[
+ pointer_default(unique)
+]
+interface dom_sid
+{
+ struct _dummy_domsid {
+ uint8 dummy;
+ };
+}
+
diff --git a/source3/librpc/idl/samr.idl b/source3/librpc/idl/samr.idl
deleted file mode 100644
index f47e0994dc..0000000000
--- a/source3/librpc/idl/samr.idl
+++ /dev/null
@@ -1,1554 +0,0 @@
-#include "idl_types.h"
-
-/*
- samr interface definition
-*/
-import "misc.idl", "lsa.idl", "security.idl";
-
-/*
- Thanks to Todd Sabin for some information from his samr.idl in acltools
-*/
-
-[ uuid("12345778-1234-abcd-ef00-0123456789ac"),
- version(1.0),
- endpoint("ncacn_np:[\\pipe\\samr]","ncacn_ip_tcp:", "ncalrpc:"),
- pointer_default(unique)
-] interface samr
-{
- typedef bitmap security_secinfo security_secinfo;
-
- /* account control (acct_flags) bits */
- typedef [public,bitmap32bit] bitmap {
- ACB_DISABLED = 0x00000001, /* 1 = User account disabled */
- ACB_HOMDIRREQ = 0x00000002, /* 1 = Home directory required */
- ACB_PWNOTREQ = 0x00000004, /* 1 = User password not required */
- ACB_TEMPDUP = 0x00000008, /* 1 = Temporary duplicate account */
- ACB_NORMAL = 0x00000010, /* 1 = Normal user account */
- ACB_MNS = 0x00000020, /* 1 = MNS logon user account */
- ACB_DOMTRUST = 0x00000040, /* 1 = Interdomain trust account */
- ACB_WSTRUST = 0x00000080, /* 1 = Workstation trust account */
- ACB_SVRTRUST = 0x00000100, /* 1 = Server trust account */
- ACB_PWNOEXP = 0x00000200, /* 1 = User password does not expire */
- ACB_AUTOLOCK = 0x00000400, /* 1 = Account auto locked */
- ACB_ENC_TXT_PWD_ALLOWED = 0x00000800, /* 1 = Encryped text password is allowed */
- ACB_SMARTCARD_REQUIRED = 0x00001000, /* 1 = Smart Card required */
- ACB_TRUSTED_FOR_DELEGATION = 0x00002000, /* 1 = Trusted for Delegation */
- ACB_NOT_DELEGATED = 0x00004000, /* 1 = Not delegated */
- ACB_USE_DES_KEY_ONLY = 0x00008000, /* 1 = Use DES key only */
- ACB_DONT_REQUIRE_PREAUTH = 0x00010000, /* 1 = Preauth not required */
- ACB_PW_EXPIRED = 0x00020000, /* 1 = Password Expired */
- ACB_NO_AUTH_DATA_REQD = 0x00080000 /* 1 = No authorization data required */
- } samr_AcctFlags;
-
- /* SAM server specific access rights */
-
- typedef [bitmap32bit] bitmap {
- SAMR_ACCESS_CONNECT_TO_SERVER = 0x00000001,
- SAMR_ACCESS_SHUTDOWN_SERVER = 0x00000002,
- SAMR_ACCESS_INITIALIZE_SERVER = 0x00000004,
- SAMR_ACCESS_CREATE_DOMAIN = 0x00000008,
- SAMR_ACCESS_ENUM_DOMAINS = 0x00000010,
- SAMR_ACCESS_OPEN_DOMAIN = 0x00000020
- } samr_ConnectAccessMask;
-
- const int SAMR_ACCESS_ALL_ACCESS = 0x0000003F;
-
- const int GENERIC_RIGHTS_SAM_ALL_ACCESS =
- (STANDARD_RIGHTS_REQUIRED_ACCESS |
- SAMR_ACCESS_ALL_ACCESS);
-
- const int GENERIC_RIGHTS_SAM_READ =
- (STANDARD_RIGHTS_READ_ACCESS |
- SAMR_ACCESS_ENUM_DOMAINS);
-
- const int GENERIC_RIGHTS_SAM_WRITE =
- (STANDARD_RIGHTS_WRITE_ACCESS |
- SAMR_ACCESS_CREATE_DOMAIN |
- SAMR_ACCESS_INITIALIZE_SERVER |
- SAMR_ACCESS_SHUTDOWN_SERVER);
-
- const int GENERIC_RIGHTS_SAM_EXECUTE =
- (STANDARD_RIGHTS_EXECUTE_ACCESS |
- SAMR_ACCESS_OPEN_DOMAIN |
- SAMR_ACCESS_CONNECT_TO_SERVER);
-
- /* User Object specific access rights */
-
- typedef [bitmap32bit] bitmap {
- SAMR_USER_ACCESS_GET_NAME_ETC = 0x00000001,
- SAMR_USER_ACCESS_GET_LOCALE = 0x00000002,
- SAMR_USER_ACCESS_SET_LOC_COM = 0x00000004,
- SAMR_USER_ACCESS_GET_LOGONINFO = 0x00000008,
- SAMR_USER_ACCESS_GET_ATTRIBUTES = 0x00000010,
- SAMR_USER_ACCESS_SET_ATTRIBUTES = 0x00000020,
- SAMR_USER_ACCESS_CHANGE_PASSWORD = 0x00000040,
- SAMR_USER_ACCESS_SET_PASSWORD = 0x00000080,
- SAMR_USER_ACCESS_GET_GROUPS = 0x00000100,
- SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP = 0x00000200,
- SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP = 0x00000400
- } samr_UserAccessMask;
-
- const int SAMR_USER_ACCESS_ALL_ACCESS = 0x000007FF;
-
- const int GENERIC_RIGHTS_USER_ALL_ACCESS =
- (STANDARD_RIGHTS_REQUIRED_ACCESS |
- SAMR_USER_ACCESS_ALL_ACCESS); /* 0x000f07ff */
-
- const int GENERIC_RIGHTS_USER_READ =
- (STANDARD_RIGHTS_READ_ACCESS |
- SAMR_USER_ACCESS_GET_GROUP_MEMBERSHIP |
- SAMR_USER_ACCESS_GET_GROUPS |
- SAMR_USER_ACCESS_GET_ATTRIBUTES |
- SAMR_USER_ACCESS_GET_LOGONINFO |
- SAMR_USER_ACCESS_GET_LOCALE); /* 0x0002031a */
-
- const int GENERIC_RIGHTS_USER_WRITE =
- (STANDARD_RIGHTS_WRITE_ACCESS |
- SAMR_USER_ACCESS_CHANGE_PASSWORD |
- SAMR_USER_ACCESS_SET_LOC_COM |
- SAMR_USER_ACCESS_SET_ATTRIBUTES |
- SAMR_USER_ACCESS_SET_PASSWORD |
- SAMR_USER_ACCESS_CHANGE_GROUP_MEMBERSHIP); /* 0x000204e4 */
-
- const int GENERIC_RIGHTS_USER_EXECUTE =
- (STANDARD_RIGHTS_EXECUTE_ACCESS |
- SAMR_USER_ACCESS_CHANGE_PASSWORD |
- SAMR_USER_ACCESS_GET_NAME_ETC); /* 0x00020041 */
-
- /* Domain Object specific access rights */
-
- typedef [bitmap32bit] bitmap {
- SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1 = 0x00000001,
- SAMR_DOMAIN_ACCESS_SET_INFO_1 = 0x00000002,
- SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2 = 0x00000004,
- SAMR_DOMAIN_ACCESS_SET_INFO_2 = 0x00000008,
- SAMR_DOMAIN_ACCESS_CREATE_USER = 0x00000010,
- SAMR_DOMAIN_ACCESS_CREATE_GROUP = 0x00000020,
- SAMR_DOMAIN_ACCESS_CREATE_ALIAS = 0x00000040,
- SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS = 0x00000080,
- SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS = 0x00000100,
- SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT = 0x00000200,
- SAMR_DOMAIN_ACCESS_SET_INFO_3 = 0x00000400
- } samr_DomainAccessMask;
-
- const int SAMR_DOMAIN_ACCESS_ALL_ACCESS = 0x000007FF;
-
- const int GENERIC_RIGHTS_DOMAIN_ALL_ACCESS =
- (STANDARD_RIGHTS_REQUIRED_ACCESS |
- SAMR_DOMAIN_ACCESS_ALL_ACCESS);
-
- const int GENERIC_RIGHTS_DOMAIN_READ =
- (STANDARD_RIGHTS_READ_ACCESS |
- SAMR_DOMAIN_ACCESS_LOOKUP_ALIAS |
- SAMR_DOMAIN_ACCESS_LOOKUP_INFO_2);
-
- const int GENERIC_RIGHTS_DOMAIN_WRITE =
- (STANDARD_RIGHTS_WRITE_ACCESS |
- SAMR_DOMAIN_ACCESS_SET_INFO_3 |
- SAMR_DOMAIN_ACCESS_CREATE_ALIAS |
- SAMR_DOMAIN_ACCESS_CREATE_GROUP |
- SAMR_DOMAIN_ACCESS_CREATE_USER |
- SAMR_DOMAIN_ACCESS_SET_INFO_2 |
- SAMR_DOMAIN_ACCESS_SET_INFO_1);
-
- const int GENERIC_RIGHTS_DOMAIN_EXECUTE =
- (STANDARD_RIGHTS_EXECUTE_ACCESS |
- SAMR_DOMAIN_ACCESS_OPEN_ACCOUNT |
- SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS |
- SAMR_DOMAIN_ACCESS_LOOKUP_INFO_1);
-
- /* Group Object specific access rights */
-
- typedef [bitmap32bit] bitmap {
- SAMR_GROUP_ACCESS_LOOKUP_INFO = 0x00000001,
- SAMR_GROUP_ACCESS_SET_INFO = 0x00000002,
- SAMR_GROUP_ACCESS_ADD_MEMBER = 0x00000004,
- SAMR_GROUP_ACCESS_REMOVE_MEMBER = 0x00000008,
- SAMR_GROUP_ACCESS_GET_MEMBERS = 0x00000010
- } samr_GroupAccessMask;
-
- const int SAMR_GROUP_ACCESS_ALL_ACCESS = 0x0000001F;
-
- const int GENERIC_RIGHTS_GROUP_ALL_ACCESS =
- (STANDARD_RIGHTS_REQUIRED_ACCESS |
- SAMR_GROUP_ACCESS_ALL_ACCESS); /* 0x000f001f */
-
- const int GENERIC_RIGHTS_GROUP_READ =
- (STANDARD_RIGHTS_READ_ACCESS |
- SAMR_GROUP_ACCESS_GET_MEMBERS); /* 0x00020010 */
-
- const int GENERIC_RIGHTS_GROUP_WRITE =
- (STANDARD_RIGHTS_WRITE_ACCESS |
- SAMR_GROUP_ACCESS_REMOVE_MEMBER |
- SAMR_GROUP_ACCESS_ADD_MEMBER |
- SAMR_GROUP_ACCESS_SET_INFO); /* 0x0002000e */
-
- const int GENERIC_RIGHTS_GROUP_EXECUTE =
- (STANDARD_RIGHTS_EXECUTE_ACCESS |
- SAMR_GROUP_ACCESS_LOOKUP_INFO); /* 0x00020001 */
-
- /* Alias Object specific access rights */
-
- typedef [bitmap32bit] bitmap {
- SAMR_ALIAS_ACCESS_ADD_MEMBER = 0x00000001,
- SAMR_ALIAS_ACCESS_REMOVE_MEMBER = 0x00000002,
- SAMR_ALIAS_ACCESS_GET_MEMBERS = 0x00000004,
- SAMR_ALIAS_ACCESS_LOOKUP_INFO = 0x00000008,
- SAMR_ALIAS_ACCESS_SET_INFO = 0x00000010
- } samr_AliasAccessMask;
-
- const int SAMR_ALIAS_ACCESS_ALL_ACCESS = 0x0000001F;
-
- const int GENERIC_RIGHTS_ALIAS_ALL_ACCESS =
- (STANDARD_RIGHTS_REQUIRED_ACCESS |
- SAMR_ALIAS_ACCESS_ALL_ACCESS); /* 0x000f001f */
-
- const int GENERIC_RIGHTS_ALIAS_READ =
- (STANDARD_RIGHTS_READ_ACCESS |
- SAMR_ALIAS_ACCESS_GET_MEMBERS); /* 0x00020004 */
-
- const int GENERIC_RIGHTS_ALIAS_WRITE =
- (STANDARD_RIGHTS_WRITE_ACCESS |
- SAMR_ALIAS_ACCESS_REMOVE_MEMBER |
- SAMR_ALIAS_ACCESS_ADD_MEMBER |
- SAMR_ALIAS_ACCESS_SET_INFO); /* 0x00020013 */
-
- const int GENERIC_RIGHTS_ALIAS_EXECUTE =
- (STANDARD_RIGHTS_EXECUTE_ACCESS |
- SAMR_ALIAS_ACCESS_LOOKUP_INFO); /* 0x00020008 */
-
- /******************/
- /* Function: 0x00 */
- NTSTATUS samr_Connect (
- /* notice the lack of [string] */
- [in,unique] uint16 *system_name,
- [in] samr_ConnectAccessMask access_mask,
- [out,ref] policy_handle *connect_handle
- );
-
-
- /******************/
- /* Function: 0x01 */
- [public] NTSTATUS samr_Close (
- [in,out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x02 */
-
- NTSTATUS samr_SetSecurity (
- [in,ref] policy_handle *handle,
- [in] security_secinfo sec_info,
- [in,ref] sec_desc_buf *sdbuf
- );
-
- /******************/
- /* Function: 0x03 */
-
- NTSTATUS samr_QuerySecurity (
- [in,ref] policy_handle *handle,
- [in] security_secinfo sec_info,
- [out,ref] sec_desc_buf **sdbuf
- );
-
- /******************/
- /* Function: 0x04 */
-
- /*
- shutdown the SAM - once you call this the SAM will be dead
- */
- NTSTATUS samr_Shutdown (
- [in,ref] policy_handle *connect_handle
- );
-
- /******************/
- /* Function: 0x05 */
- NTSTATUS samr_LookupDomain (
- [in,ref] policy_handle *connect_handle,
- [in,ref] lsa_String *domain_name,
- [out,ref] dom_sid2 **sid
- );
-
-
- /******************/
- /* Function: 0x06 */
-
- typedef struct {
- uint32 idx;
- lsa_String name;
- } samr_SamEntry;
-
- typedef struct {
- uint32 count;
- [size_is(count)] samr_SamEntry *entries;
- } samr_SamArray;
-
- NTSTATUS samr_EnumDomains (
- [in] policy_handle *connect_handle,
- [in,out,ref] uint32 *resume_handle,
- [out,ref] samr_SamArray **sam,
- [in] uint32 buf_size,
- [out,ref] uint32 *num_entries
- );
-
-
- /************************/
- /* Function 0x07 */
- [public] NTSTATUS samr_OpenDomain(
- [in,ref] policy_handle *connect_handle,
- [in] samr_DomainAccessMask access_mask,
- [in,ref] dom_sid2 *sid,
- [out,ref] policy_handle *domain_handle
- );
-
- /************************/
- /* Function 0x08 */
- /* server roles */
- typedef [v1_enum] enum {
- SAMR_ROLE_STANDALONE = 0,
- SAMR_ROLE_DOMAIN_MEMBER = 1,
- SAMR_ROLE_DOMAIN_BDC = 2,
- SAMR_ROLE_DOMAIN_PDC = 3
- } samr_Role;
-
- /* password properties flags */
- typedef [public,bitmap32bit] bitmap {
- DOMAIN_PASSWORD_COMPLEX = 0x00000001,
- DOMAIN_PASSWORD_NO_ANON_CHANGE = 0x00000002,
- DOMAIN_PASSWORD_NO_CLEAR_CHANGE = 0x00000004,
- DOMAIN_PASSWORD_LOCKOUT_ADMINS = 0x00000008,
- DOMAIN_PASSWORD_STORE_CLEARTEXT = 0x00000010,
- DOMAIN_REFUSE_PASSWORD_CHANGE = 0x00000020
- } samr_PasswordProperties;
-
- typedef struct {
- uint16 min_password_length;
- uint16 password_history_length;
- samr_PasswordProperties password_properties;
- /* yes, these are signed. They are in negative 100ns */
- dlong max_password_age;
- dlong min_password_age;
- } samr_DomInfo1;
-
- typedef struct {
- NTTIME force_logoff_time;
- lsa_String oem_information; /* comment */
- lsa_String domain_name;
- lsa_String primary; /* PDC name if this is a BDC */
- udlong sequence_num;
- uint32 unknown2;
- samr_Role role;
- uint32 unknown3;
- uint32 num_users;
- uint32 num_groups;
- uint32 num_aliases;
- } samr_DomGeneralInformation;
-
- typedef struct {
- NTTIME force_logoff_time;
- } samr_DomInfo3;
-
- typedef struct {
- lsa_String oem_information; /* comment */
- } samr_DomOEMInformation;
-
- typedef struct {
- lsa_String domain_name;
- } samr_DomInfo5;
-
- typedef struct {
- lsa_String primary;
- } samr_DomInfo6;
-
- typedef struct {
- samr_Role role;
- } samr_DomInfo7;
-
- typedef struct {
- hyper sequence_num;
- NTTIME domain_create_time;
- } samr_DomInfo8;
-
- typedef struct {
- uint32 unknown; /* w2k3 returns 1 */
- } samr_DomInfo9;
-
- typedef struct {
- samr_DomGeneralInformation general;
- hyper lockout_duration;
- hyper lockout_window;
- uint16 lockout_threshold;
- } samr_DomGeneralInformation2;
-
- typedef struct {
- hyper lockout_duration;
- hyper lockout_window;
- uint16 lockout_threshold;
- } samr_DomInfo12;
-
- typedef struct {
- hyper sequence_num;
- NTTIME domain_create_time;
- uint32 unknown1;
- uint32 unknown2;
- } samr_DomInfo13;
-
- typedef [switch_type(uint16)] union {
- [case(1)] samr_DomInfo1 info1;
- [case(2)] samr_DomGeneralInformation general;
- [case(3)] samr_DomInfo3 info3;
- [case(4)] samr_DomOEMInformation oem;
- [case(5)] samr_DomInfo5 info5;
- [case(6)] samr_DomInfo6 info6;
- [case(7)] samr_DomInfo7 info7;
- [case(8)] samr_DomInfo8 info8;
- [case(9)] samr_DomInfo9 info9;
- [case(11)] samr_DomGeneralInformation2 general2;
- [case(12)] samr_DomInfo12 info12;
- [case(13)] samr_DomInfo13 info13;
- } samr_DomainInfo;
-
- NTSTATUS samr_QueryDomainInfo(
- [in,ref] policy_handle *domain_handle,
- [in] uint16 level,
- [out,ref,switch_is(level)] samr_DomainInfo **info
- );
-
- /************************/
- /* Function 0x09 */
- /*
- only levels 1, 3, 4, 6, 7, 9, 12 are valid for this
- call in w2k3
- */
- NTSTATUS samr_SetDomainInfo(
- [in,ref] policy_handle *domain_handle,
- [in] uint16 level,
- [in,switch_is(level),ref] samr_DomainInfo *info
- );
-
-
- /************************/
- /* Function 0x0a */
- NTSTATUS samr_CreateDomainGroup(
- [in,ref] policy_handle *domain_handle,
- [in,ref] lsa_String *name,
- [in] samr_GroupAccessMask access_mask,
- [out,ref] policy_handle *group_handle,
- [out,ref] uint32 *rid
- );
-
-
- /************************/
- /* Function 0x0b */
-
- const int MAX_SAM_ENTRIES_W2K = 0x400; /* 1024 */
- const int MAX_SAM_ENTRIES_W95 = 50;
-
- NTSTATUS samr_EnumDomainGroups(
- [in] policy_handle *domain_handle,
- [in,out,ref] uint32 *resume_handle,
- [out,ref] samr_SamArray **sam,
- [in] uint32 max_size,
- [out,ref] uint32 *num_entries
- );
-
- /************************/
- /* Function 0x0c */
- NTSTATUS samr_CreateUser(
- [in,ref] policy_handle *domain_handle,
- [in,ref] lsa_String *account_name,
- [in] samr_UserAccessMask access_mask,
- [out,ref] policy_handle *user_handle,
- [out,ref] uint32 *rid
- );
-
- /************************/
- /* Function 0x0d */
-
-
- /* w2k3 treats max_size as max_users*54 and sets the
- resume_handle as the rid of the last user sent
- */
- const int SAMR_ENUM_USERS_MULTIPLIER = 54;
-
- NTSTATUS samr_EnumDomainUsers(
- [in] policy_handle *domain_handle,
- [in,out,ref] uint32 *resume_handle,
- [in] samr_AcctFlags acct_flags,
- [out,ref] samr_SamArray **sam,
- [in] uint32 max_size,
- [out,ref] uint32 *num_entries
- );
-
- /************************/
- /* Function 0x0e */
- NTSTATUS samr_CreateDomAlias(
- [in,ref] policy_handle *domain_handle,
- [in,ref] lsa_String *alias_name,
- [in] samr_AliasAccessMask access_mask,
- [out,ref] policy_handle *alias_handle,
- [out,ref] uint32 *rid
- );
-
- /************************/
- /* Function 0x0f */
- NTSTATUS samr_EnumDomainAliases(
- [in] policy_handle *domain_handle,
- [in,out,ref] uint32 *resume_handle,
- [out,ref] samr_SamArray **sam,
- [in] uint32 max_size,
- [out,ref] uint32 *num_entries
- );
-
- /************************/
- /* Function 0x10 */
-
- typedef struct {
- [range(0,1024)] uint32 count;
- [size_is(count)] uint32 *ids;
- } samr_Ids;
-
- NTSTATUS samr_GetAliasMembership(
- [in,ref] policy_handle *domain_handle,
- [in,ref] lsa_SidArray *sids,
- [out,ref] samr_Ids *rids
- );
-
- /************************/
- /* Function 0x11 */
-
- [public] NTSTATUS samr_LookupNames(
- [in,ref] policy_handle *domain_handle,
- [in,range(0,1000)] uint32 num_names,
- [in,size_is(1000),length_is(num_names)] lsa_String names[],
- [out,ref] samr_Ids *rids,
- [out,ref] samr_Ids *types
- );
-
-
- /************************/
- /* Function 0x12 */
- NTSTATUS samr_LookupRids(
- [in,ref] policy_handle *domain_handle,
- [in,range(0,1000)] uint32 num_rids,
- [in,size_is(1000),length_is(num_rids)] uint32 rids[],
- [out,ref] lsa_Strings *names,
- [out,ref] samr_Ids *types
- );
-
- /************************/
- /* Function 0x13 */
- NTSTATUS samr_OpenGroup(
- [in,ref] policy_handle *domain_handle,
- [in] samr_GroupAccessMask access_mask,
- [in] uint32 rid,
- [out,ref] policy_handle *group_handle
- );
-
- /* Group attributes */
- typedef [public,bitmap32bit] bitmap {
- SE_GROUP_MANDATORY = 0x00000001,
- SE_GROUP_ENABLED_BY_DEFAULT = 0x00000002,
- SE_GROUP_ENABLED = 0x00000004,
- SE_GROUP_OWNER = 0x00000008,
- SE_GROUP_USE_FOR_DENY_ONLY = 0x00000010,
- SE_GROUP_RESOURCE = 0x20000000,
- SE_GROUP_LOGON_ID = 0xC0000000
- } samr_GroupAttrs;
-
- /************************/
- /* Function 0x14 */
-
- typedef struct {
- lsa_String name;
- samr_GroupAttrs attributes;
- uint32 num_members;
- lsa_String description;
- } samr_GroupInfoAll;
-
- typedef struct {
- samr_GroupAttrs attributes;
- } samr_GroupInfoAttributes;
-
- typedef struct {
- lsa_String description;
- } samr_GroupInfoDescription;
-
- typedef enum {
- GROUPINFOALL = 1,
- GROUPINFONAME = 2,
- GROUPINFOATTRIBUTES = 3,
- GROUPINFODESCRIPTION = 4,
- GROUPINFOALL2 = 5
- } samr_GroupInfoEnum;
-
- typedef [switch_type(samr_GroupInfoEnum)] union {
- [case(GROUPINFOALL)] samr_GroupInfoAll all;
- [case(GROUPINFONAME)] lsa_String name;
- [case(GROUPINFOATTRIBUTES)] samr_GroupInfoAttributes attributes;
- [case(GROUPINFODESCRIPTION)] lsa_String description;
- [case(GROUPINFOALL2)] samr_GroupInfoAll all2;
- } samr_GroupInfo;
-
- NTSTATUS samr_QueryGroupInfo(
- [in,ref] policy_handle *group_handle,
- [in] samr_GroupInfoEnum level,
- [out,ref,switch_is(level)] samr_GroupInfo **info
- );
-
- /************************/
- /* Function 0x15 */
- NTSTATUS samr_SetGroupInfo(
- [in,ref] policy_handle *group_handle,
- [in] samr_GroupInfoEnum level,
- [in,switch_is(level),ref] samr_GroupInfo *info
- );
-
- /************************/
- /* Function 0x16 */
- NTSTATUS samr_AddGroupMember(
- [in,ref] policy_handle *group_handle,
- [in] uint32 rid,
- [in] uint32 flags
- );
-
- /************************/
- /* Function 0x17 */
- NTSTATUS samr_DeleteDomainGroup(
- [in,out,ref] policy_handle *group_handle
- );
-
- /************************/
- /* Function 0x18 */
- NTSTATUS samr_DeleteGroupMember(
- [in,ref] policy_handle *group_handle,
- [in] uint32 rid
- );
-
-
- /************************/
- /* Function 0x19 */
- typedef struct {
- uint32 count;
- [size_is(count)] uint32 *rids;
- [size_is(count)] uint32 *types;
- } samr_RidTypeArray;
-
- NTSTATUS samr_QueryGroupMember(
- [in,ref] policy_handle *group_handle,
- [out,ref] samr_RidTypeArray **rids
- );
-
-
- /************************/
- /* Function 0x1a */
-
- /*
- win2003 seems to accept any data at all for the two integers
- below, and doesn't seem to do anything with them that I can
- see. Weird. I really expected the first integer to be a rid
- and the second to be the attributes for that rid member.
- */
- NTSTATUS samr_SetMemberAttributesOfGroup(
- [in,ref] policy_handle *group_handle,
- [in] uint32 unknown1,
- [in] uint32 unknown2
- );
-
-
- /************************/
- /* Function 0x1b */
- NTSTATUS samr_OpenAlias (
- [in,ref] policy_handle *domain_handle,
- [in] samr_AliasAccessMask access_mask,
- [in] uint32 rid,
- [out,ref] policy_handle *alias_handle
- );
-
-
- /************************/
- /* Function 0x1c */
-
- typedef struct {
- lsa_String name;
- uint32 num_members;
- lsa_String description;
- } samr_AliasInfoAll;
-
- typedef enum {
- ALIASINFOALL = 1,
- ALIASINFONAME = 2,
- ALIASINFODESCRIPTION = 3
- } samr_AliasInfoEnum;
-
- typedef [switch_type(samr_AliasInfoEnum)] union {
- [case(ALIASINFOALL)] samr_AliasInfoAll all;
- [case(ALIASINFONAME)] lsa_String name;
- [case(ALIASINFODESCRIPTION)] lsa_String description;
- } samr_AliasInfo;
-
- NTSTATUS samr_QueryAliasInfo(
- [in,ref] policy_handle *alias_handle,
- [in] samr_AliasInfoEnum level,
- [out,ref,switch_is(level)] samr_AliasInfo **info
- );
-
- /************************/
- /* Function 0x1d */
- NTSTATUS samr_SetAliasInfo(
- [in,ref] policy_handle *alias_handle,
- [in] samr_AliasInfoEnum level,
- [in,switch_is(level),ref] samr_AliasInfo *info
- );
-
- /************************/
- /* Function 0x1e */
- NTSTATUS samr_DeleteDomAlias(
- [in,out,ref] policy_handle *alias_handle
- );
-
- /************************/
- /* Function 0x1f */
- NTSTATUS samr_AddAliasMember(
- [in,ref] policy_handle *alias_handle,
- [in,ref] dom_sid2 *sid
- );
-
- /************************/
- /* Function 0x20 */
- NTSTATUS samr_DeleteAliasMember(
- [in,ref] policy_handle *alias_handle,
- [in,ref] dom_sid2 *sid
- );
-
- /************************/
- /* Function 0x21 */
- NTSTATUS samr_GetMembersInAlias(
- [in,ref] policy_handle *alias_handle,
- [out,ref] lsa_SidArray *sids
- );
-
- /************************/
- /* Function 0x22 */
- [public] NTSTATUS samr_OpenUser(
- [in,ref] policy_handle *domain_handle,
- [in] samr_UserAccessMask access_mask,
- [in] uint32 rid,
- [out,ref] policy_handle *user_handle
- );
-
- /************************/
- /* Function 0x23 */
- NTSTATUS samr_DeleteUser(
- [in,out,ref] policy_handle *user_handle
- );
-
- /************************/
- /* Function 0x24 */
- typedef struct {
- lsa_String account_name;
- lsa_String full_name;
- uint32 primary_gid;
- lsa_String description;
- lsa_String comment;
- } samr_UserInfo1;
-
- typedef struct {
- lsa_String comment;
- lsa_String unknown; /* settable, but doesn't stick. probably obsolete */
- uint16 country_code;
- uint16 code_page;
- } samr_UserInfo2;
-
- /* this is also used in samr and netlogon */
- typedef [public, flag(NDR_PAHEX)] struct {
- uint16 units_per_week;
- [size_is(1260), length_is(units_per_week/8)] uint8 *bits;
- } samr_LogonHours;
-
- typedef struct {
- lsa_String account_name;
- lsa_String full_name;
- uint32 rid;
- uint32 primary_gid;
- lsa_String home_directory;
- lsa_String home_drive;
- lsa_String logon_script;
- lsa_String profile_path;
- lsa_String workstations;
- NTTIME last_logon;
- NTTIME last_logoff;
- NTTIME last_password_change;
- NTTIME allow_password_change;
- NTTIME force_password_change;
- samr_LogonHours logon_hours;
- uint16 bad_password_count;
- uint16 logon_count;
- samr_AcctFlags acct_flags;
- } samr_UserInfo3;
-
- typedef struct {
- samr_LogonHours logon_hours;
- } samr_UserInfo4;
-
- typedef struct {
- lsa_String account_name;
- lsa_String full_name;
- uint32 rid;
- uint32 primary_gid;
- lsa_String home_directory;
- lsa_String home_drive;
- lsa_String logon_script;
- lsa_String profile_path;
- lsa_String description;
- lsa_String workstations;
- NTTIME last_logon;
- NTTIME last_logoff;
- samr_LogonHours logon_hours;
- uint16 bad_password_count;
- uint16 logon_count;
- NTTIME last_password_change;
- NTTIME acct_expiry;
- samr_AcctFlags acct_flags;
- } samr_UserInfo5;
-
- typedef struct {
- lsa_String account_name;
- lsa_String full_name;
- } samr_UserInfo6;
-
- typedef struct {
- lsa_String account_name;
- } samr_UserInfo7;
-
- typedef struct {
- lsa_String full_name;
- } samr_UserInfo8;
-
- typedef struct {
- uint32 primary_gid;
- } samr_UserInfo9;
-
- typedef struct {
- lsa_String home_directory;
- lsa_String home_drive;
- } samr_UserInfo10;
-
- typedef struct {
- lsa_String logon_script;
- } samr_UserInfo11;
-
- typedef struct {
- lsa_String profile_path;
- } samr_UserInfo12;
-
- typedef struct {
- lsa_String description;
- } samr_UserInfo13;
-
- typedef struct {
- lsa_String workstations;
- } samr_UserInfo14;
-
- typedef struct {
- samr_AcctFlags acct_flags;
- } samr_UserInfo16;
-
- typedef struct {
- NTTIME acct_expiry;
- } samr_UserInfo17;
-
- typedef [public, flag(NDR_PAHEX)] struct {
- uint8 hash[16];
- } samr_Password;
-
- typedef struct {
- samr_Password lm_pwd;
- samr_Password nt_pwd;
- boolean8 lm_pwd_active;
- boolean8 nt_pwd_active;
- } samr_UserInfo18;
-
- typedef struct {
- lsa_BinaryString parameters;
- } samr_UserInfo20;
-
- /* this defines the bits used for fields_present in info21 */
- typedef [bitmap32bit] bitmap {
- SAMR_FIELD_ACCOUNT_NAME = 0x00000001,
- SAMR_FIELD_FULL_NAME = 0x00000002,
- SAMR_FIELD_RID = 0x00000004,
- SAMR_FIELD_PRIMARY_GID = 0x00000008,
- SAMR_FIELD_DESCRIPTION = 0x00000010,
- SAMR_FIELD_COMMENT = 0x00000020,
- SAMR_FIELD_HOME_DIRECTORY = 0x00000040,
- SAMR_FIELD_HOME_DRIVE = 0x00000080,
- SAMR_FIELD_LOGON_SCRIPT = 0x00000100,
- SAMR_FIELD_PROFILE_PATH = 0x00000200,
- SAMR_FIELD_WORKSTATIONS = 0x00000400,
- SAMR_FIELD_LAST_LOGON = 0x00000800,
- SAMR_FIELD_LAST_LOGOFF = 0x00001000,
- SAMR_FIELD_LOGON_HOURS = 0x00002000,
- SAMR_FIELD_BAD_PWD_COUNT = 0x00004000,
- SAMR_FIELD_NUM_LOGONS = 0x00008000,
- SAMR_FIELD_ALLOW_PWD_CHANGE = 0x00010000,
- SAMR_FIELD_FORCE_PWD_CHANGE = 0x00020000,
- SAMR_FIELD_LAST_PWD_CHANGE = 0x00040000,
- SAMR_FIELD_ACCT_EXPIRY = 0x00080000,
- SAMR_FIELD_ACCT_FLAGS = 0x00100000,
- SAMR_FIELD_PARAMETERS = 0x00200000,
- SAMR_FIELD_COUNTRY_CODE = 0x00400000,
- SAMR_FIELD_CODE_PAGE = 0x00800000,
- SAMR_FIELD_PASSWORD = 0x01000000, /* either of these */
- SAMR_FIELD_PASSWORD2 = 0x02000000, /* two bits seems to work */
- SAMR_FIELD_PRIVATE_DATA = 0x04000000,
- SAMR_FIELD_EXPIRED_FLAG = 0x08000000,
- SAMR_FIELD_SEC_DESC = 0x10000000,
- SAMR_FIELD_OWF_PWD = 0x20000000
- } samr_FieldsPresent;
-
- /* used for 'password_expired' in samr_UserInfo21 */
- const int PASS_MUST_CHANGE_AT_NEXT_LOGON = 0x01;
- const int PASS_DONT_CHANGE_AT_NEXT_LOGON = 0x00;
-
- typedef struct {
- NTTIME last_logon;
- NTTIME last_logoff;
- NTTIME last_password_change;
- NTTIME acct_expiry;
- NTTIME allow_password_change;
- NTTIME force_password_change;
- lsa_String account_name;
- lsa_String full_name;
- lsa_String home_directory;
- lsa_String home_drive;
- lsa_String logon_script;
- lsa_String profile_path;
- lsa_String description;
- lsa_String workstations;
- lsa_String comment;
- lsa_BinaryString parameters;
- lsa_String unknown1;
- lsa_String unknown2;
- lsa_String unknown3;
- uint32 buf_count;
- [size_is(buf_count)] uint8 *buffer;
- uint32 rid;
- uint32 primary_gid;
- samr_AcctFlags acct_flags;
- samr_FieldsPresent fields_present;
- samr_LogonHours logon_hours;
- uint16 bad_password_count;
- uint16 logon_count;
- uint16 country_code;
- uint16 code_page;
- uint8 nt_password_set;
- uint8 lm_password_set;
- uint8 password_expired;
- uint8 unknown4;
- } samr_UserInfo21;
-
- typedef [public, flag(NDR_PAHEX)] struct {
- uint8 data[516];
- } samr_CryptPassword;
-
- typedef struct {
- samr_UserInfo21 info;
- samr_CryptPassword password;
- } samr_UserInfo23;
-
- typedef struct {
- samr_CryptPassword password;
- uint8 pw_len;
- } samr_UserInfo24;
-
- typedef [flag(NDR_PAHEX)] struct {
- uint8 data[532];
- } samr_CryptPasswordEx;
-
- typedef struct {
- samr_UserInfo21 info;
- samr_CryptPasswordEx password;
- } samr_UserInfo25;
-
- typedef struct {
- samr_CryptPasswordEx password;
- uint8 pw_len;
- } samr_UserInfo26;
-
- typedef [switch_type(uint16)] union {
- [case(1)] samr_UserInfo1 info1;
- [case(2)] samr_UserInfo2 info2;
- [case(3)] samr_UserInfo3 info3;
- [case(4)] samr_UserInfo4 info4;
- [case(5)] samr_UserInfo5 info5;
- [case(6)] samr_UserInfo6 info6;
- [case(7)] samr_UserInfo7 info7;
- [case(8)] samr_UserInfo8 info8;
- [case(9)] samr_UserInfo9 info9;
- [case(10)] samr_UserInfo10 info10;
- [case(11)] samr_UserInfo11 info11;
- [case(12)] samr_UserInfo12 info12;
- [case(13)] samr_UserInfo13 info13;
- [case(14)] samr_UserInfo14 info14;
- [case(16)] samr_UserInfo16 info16;
- [case(17)] samr_UserInfo17 info17;
- [case(18)] samr_UserInfo18 info18;
- [case(20)] samr_UserInfo20 info20;
- [case(21)] samr_UserInfo21 info21;
- [case(23)] samr_UserInfo23 info23;
- [case(24)] samr_UserInfo24 info24;
- [case(25)] samr_UserInfo25 info25;
- [case(26)] samr_UserInfo26 info26;
- } samr_UserInfo;
-
- [public] NTSTATUS samr_QueryUserInfo(
- [in,ref] policy_handle *user_handle,
- [in] uint16 level,
- [out,ref,switch_is(level)] samr_UserInfo **info
- );
-
-
- /************************/
- /* Function 0x25 */
- [public] NTSTATUS samr_SetUserInfo(
- [in,ref] policy_handle *user_handle,
- [in] uint16 level,
- [in,ref,switch_is(level)] samr_UserInfo *info
- );
-
- /************************/
- /* Function 0x26 */
- /*
- this is a password change interface that doesn't give
- the server the plaintext password. Depricated.
- */
- NTSTATUS samr_ChangePasswordUser(
- [in,ref] policy_handle *user_handle,
- [in] boolean8 lm_present,
- [in,unique] samr_Password *old_lm_crypted,
- [in,unique] samr_Password *new_lm_crypted,
- [in] boolean8 nt_present,
- [in,unique] samr_Password *old_nt_crypted,
- [in,unique] samr_Password *new_nt_crypted,
- [in] boolean8 cross1_present,
- [in,unique] samr_Password *nt_cross,
- [in] boolean8 cross2_present,
- [in,unique] samr_Password *lm_cross
- );
-
- /************************/
- /* Function 0x27 */
-
- typedef [public] struct {
- uint32 rid;
- samr_GroupAttrs attributes;
- } samr_RidWithAttribute;
-
- typedef [public] struct {
- uint32 count;
- [size_is(count)] samr_RidWithAttribute *rids;
- } samr_RidWithAttributeArray;
-
- NTSTATUS samr_GetGroupsForUser(
- [in,ref] policy_handle *user_handle,
- [out,ref] samr_RidWithAttributeArray **rids
- );
-
- /************************/
- /* Function 0x28 */
-
- typedef struct {
- uint32 idx;
- uint32 rid;
- samr_AcctFlags acct_flags;
- lsa_String account_name;
- lsa_String description;
- lsa_String full_name;
- } samr_DispEntryGeneral;
-
- typedef struct {
- uint32 count;
- [size_is(count)] samr_DispEntryGeneral *entries;
- } samr_DispInfoGeneral;
-
- typedef struct {
- uint32 idx;
- uint32 rid;
- samr_AcctFlags acct_flags;
- lsa_String account_name;
- lsa_String description;
- } samr_DispEntryFull;
-
- typedef struct {
- uint32 count;
- [size_is(count)] samr_DispEntryFull *entries;
- } samr_DispInfoFull;
-
- typedef struct {
- uint32 idx;
- uint32 rid;
- samr_GroupAttrs acct_flags;
- lsa_String account_name;
- lsa_String description;
- } samr_DispEntryFullGroup;
-
- typedef struct {
- uint32 count;
- [size_is(count)] samr_DispEntryFullGroup *entries;
- } samr_DispInfoFullGroups;
-
- typedef struct {
- uint32 idx;
- lsa_AsciiStringLarge account_name;
- } samr_DispEntryAscii;
-
- typedef struct {
- uint32 count;
- [size_is(count)] samr_DispEntryAscii *entries;
- } samr_DispInfoAscii;
-
- typedef [switch_type(uint16)] union {
- [case(1)] samr_DispInfoGeneral info1;/* users */
- [case(2)] samr_DispInfoFull info2; /* trust accounts? */
- [case(3)] samr_DispInfoFullGroups info3; /* groups */
- [case(4)] samr_DispInfoAscii info4; /* users */
- [case(5)] samr_DispInfoAscii info5; /* groups */
- } samr_DispInfo;
-
- NTSTATUS samr_QueryDisplayInfo(
- [in,ref] policy_handle *domain_handle,
- [in] uint16 level,
- [in] uint32 start_idx,
- [in] uint32 max_entries,
- [in] uint32 buf_size,
- [out,ref] uint32 *total_size,
- [out,ref] uint32 *returned_size,
- [out,ref,switch_is(level)] samr_DispInfo *info
- );
-
-
- /************************/
- /* Function 0x29 */
-
- /*
- this seems to be an alphabetic search function. The returned index
- is the index for samr_QueryDisplayInfo needed to get names occurring
- after the specified name. The supplied name does not need to exist
- in the database (for example you can supply just a first letter for
- searching starting at that letter)
-
- The level corresponds to the samr_QueryDisplayInfo level
- */
- NTSTATUS samr_GetDisplayEnumerationIndex(
- [in,ref] policy_handle *domain_handle,
- [in] uint16 level,
- [in,ref] lsa_String *name,
- [out,ref] uint32 *idx
- );
-
-
-
- /************************/
- /* Function 0x2a */
-
- /*
- w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this
- */
- NTSTATUS samr_TestPrivateFunctionsDomain(
- [in,ref] policy_handle *domain_handle
- );
-
-
- /************************/
- /* Function 0x2b */
-
- /*
- w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this
- */
- NTSTATUS samr_TestPrivateFunctionsUser(
- [in,ref] policy_handle *user_handle
- );
-
-
- /************************/
- /* Function 0x2c */
-
- typedef struct {
- uint16 min_password_length;
- samr_PasswordProperties password_properties;
- } samr_PwInfo;
-
- [public] NTSTATUS samr_GetUserPwInfo(
- [in,ref] policy_handle *user_handle,
- [out,ref] samr_PwInfo *info
- );
-
- /************************/
- /* Function 0x2d */
- NTSTATUS samr_RemoveMemberFromForeignDomain(
- [in,ref] policy_handle *domain_handle,
- [in,ref] dom_sid2 *sid
- );
-
- /************************/
- /* Function 0x2e */
-
- /*
- how is this different from QueryDomainInfo ??
- */
- NTSTATUS samr_QueryDomainInfo2(
- [in,ref] policy_handle *domain_handle,
- [in] uint16 level,
- [out,ref,switch_is(level)] samr_DomainInfo **info
- );
-
- /************************/
- /* Function 0x2f */
-
- /*
- how is this different from QueryUserInfo ??
- */
- NTSTATUS samr_QueryUserInfo2(
- [in,ref] policy_handle *user_handle,
- [in] uint16 level,
- [out,ref,switch_is(level)] samr_UserInfo **info
- );
-
- /************************/
- /* Function 0x30 */
-
- /*
- how is this different from QueryDisplayInfo??
- */
- NTSTATUS samr_QueryDisplayInfo2(
- [in,ref] policy_handle *domain_handle,
- [in] uint16 level,
- [in] uint32 start_idx,
- [in] uint32 max_entries,
- [in] uint32 buf_size,
- [out,ref] uint32 *total_size,
- [out,ref] uint32 *returned_size,
- [out,ref,switch_is(level)] samr_DispInfo *info
- );
-
- /************************/
- /* Function 0x31 */
-
- /*
- how is this different from GetDisplayEnumerationIndex ??
- */
- NTSTATUS samr_GetDisplayEnumerationIndex2(
- [in,ref] policy_handle *domain_handle,
- [in] uint16 level,
- [in,ref] lsa_String *name,
- [out,ref] uint32 *idx
- );
-
-
- /************************/
- /* Function 0x32 */
- NTSTATUS samr_CreateUser2(
- [in,ref] policy_handle *domain_handle,
- [in,ref] lsa_String *account_name,
- [in] samr_AcctFlags acct_flags,
- [in] samr_UserAccessMask access_mask,
- [out,ref] policy_handle *user_handle,
- [out,ref] uint32 *access_granted,
- [out,ref] uint32 *rid
- );
-
-
- /************************/
- /* Function 0x33 */
-
- /*
- another duplicate. There must be a reason ....
- */
- NTSTATUS samr_QueryDisplayInfo3(
- [in,ref] policy_handle *domain_handle,
- [in] uint16 level,
- [in] uint32 start_idx,
- [in] uint32 max_entries,
- [in] uint32 buf_size,
- [out,ref] uint32 *total_size,
- [out,ref] uint32 *returned_size,
- [out,ref,switch_is(level)] samr_DispInfo *info
- );
-
- /************************/
- /* Function 0x34 */
- NTSTATUS samr_AddMultipleMembersToAlias(
- [in,ref] policy_handle *alias_handle,
- [in,ref] lsa_SidArray *sids
- );
-
- /************************/
- /* Function 0x35 */
- NTSTATUS samr_RemoveMultipleMembersFromAlias(
- [in,ref] policy_handle *alias_handle,
- [in,ref] lsa_SidArray *sids
- );
-
- /************************/
- /* Function 0x36 */
-
- NTSTATUS samr_OemChangePasswordUser2(
- [in,unique] lsa_AsciiString *server,
- [in,ref] lsa_AsciiString *account,
- [in,unique] samr_CryptPassword *password,
- [in,unique] samr_Password *hash
- );
-
- /************************/
- /* Function 0x37 */
- NTSTATUS samr_ChangePasswordUser2(
- [in,unique] lsa_String *server,
- [in,ref] lsa_String *account,
- [in,unique] samr_CryptPassword *nt_password,
- [in,unique] samr_Password *nt_verifier,
- [in] boolean8 lm_change,
- [in,unique] samr_CryptPassword *lm_password,
- [in,unique] samr_Password *lm_verifier
- );
-
- /************************/
- /* Function 0x38 */
- NTSTATUS samr_GetDomPwInfo(
- [in,unique] lsa_String *domain_name,
- [out,ref] samr_PwInfo *info
- );
-
- /************************/
- /* Function 0x39 */
- NTSTATUS samr_Connect2(
- [in,unique,string,charset(UTF16)] uint16 *system_name,
- [in] samr_ConnectAccessMask access_mask,
- [out,ref] policy_handle *connect_handle
- );
-
- /************************/
- /* Function 0x3a */
- /*
- seems to be an exact alias for samr_SetUserInfo()
- */
- [public] NTSTATUS samr_SetUserInfo2(
- [in,ref] policy_handle *user_handle,
- [in] uint16 level,
- [in,ref,switch_is(level)] samr_UserInfo *info
- );
-
- /************************/
- /* Function 0x3b */
- /*
- this one is mysterious. I have a few guesses, but nothing working yet
- */
- NTSTATUS samr_SetBootKeyInformation(
- [in,ref] policy_handle *connect_handle,
- [in] uint32 unknown1,
- [in] uint32 unknown2,
- [in] uint32 unknown3
- );
-
- /************************/
- /* Function 0x3c */
- NTSTATUS samr_GetBootKeyInformation(
- [in,ref] policy_handle *domain_handle,
- [out,ref] uint32 *unknown
- );
-
- /************************/
- /* Function 0x3d */
- NTSTATUS samr_Connect3(
- [in,unique,string,charset(UTF16)] uint16 *system_name,
- /* this unknown value seems to be completely ignored by w2k3 */
- [in] uint32 unknown,
- [in] samr_ConnectAccessMask access_mask,
- [out,ref] policy_handle *connect_handle
- );
-
- /************************/
- /* Function 0x3e */
-
- typedef enum {
- SAMR_CONNECT_PRE_W2K = 1,
- SAMR_CONNECT_W2K = 2,
- SAMR_CONNECT_AFTER_W2K = 3
- } samr_ConnectVersion;
-
- NTSTATUS samr_Connect4(
- [in,unique,string,charset(UTF16)] uint16 *system_name,
- [in] samr_ConnectVersion client_version,
- [in] samr_ConnectAccessMask access_mask,
- [out,ref] policy_handle *connect_handle
- );
-
- /************************/
- /* Function 0x3f */
-
- typedef enum samr_RejectReason samr_RejectReason;
-
- typedef struct {
- samr_RejectReason reason;
- uint32 unknown1;
- uint32 unknown2;
- } samr_ChangeReject;
-
- NTSTATUS samr_ChangePasswordUser3(
- [in,unique] lsa_String *server,
- [in,ref] lsa_String *account,
- [in,unique] samr_CryptPassword *nt_password,
- [in,unique] samr_Password *nt_verifier,
- [in] boolean8 lm_change,
- [in,unique] samr_CryptPassword *lm_password,
- [in,unique] samr_Password *lm_verifier,
- [in,unique] samr_CryptPassword *password3,
- [out,ref] samr_DomInfo1 **dominfo,
- [out,ref] samr_ChangeReject **reject
- );
-
- /************************/
- /* Function 0x40 */
-
- typedef struct {
- samr_ConnectVersion client_version; /* w2k3 gives 3 */
- uint32 unknown2; /* w2k3 gives 0 */
- } samr_ConnectInfo1;
-
- typedef union {
- [case(1)] samr_ConnectInfo1 info1;
- } samr_ConnectInfo;
-
- [public] NTSTATUS samr_Connect5(
- [in,unique,string,charset(UTF16)] uint16 *system_name,
- [in] samr_ConnectAccessMask access_mask,
- [in] uint32 level_in,
- [in,ref,switch_is(level_in)] samr_ConnectInfo *info_in,
- [out,ref] uint32 *level_out,
- [out,ref,switch_is(*level_out)] samr_ConnectInfo *info_out,
- [out,ref] policy_handle *connect_handle
- );
-
- /************************/
- /* Function 0x41 */
- NTSTATUS samr_RidToSid(
- [in,ref] policy_handle *domain_handle,
- [in] uint32 rid,
- [out,ref] dom_sid2 *sid
- );
-
-
- /************************/
- /* Function 0x42 */
-
- /*
- this should set the DSRM password for the server, which is used
- when booting into Directory Services Recovery Mode on a DC. Win2003
- gives me NT_STATUS_NOT_SUPPORTED
- */
-
- NTSTATUS samr_SetDsrmPassword(
- [in,unique] lsa_String *name,
- [in] uint32 unknown,
- [in,unique] samr_Password *hash
- );
-
-
- /************************/
- /* Function 0x43 */
- /************************/
- typedef [bitmap32bit] bitmap {
- SAMR_VALIDATE_FIELD_PASSWORD_LAST_SET = 0x00000001,
- SAMR_VALIDATE_FIELD_BAD_PASSWORD_TIME = 0x00000002,
- SAMR_VALIDATE_FIELD_LOCKOUT_TIME = 0x00000004,
- SAMR_VALIDATE_FIELD_BAD_PASSWORD_COUNT = 0x00000008,
- SAMR_VALIDATE_FIELD_PASSWORD_HISTORY_LENGTH = 0x00000010,
- SAMR_VALIDATE_FIELD_PASSWORD_HISTORY = 0x00000020
- } samr_ValidateFieldsPresent;
-
- typedef enum {
- NetValidateAuthentication = 1,
- NetValidatePasswordChange= 2,
- NetValidatePasswordReset = 3
- } samr_ValidatePasswordLevel;
-
- /* NetApi maps samr_ValidationStatus errors to WERRORs. Haven't
- * identified the mapping of
- * - NERR_PasswordFilterError
- * - NERR_PasswordExpired and
- * - NERR_PasswordCantChange
- * yet - Guenther
- */
-
- typedef enum {
- SAMR_VALIDATION_STATUS_SUCCESS = 0,
- SAMR_VALIDATION_STATUS_PASSWORD_MUST_CHANGE = 1,
- SAMR_VALIDATION_STATUS_ACCOUNT_LOCKED_OUT = 2,
- SAMR_VALIDATION_STATUS_BAD_PASSWORD = 4,
- SAMR_VALIDATION_STATUS_PWD_HISTORY_CONFLICT = 5,
- SAMR_VALIDATION_STATUS_PWD_TOO_SHORT = 6,
- SAMR_VALIDATION_STATUS_PWD_TOO_LONG = 7,
- SAMR_VALIDATION_STATUS_NOT_COMPLEX_ENOUGH = 8,
- SAMR_VALIDATION_STATUS_PASSWORD_TOO_RECENT = 9
- } samr_ValidationStatus;
-
- typedef struct {
- uint32 length;
- [size_is(length)] uint8 *data;
- } samr_ValidationBlob;
-
- typedef struct {
- samr_ValidateFieldsPresent fields_present;
- NTTIME_hyper last_password_change;
- NTTIME_hyper bad_password_time;
- NTTIME_hyper lockout_time;
- uint32 bad_pwd_count;
- uint32 pwd_history_len;
- [size_is(pwd_history_len)] samr_ValidationBlob *pwd_history;
- } samr_ValidatePasswordInfo;
-
- typedef struct {
- samr_ValidatePasswordInfo info;
- samr_ValidationStatus status;
- } samr_ValidatePasswordRepCtr;
-
- typedef [switch_type(uint16)] union {
- [case(1)] samr_ValidatePasswordRepCtr ctr1;
- [case(2)] samr_ValidatePasswordRepCtr ctr2;
- [case(3)] samr_ValidatePasswordRepCtr ctr3;
- } samr_ValidatePasswordRep;
-
- typedef struct {
- samr_ValidatePasswordInfo info;
- lsa_StringLarge password;
- lsa_StringLarge account;
- samr_ValidationBlob hash;
- boolean8 pwd_must_change_at_next_logon;
- boolean8 clear_lockout;
- } samr_ValidatePasswordReq3;
-
- typedef struct {
- samr_ValidatePasswordInfo info;
- lsa_StringLarge password;
- lsa_StringLarge account;
- samr_ValidationBlob hash;
- boolean8 password_matched;
- } samr_ValidatePasswordReq2;
-
- typedef struct {
- samr_ValidatePasswordInfo info;
- boolean8 password_matched;
- } samr_ValidatePasswordReq1;
-
- typedef [switch_type(uint16)] union {
- [case(1)] samr_ValidatePasswordReq1 req1;
- [case(2)] samr_ValidatePasswordReq2 req2;
- [case(3)] samr_ValidatePasswordReq3 req3;
- } samr_ValidatePasswordReq;
-
- NTSTATUS samr_ValidatePassword(
- [in] samr_ValidatePasswordLevel level,
- [in,switch_is(level)] samr_ValidatePasswordReq *req,
- [out,ref,switch_is(level)] samr_ValidatePasswordRep **rep
- );
-}
diff --git a/source3/librpc/ndr/ndr_sec.h b/source3/librpc/ndr/ndr_sec.h
deleted file mode 100644
index 8034367223..0000000000
--- a/source3/librpc/ndr/ndr_sec.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef __LIBRPC_NDR_NDR_SEC_H__
-#define __LIBRPC_NDR_NDR_SEC_H__
-
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
-/* This file was automatically generated by mkproto.pl. DO NOT EDIT */
-
-#ifndef _PUBLIC_
-#define _PUBLIC_
-#endif
-
-
-/* The following definitions come from librpc/ndr/ndr_sec_helper.c */
-
-size_t ndr_size_dom_sid(const struct dom_sid *sid);
-size_t ndr_length_dom_sid(const struct dom_sid *sid);
-size_t ndr_size_security_ace(const struct security_ace *ace);
-size_t ndr_size_security_acl(const struct security_acl *acl);
-size_t ndr_size_security_descriptor(const struct security_descriptor *sd);
-void ndr_print_dom_sid(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
-void ndr_print_dom_sid2(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
-void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid);
-char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
-
-/* The following definitions come from librpc/ndr/ndr_sec.c */
-
-enum ndr_err_code ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
-enum ndr_err_code ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
-enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid);
-enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid);
-#undef _PRINTF_ATTRIBUTE
-#define _PRINTF_ATTRIBUTE(a1, a2)
-
-#endif /* __LIBRPC_NDR_NDR_SEC_H__ */
-
diff --git a/source3/librpc/ndr/ndr_sec_helper.c b/source3/librpc/ndr/ndr_sec_helper.c
deleted file mode 100644
index 18d343799e..0000000000
--- a/source3/librpc/ndr/ndr_sec_helper.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- fast routines for getting the wire size of security objects
-
- Copyright (C) Andrew Tridgell 2003
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include "includes.h"
-
-/*
- return the wire size of a dom_sid
-*/
-size_t ndr_size_dom_sid(const struct dom_sid *sid, int flags)
-{
- if (!sid) return 0;
- return 8 + 4*sid->num_auths;
-}
-
-size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags)
-{
- struct dom_sid zero_sid;
-
- if (!sid) return 0;
-
- ZERO_STRUCT(zero_sid);
-
- if (memcmp(&zero_sid, sid, sizeof(zero_sid)) == 0) {
- return 0;
- }
-
- return 8 + 4*sid->num_auths;
-}
-
-size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags)
-{
- return ndr_size_dom_sid28(sid, flags);
-}
-
-/*
- return the wire size of a security_ace
-*/
-size_t ndr_size_security_ace(const struct security_ace *ace, int flags)
-{
- if (!ace) return 0;
- return 8 + ndr_size_dom_sid(&ace->trustee, flags);
-}
-
-
-/*
- return the wire size of a security_acl
-*/
-size_t ndr_size_security_acl(const struct security_acl *acl, int flags)
-{
- size_t ret;
- int i;
- if (!acl) return 0;
- ret = 8;
- for (i=0;i<acl->num_aces;i++) {
- ret += ndr_size_security_ace(&acl->aces[i], flags);
- }
- return ret;
-}
-
-/*
- return the wire size of a security descriptor
-*/
-size_t ndr_size_security_descriptor(const struct security_descriptor *sd, int flags)
-{
- size_t ret;
- if (!sd) return 0;
-
- ret = 20;
- ret += ndr_size_dom_sid(sd->owner_sid, flags);
- ret += ndr_size_dom_sid(sd->group_sid, flags);
- ret += ndr_size_security_acl(sd->dacl, flags);
- ret += ndr_size_security_acl(sd->sacl, flags);
- return ret;
-}
-
-/*
- print a dom_sid
-*/
-void ndr_print_dom_sid(struct ndr_print *ndr, const char *name, const struct dom_sid *sid)
-{
- ndr->print(ndr, "%-25s: %s", name, dom_sid_string(ndr, sid));
-}
-
-void ndr_print_dom_sid2(struct ndr_print *ndr, const char *name, const struct dom_sid *sid)
-{
- ndr_print_dom_sid(ndr, name, sid);
-}
-
-void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid)
-{
- ndr_print_dom_sid(ndr, name, sid);
-}
-
-void ndr_print_dom_sid0(struct ndr_print *ndr, const char *name, const struct dom_sid *sid)
-{
- ndr_print_dom_sid(ndr, name, sid);
-}
-
diff --git a/source3/librpc/ndr/sid.c b/source3/librpc/ndr/sid.c
index ed27375de1..39b7e3cd59 100644
--- a/source3/librpc/ndr/sid.c
+++ b/source3/librpc/ndr/sid.c
@@ -21,6 +21,35 @@
#include "includes.h"
+/*
+ return the wire size of a dom_sid
+*/
+size_t ndr_size_dom_sid(const struct dom_sid *sid, int flags)
+{
+ if (!sid) return 0;
+ return 8 + 4*sid->num_auths;
+}
+
+size_t ndr_size_dom_sid28(const struct dom_sid *sid, int flags)
+{
+ struct dom_sid zero_sid;
+
+ if (!sid) return 0;
+
+ ZERO_STRUCT(zero_sid);
+
+ if (memcmp(&zero_sid, sid, sizeof(zero_sid)) == 0) {
+ return 0;
+ }
+
+ return 8 + 4*sid->num_auths;
+}
+
+size_t ndr_size_dom_sid0(const struct dom_sid *sid, int flags)
+{
+ return ndr_size_dom_sid28(sid, flags);
+}
+
enum ndr_err_code ndr_push_dom_sid(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *r)
{
uint32_t cntr_sub_auths_0;
@@ -228,3 +257,27 @@ enum ndr_err_code ndr_push_dom_sid0(struct ndr_push *ndr, int ndr_flags, const s
return ndr_push_dom_sid(ndr, ndr_flags, sid);
}
+
+/*
+ print a dom_sid
+*/
+void ndr_print_dom_sid(struct ndr_print *ndr, const char *name, const struct dom_sid *sid)
+{
+ ndr->print(ndr, "%-25s: %s", name, dom_sid_string(ndr, sid));
+}
+
+void ndr_print_dom_sid2(struct ndr_print *ndr, const char *name, const struct dom_sid *sid)
+{
+ ndr_print_dom_sid(ndr, name, sid);
+}
+
+void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct dom_sid *sid)
+{
+ ndr_print_dom_sid(ndr, name, sid);
+}
+
+void ndr_print_dom_sid0(struct ndr_print *ndr, const char *name, const struct dom_sid *sid)
+{
+ ndr_print_dom_sid(ndr, name, sid);
+}
+