summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librpc/gen_ndr/cli_svcctl.c134
-rw-r--r--librpc/gen_ndr/cli_svcctl.h64
-rw-r--r--librpc/gen_ndr/ndr_svcctl.c506
-rw-r--r--librpc/gen_ndr/srv_svcctl.c140
-rw-r--r--librpc/gen_ndr/svcctl.h64
-rw-r--r--librpc/idl/svcctl.idl70
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c28
-rw-r--r--source4/torture/rpc/svcctl.c44
8 files changed, 525 insertions, 525 deletions
diff --git a/librpc/gen_ndr/cli_svcctl.c b/librpc/gen_ndr/cli_svcctl.c
index 4c013f52b3..bc49121ed9 100644
--- a/librpc/gen_ndr/cli_svcctl.c
+++ b/librpc/gen_ndr/cli_svcctl.c
@@ -648,9 +648,9 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *service /* [in] [ref] */,
uint32_t state /* [in] */,
- uint8_t *service_status /* [out] [ref,size_is(buf_size)] */,
- uint32_t buf_size /* [in] [range(0,0x40000)] */,
- uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */,
+ uint8_t *service_status /* [out] [ref,size_is(offered)] */,
+ uint32_t offered /* [in] [range(0,0x40000)] */,
+ uint32_t *needed /* [out] [ref,range(0,0x40000)] */,
uint32_t *services_returned /* [out] [ref,range(0,0x40000)] */,
WERROR *werror)
{
@@ -660,7 +660,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli,
/* In parameters */
r.in.service = service;
r.in.state = state;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &r);
@@ -685,8 +685,8 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli,
}
/* Return variables */
- memcpy(service_status, r.out.service_status, r.in.buf_size * sizeof(*service_status));
- *bytes_needed = *r.out.bytes_needed;
+ memcpy(service_status, r.out.service_status, r.in.offered * sizeof(*service_status));
+ *needed = *r.out.needed;
*services_returned = *r.out.services_returned;
/* Return result */
@@ -702,9 +702,9 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
uint32_t type /* [in] */,
enum svcctl_ServiceState state /* [in] */,
- uint8_t *service /* [out] [ref,size_is(buf_size)] */,
- uint32_t buf_size /* [in] [range(0,0x40000)] */,
- uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */,
+ uint8_t *service /* [out] [ref,size_is(offered)] */,
+ uint32_t offered /* [in] [range(0,0x40000)] */,
+ uint32_t *needed /* [out] [ref,range(0,0x40000)] */,
uint32_t *services_returned /* [out] [ref,range(0,0x40000)] */,
uint32_t *resume_handle /* [in,out] [unique] */,
WERROR *werror)
@@ -716,7 +716,7 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli,
r.in.handle = handle;
r.in.type = type;
r.in.state = state;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
r.in.resume_handle = resume_handle;
if (DEBUGLEVEL >= 10) {
@@ -742,8 +742,8 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli,
}
/* Return variables */
- memcpy(service, r.out.service, r.in.buf_size * sizeof(*service));
- *bytes_needed = *r.out.bytes_needed;
+ memcpy(service, r.out.service, r.in.offered * sizeof(*service));
+ *needed = *r.out.needed;
*services_returned = *r.out.services_returned;
if (resume_handle && r.out.resume_handle) {
*resume_handle = *r.out.resume_handle;
@@ -859,8 +859,8 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
struct QUERY_SERVICE_CONFIG *query /* [out] [ref] */,
- uint32_t buf_size /* [in] [range(0,8192)] */,
- uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */,
+ uint32_t offered /* [in] [range(0,8192)] */,
+ uint32_t *needed /* [out] [ref,range(0,8192)] */,
WERROR *werror)
{
struct svcctl_QueryServiceConfigW r;
@@ -868,7 +868,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli,
/* In parameters */
r.in.handle = handle;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, &r);
@@ -894,7 +894,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli,
/* Return variables */
*query = *r.out.query;
- *bytes_needed = *r.out.bytes_needed;
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
@@ -907,9 +907,9 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli,
NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
- uint32_t buf_size /* [in] */,
+ uint32_t offered /* [in] */,
struct SERVICE_LOCK_STATUS *lock_status /* [out] [ref] */,
- uint32_t *required_buf_size /* [out] [ref] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror)
{
struct svcctl_QueryServiceLockStatusW r;
@@ -917,7 +917,7 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli,
/* In parameters */
r.in.handle = handle;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &r);
@@ -943,7 +943,7 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli,
/* Return variables */
*lock_status = *r.out.lock_status;
- *required_buf_size = *r.out.required_buf_size;
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
@@ -1290,8 +1290,8 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli,
struct policy_handle *service /* [in] [ref] */,
uint32_t state /* [in] */,
struct ENUM_SERVICE_STATUSA *service_status /* [out] [unique] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint32_t offered /* [in] */,
+ uint32_t *needed /* [out] [ref] */,
uint32_t *services_returned /* [out] [ref] */,
WERROR *werror)
{
@@ -1301,7 +1301,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli,
/* In parameters */
r.in.service = service;
r.in.state = state;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &r);
@@ -1329,7 +1329,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli,
if (service_status && r.out.service_status) {
*service_status = *r.out.service_status;
}
- *bytes_needed = *r.out.bytes_needed;
+ *needed = *r.out.needed;
*services_returned = *r.out.services_returned;
/* Return result */
@@ -1345,9 +1345,9 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
uint32_t type /* [in] */,
enum svcctl_ServiceState state /* [in] */,
- uint32_t buf_size /* [in] */,
- uint8_t *service /* [out] [size_is(buf_size)] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint32_t offered /* [in] */,
+ uint8_t *service /* [out] [size_is(offered)] */,
+ uint32_t *needed /* [out] [ref] */,
uint32_t *services_returned /* [out] [ref] */,
uint32_t *resume_handle /* [in,out] [unique] */,
WERROR *werror)
@@ -1359,7 +1359,7 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli,
r.in.handle = handle;
r.in.type = type;
r.in.state = state;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
r.in.resume_handle = resume_handle;
if (DEBUGLEVEL >= 10) {
@@ -1385,8 +1385,8 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli,
}
/* Return variables */
- memcpy(service, r.out.service, r.in.buf_size * sizeof(*service));
- *bytes_needed = *r.out.bytes_needed;
+ memcpy(service, r.out.service, r.in.offered * sizeof(*service));
+ *needed = *r.out.needed;
*services_returned = *r.out.services_returned;
if (resume_handle && r.out.resume_handle) {
*resume_handle = *r.out.resume_handle;
@@ -1500,8 +1500,8 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint8_t *query /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint32_t offered /* [in] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror)
{
struct svcctl_QueryServiceConfigA r;
@@ -1509,7 +1509,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli,
/* In parameters */
r.in.handle = handle;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, &r);
@@ -1534,8 +1534,8 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli,
}
/* Return variables */
- memcpy(query, r.out.query, r.in.buf_size * sizeof(*query));
- *bytes_needed = *r.out.bytes_needed;
+ memcpy(query, r.out.query, r.in.offered * sizeof(*query));
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
@@ -1548,9 +1548,9 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli,
NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
- uint32_t buf_size /* [in] */,
+ uint32_t offered /* [in] */,
struct SERVICE_LOCK_STATUS *lock_status /* [out] [ref] */,
- uint32_t *required_buf_size /* [out] [ref] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror)
{
struct svcctl_QueryServiceLockStatusA r;
@@ -1558,7 +1558,7 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli,
/* In parameters */
r.in.handle = handle;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &r);
@@ -1584,7 +1584,7 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli,
/* Return variables */
*lock_status = *r.out.lock_status;
- *required_buf_size = *r.out.required_buf_size;
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
@@ -1926,8 +1926,8 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
enum svcctl_ConfigLevel info_level /* [in] */,
uint8_t *buffer /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint32_t offered /* [in] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror)
{
struct svcctl_QueryServiceConfig2A r;
@@ -1936,7 +1936,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli,
/* In parameters */
r.in.handle = handle;
r.in.info_level = info_level;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, &r);
@@ -1961,8 +1961,8 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli,
}
/* Return variables */
- memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
- *bytes_needed = *r.out.bytes_needed;
+ memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
@@ -1976,9 +1976,9 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
enum svcctl_ConfigLevel info_level /* [in] */,
- 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)] */,
+ uint8_t *buffer /* [out] [ref,size_is(offered)] */,
+ uint32_t offered /* [in] [range(0,8192)] */,
+ uint32_t *needed /* [out] [ref,range(0,8192)] */,
WERROR *werror)
{
struct svcctl_QueryServiceConfig2W r;
@@ -1987,7 +1987,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
/* In parameters */
r.in.handle = handle;
r.in.info_level = info_level;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, &r);
@@ -2012,8 +2012,8 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
}
/* Return variables */
- memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
- *bytes_needed = *r.out.bytes_needed;
+ memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
@@ -2027,9 +2027,9 @@ NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
enum svcctl_StatusLevel info_level /* [in] */,
- 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)] */,
+ uint8_t *buffer /* [out] [ref,size_is(offered)] */,
+ uint32_t offered /* [in] [range(0,8192)] */,
+ uint32_t *needed /* [out] [ref,range(0,8192)] */,
WERROR *werror)
{
struct svcctl_QueryServiceStatusEx r;
@@ -2038,7 +2038,7 @@ NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli,
/* In parameters */
r.in.handle = handle;
r.in.info_level = info_level;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, &r);
@@ -2063,8 +2063,8 @@ NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli,
}
/* Return variables */
- memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
- *bytes_needed = *r.out.bytes_needed;
+ memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
+ *needed = *r.out.needed;
/* Return result */
if (werror) {
@@ -2081,8 +2081,8 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli,
uint32_t type /* [in] */,
enum svcctl_ServiceState state /* [in] */,
uint8_t *services /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint32_t offered /* [in] */,
+ uint32_t *needed /* [out] [ref] */,
uint32_t *service_returned /* [out] [ref] */,
uint32_t *resume_handle /* [in,out] [unique] */,
const char **group_name /* [out] [ref,charset(UTF16)] */,
@@ -2096,7 +2096,7 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli,
r.in.info_level = info_level;
r.in.type = type;
r.in.state = state;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
r.in.resume_handle = resume_handle;
if (DEBUGLEVEL >= 10) {
@@ -2122,8 +2122,8 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli,
}
/* Return variables */
- memcpy(services, r.out.services, r.in.buf_size * sizeof(*services));
- *bytes_needed = *r.out.bytes_needed;
+ memcpy(services, r.out.services, r.in.offered * sizeof(*services));
+ *needed = *r.out.needed;
*service_returned = *r.out.service_returned;
if (resume_handle && r.out.resume_handle) {
*resume_handle = *r.out.resume_handle;
@@ -2144,9 +2144,9 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli,
uint32_t info_level /* [in] */,
uint32_t type /* [in] */,
enum svcctl_ServiceState state /* [in] */,
- uint8_t *services /* [out] [ref,size_is(buf_size)] */,
- uint32_t buf_size /* [in] [range(0,0x40000)] */,
- uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */,
+ uint8_t *services /* [out] [ref,size_is(offered)] */,
+ uint32_t offered /* [in] [range(0,0x40000)] */,
+ uint32_t *needed /* [out] [ref,range(0,0x40000)] */,
uint32_t *service_returned /* [out] [ref,range(0,0x40000)] */,
uint32_t *resume_handle /* [in,out] [unique,range(0,0x40000)] */,
const char *group_name /* [in] [unique,charset(UTF16)] */,
@@ -2160,7 +2160,7 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli,
r.in.info_level = info_level;
r.in.type = type;
r.in.state = state;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
r.in.resume_handle = resume_handle;
r.in.group_name = group_name;
@@ -2187,8 +2187,8 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli,
}
/* Return variables */
- memcpy(services, r.out.services, r.in.buf_size * sizeof(*services));
- *bytes_needed = *r.out.bytes_needed;
+ memcpy(services, r.out.services, r.in.offered * sizeof(*services));
+ *needed = *r.out.needed;
*service_returned = *r.out.service_returned;
if (resume_handle && r.out.resume_handle) {
*resume_handle = *r.out.resume_handle;
diff --git a/librpc/gen_ndr/cli_svcctl.h b/librpc/gen_ndr/cli_svcctl.h
index 586e3fd5b9..60a7fdf019 100644
--- a/librpc/gen_ndr/cli_svcctl.h
+++ b/librpc/gen_ndr/cli_svcctl.h
@@ -94,9 +94,9 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *service /* [in] [ref] */,
uint32_t state /* [in] */,
- uint8_t *service_status /* [out] [ref,size_is(buf_size)] */,
- uint32_t buf_size /* [in] [range(0,0x40000)] */,
- uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */,
+ uint8_t *service_status /* [out] [ref,size_is(offered)] */,
+ uint32_t offered /* [in] [range(0,0x40000)] */,
+ uint32_t *needed /* [out] [ref,range(0,0x40000)] */,
uint32_t *services_returned /* [out] [ref,range(0,0x40000)] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli,
@@ -104,9 +104,9 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
uint32_t type /* [in] */,
enum svcctl_ServiceState state /* [in] */,
- uint8_t *service /* [out] [ref,size_is(buf_size)] */,
- uint32_t buf_size /* [in] [range(0,0x40000)] */,
- uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */,
+ uint8_t *service /* [out] [ref,size_is(offered)] */,
+ uint32_t offered /* [in] [range(0,0x40000)] */,
+ uint32_t *needed /* [out] [ref,range(0,0x40000)] */,
uint32_t *services_returned /* [out] [ref,range(0,0x40000)] */,
uint32_t *resume_handle /* [in,out] [unique] */,
WERROR *werror);
@@ -128,15 +128,15 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
struct QUERY_SERVICE_CONFIG *query /* [out] [ref] */,
- uint32_t buf_size /* [in] [range(0,8192)] */,
- uint32_t *bytes_needed /* [out] [ref,range(0,8192)] */,
+ uint32_t offered /* [in] [range(0,8192)] */,
+ uint32_t *needed /* [out] [ref,range(0,8192)] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
- uint32_t buf_size /* [in] */,
+ uint32_t offered /* [in] */,
struct SERVICE_LOCK_STATUS *lock_status /* [out] [ref] */,
- uint32_t *required_buf_size /* [out] [ref] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -200,8 +200,8 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli,
struct policy_handle *service /* [in] [ref] */,
uint32_t state /* [in] */,
struct ENUM_SERVICE_STATUSA *service_status /* [out] [unique] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint32_t offered /* [in] */,
+ uint32_t *needed /* [out] [ref] */,
uint32_t *services_returned /* [out] [ref] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli,
@@ -209,9 +209,9 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
uint32_t type /* [in] */,
enum svcctl_ServiceState state /* [in] */,
- uint32_t buf_size /* [in] */,
- uint8_t *service /* [out] [size_is(buf_size)] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint32_t offered /* [in] */,
+ uint8_t *service /* [out] [size_is(offered)] */,
+ uint32_t *needed /* [out] [ref] */,
uint32_t *services_returned /* [out] [ref] */,
uint32_t *resume_handle /* [in,out] [unique] */,
WERROR *werror);
@@ -232,15 +232,15 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint8_t *query /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint32_t offered /* [in] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
- uint32_t buf_size /* [in] */,
+ uint32_t offered /* [in] */,
struct SERVICE_LOCK_STATUS *lock_status /* [out] [ref] */,
- uint32_t *required_buf_size /* [out] [ref] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -285,24 +285,24 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
enum svcctl_ConfigLevel info_level /* [in] */,
uint8_t *buffer /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint32_t offered /* [in] */,
+ uint32_t *needed /* [out] [ref] */,
WERROR *werror);
NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
enum svcctl_ConfigLevel info_level /* [in] */,
- 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)] */,
+ uint8_t *buffer /* [out] [ref,size_is(offered)] */,
+ uint32_t offered /* [in] [range(0,8192)] */,
+ uint32_t *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] */,
enum svcctl_StatusLevel info_level /* [in] */,
- 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)] */,
+ uint8_t *buffer /* [out] [ref,size_is(offered)] */,
+ uint32_t offered /* [in] [range(0,8192)] */,
+ uint32_t *needed /* [out] [ref,range(0,8192)] */,
WERROR *werror);
NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -311,8 +311,8 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli,
uint32_t type /* [in] */,
enum svcctl_ServiceState state /* [in] */,
uint8_t *services /* [out] */,
- uint32_t buf_size /* [in] */,
- uint32_t *bytes_needed /* [out] [ref] */,
+ uint32_t offered /* [in] */,
+ uint32_t *needed /* [out] [ref] */,
uint32_t *service_returned /* [out] [ref] */,
uint32_t *resume_handle /* [in,out] [unique] */,
const char **group_name /* [out] [ref,charset(UTF16)] */,
@@ -323,9 +323,9 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli,
uint32_t info_level /* [in] */,
uint32_t type /* [in] */,
enum svcctl_ServiceState state /* [in] */,
- uint8_t *services /* [out] [ref,size_is(buf_size)] */,
- uint32_t buf_size /* [in] [range(0,0x40000)] */,
- uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */,
+ uint8_t *services /* [out] [ref,size_is(offered)] */,
+ uint32_t offered /* [in] [range(0,0x40000)] */,
+ uint32_t *needed /* [out] [ref,range(0,0x40000)] */,
uint32_t *service_returned /* [out] [ref,range(0,0x40000)] */,
uint32_t *resume_handle /* [in,out] [unique,range(0,0x40000)] */,
const char *group_name /* [in] [unique,charset(UTF16)] */,
diff --git a/librpc/gen_ndr/ndr_svcctl.c b/librpc/gen_ndr/ndr_svcctl.c
index 3dd61b26c5..06ea6db06f 100644
--- a/librpc/gen_ndr/ndr_svcctl.c
+++ b/librpc/gen_ndr/ndr_svcctl.c
@@ -2690,18 +2690,18 @@ static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
if (flags & NDR_OUT) {
if (r->out.service_status == 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_status, r->in.buf_size));
- if (r->out.bytes_needed == NULL) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service_status, r->in.offered));
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
if (r->out.services_returned == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -2714,7 +2714,7 @@ static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push
static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesW *r)
{
TALLOC_CTX *_mem_save_service_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
TALLOC_CTX *_mem_save_services_returned_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -2727,14 +2727,14 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
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 > 0x40000) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ if (r->in.offered > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
- NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.buf_size);
- memset(r->out.service_status, 0, (r->in.buf_size) * sizeof(*r->out.service_status));
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
- ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.offered);
+ memset(r->out.service_status, 0, (r->in.offered) * sizeof(*r->out.service_status));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
NDR_PULL_ALLOC(ndr, r->out.services_returned);
ZERO_STRUCTP(r->out.services_returned);
}
@@ -2745,15 +2745,15 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull
}
NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status)));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.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 > 0x40000) {
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ if (*r->out.needed > 0x40000) {
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_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.services_returned);
}
@@ -2766,7 +2766,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
if (r->out.service_status) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service_status, r->in.buf_size));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service_status, r->in.offered));
}
}
return NDR_ERR_SUCCESS;
@@ -2787,7 +2787,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, con
ndr_print_policy_handle(ndr, "service", r->in.service);
ndr->depth--;
ndr_print_uint32(ndr, "state", r->in.state);
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -2795,11 +2795,11 @@ _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, con
ndr->depth++;
ndr_print_ptr(ndr, "service_status", r->out.service_status);
ndr->depth++;
- ndr_print_array_uint8(ndr, "service_status", r->out.service_status, r->in.buf_size);
+ ndr_print_array_uint8(ndr, "service_status", r->out.service_status, r->in.offered);
ndr->depth--;
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
ndr->depth++;
@@ -2820,7 +2820,7 @@ static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *nd
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
if (r->in.resume_handle) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
@@ -2830,12 +2830,12 @@ static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *nd
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) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
if (r->out.services_returned == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -2853,7 +2853,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
{
uint32_t _ptr_resume_handle;
TALLOC_CTX *_mem_save_handle_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
TALLOC_CTX *_mem_save_services_returned_0;
TALLOC_CTX *_mem_save_resume_handle_0;
if (flags & NDR_IN) {
@@ -2868,8 +2868,8 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
- if (r->in.buf_size > 0x40000) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ if (r->in.offered > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
@@ -2884,10 +2884,10 @@ 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_N(ndr, r->out.service, r->in.offered);
+ memset(r->out.service, 0, (r->in.offered) * sizeof(*r->out.service));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
NDR_PULL_ALLOC(ndr, r->out.services_returned);
ZERO_STRUCTP(r->out.services_returned);
}
@@ -2898,15 +2898,15 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
}
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);
+ NDR_PULL_ALLOC(ndr, r->out.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 > 0x40000) {
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ if (*r->out.needed > 0x40000) {
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_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.services_returned);
}
@@ -2931,7 +2931,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
}
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
if (r->out.service) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.buf_size));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.offered));
}
}
return NDR_ERR_SUCCESS;
@@ -2953,7 +2953,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const
ndr->depth--;
ndr_print_uint32(ndr, "type", r->in.type);
ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
ndr->depth++;
if (r->in.resume_handle) {
@@ -2967,11 +2967,11 @@ _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const
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_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
ndr->depth--;
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
ndr->depth++;
@@ -3218,17 +3218,17 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *nd
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.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
if (flags & NDR_OUT) {
if (r->out.query == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
- if (r->out.bytes_needed == NULL) {
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -3238,7 +3238,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *nd
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_query_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -3249,14 +3249,14 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *nd
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.buf_size));
- if (r->in.buf_size > 8192) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ if (r->in.offered > 8192) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC(ndr, r->out.query);
ZERO_STRUCTP(r->out.query);
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
- ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
}
if (flags & NDR_OUT) {
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
@@ -3267,15 +3267,15 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *nd
NDR_CHECK(ndr_pull_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.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 > 8192) {
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ if (*r->out.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_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -3295,7 +3295,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -3305,9 +3305,9 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const
ndr->depth++;
ndr_print_QUERY_SERVICE_CONFIG(ndr, "query", r->out.query);
ndr->depth--;
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
@@ -3322,17 +3322,17 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push
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.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
if (flags & NDR_OUT) {
if (r->out.lock_status == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
- if (r->out.required_buf_size == NULL) {
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.required_buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -3342,7 +3342,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_lock_status_0;
- TALLOC_CTX *_mem_save_required_buf_size_0;
+ TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -3353,11 +3353,11 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull
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.buf_size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
NDR_PULL_ALLOC(ndr, r->out.lock_status);
ZERO_STRUCTP(r->out.lock_status);
- NDR_PULL_ALLOC(ndr, r->out.required_buf_size);
- ZERO_STRUCTP(r->out.required_buf_size);
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
}
if (flags & NDR_OUT) {
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
@@ -3368,12 +3368,12 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull
NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.required_buf_size);
+ NDR_PULL_ALLOC(ndr, r->out.needed);
}
- _mem_save_required_buf_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.required_buf_size, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.required_buf_size));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_required_buf_size_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -3393,7 +3393,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, co
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -3403,9 +3403,9 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, co
ndr->depth++;
ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
ndr->depth--;
- ndr_print_ptr(ndr, "required_buf_size", r->out.required_buf_size);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "required_buf_size", *r->out.required_buf_size);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
@@ -4562,17 +4562,17 @@ static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesA(struct ndr_push
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.service_status));
if (r->out.service_status) {
NDR_CHECK(ndr_push_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
}
- if (r->out.bytes_needed == NULL) {
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
if (r->out.services_returned == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -4587,7 +4587,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull
uint32_t _ptr_service_status;
TALLOC_CTX *_mem_save_service_0;
TALLOC_CTX *_mem_save_service_status_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
TALLOC_CTX *_mem_save_services_returned_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -4600,9 +4600,9 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
- ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
NDR_PULL_ALLOC(ndr, r->out.services_returned);
ZERO_STRUCTP(r->out.services_returned);
}
@@ -4620,12 +4620,12 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, 0);
}
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.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));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.services_returned);
}
@@ -4653,7 +4653,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, con
ndr_print_policy_handle(ndr, "service", r->in.service);
ndr->depth--;
ndr_print_uint32(ndr, "state", r->in.state);
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -4665,9 +4665,9 @@ _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, con
ndr_print_ENUM_SERVICE_STATUSA(ndr, "service_status", r->out.service_status);
}
ndr->depth--;
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
ndr->depth++;
@@ -4688,19 +4688,19 @@ static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *nd
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
if (r->in.resume_handle) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
}
}
if (flags & NDR_OUT) {
- 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) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
if (r->out.services_returned == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -4718,7 +4718,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *nd
{
uint32_t _ptr_resume_handle;
TALLOC_CTX *_mem_save_handle_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
TALLOC_CTX *_mem_save_services_returned_0;
TALLOC_CTX *_mem_save_resume_handle_0;
if (flags & NDR_IN) {
@@ -4733,7 +4733,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *nd
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
if (_ptr_resume_handle) {
NDR_PULL_ALLOC(ndr, r->in.resume_handle);
@@ -4746,8 +4746,8 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(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(ndr, r->out.bytes_needed);
- ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
NDR_PULL_ALLOC(ndr, r->out.services_returned);
ZERO_STRUCTP(r->out.services_returned);
}
@@ -4756,12 +4756,12 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *nd
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);
+ NDR_PULL_ALLOC(ndr, r->out.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));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.services_returned);
}
@@ -4783,7 +4783,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *nd
}
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
if (r->out.service) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.buf_size));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.offered));
}
}
return NDR_ERR_SUCCESS;
@@ -4805,7 +4805,7 @@ _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const
ndr->depth--;
ndr_print_uint32(ndr, "type", r->in.type);
ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
ndr->depth++;
if (r->in.resume_handle) {
@@ -4817,10 +4817,10 @@ _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusA");
ndr->depth++;
- ndr_print_array_uint8(ndr, "service", r->out.service, r->in.buf_size);
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
ndr->depth++;
@@ -5068,14 +5068,14 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *nd
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.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.buf_size));
- if (r->out.bytes_needed == NULL) {
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -5084,7 +5084,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *nd
static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigA *r)
{
TALLOC_CTX *_mem_save_handle_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -5095,20 +5095,20 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *nd
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.buf_size));
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
- ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
}
if (flags & NDR_OUT) {
- NDR_PULL_ALLOC_N(ndr, r->out.query, r->in.buf_size);
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.buf_size));
+ NDR_PULL_ALLOC_N(ndr, r->out.query, r->in.offered);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.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));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -5128,16 +5128,16 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigA");
ndr->depth++;
- ndr_print_array_uint8(ndr, "query", r->out.query, r->in.buf_size);
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_array_uint8(ndr, "query", r->out.query, r->in.offered);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
@@ -5152,17 +5152,17 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push
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.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
if (flags & NDR_OUT) {
if (r->out.lock_status == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
- if (r->out.required_buf_size == NULL) {
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.required_buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -5172,7 +5172,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_lock_status_0;
- TALLOC_CTX *_mem_save_required_buf_size_0;
+ TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -5183,11 +5183,11 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull
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.buf_size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
NDR_PULL_ALLOC(ndr, r->out.lock_status);
ZERO_STRUCTP(r->out.lock_status);
- NDR_PULL_ALLOC(ndr, r->out.required_buf_size);
- ZERO_STRUCTP(r->out.required_buf_size);
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
}
if (flags & NDR_OUT) {
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
@@ -5198,12 +5198,12 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull
NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.required_buf_size);
+ NDR_PULL_ALLOC(ndr, r->out.needed);
}
- _mem_save_required_buf_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.required_buf_size, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.required_buf_size));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_required_buf_size_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -5223,7 +5223,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, co
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -5233,9 +5233,9 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, co
ndr->depth++;
ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
ndr->depth--;
- ndr_print_ptr(ndr, "required_buf_size", r->out.required_buf_size);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "required_buf_size", *r->out.required_buf_size);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
@@ -5966,14 +5966,14 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *n
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
- if (r->out.bytes_needed == NULL) {
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -5982,7 +5982,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *n
static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2A *r)
{
TALLOC_CTX *_mem_save_handle_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -5994,20 +5994,20 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *n
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_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
- ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.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_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.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));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -6028,16 +6028,16 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2A");
ndr->depth++;
- ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buf_size);
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
@@ -6053,18 +6053,18 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *n
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
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) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -6073,7 +6073,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *n
static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2W *r)
{
TALLOC_CTX *_mem_save_handle_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -6085,14 +6085,14 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *n
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_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
- if (r->in.buf_size > 8192) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ if (r->in.offered > 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);
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
+ memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
@@ -6101,18 +6101,18 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *n
}
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);
+ NDR_PULL_ALLOC(ndr, r->out.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 > 8192) {
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ if (*r->out.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_PULL_SET_MEM_CTX(ndr, _mem_save_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));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
}
}
return NDR_ERR_SUCCESS;
@@ -6133,7 +6133,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -6141,11 +6141,11 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const
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_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
ndr->depth--;
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
@@ -6161,18 +6161,18 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *n
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_CHECK(ndr_push_svcctl_StatusLevel(ndr, NDR_SCALARS, r->in.info_level));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
}
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) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -6181,7 +6181,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *n
static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatusEx *r)
{
TALLOC_CTX *_mem_save_handle_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -6193,14 +6193,14 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *n
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_svcctl_StatusLevel(ndr, NDR_SCALARS, &r->in.info_level));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
- if (r->in.buf_size > 8192) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ if (r->in.offered > 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);
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
+ memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
@@ -6209,18 +6209,18 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *n
}
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);
+ NDR_PULL_ALLOC(ndr, r->out.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 > 8192) {
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ if (*r->out.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_PULL_SET_MEM_CTX(ndr, _mem_save_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));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
}
}
return NDR_ERR_SUCCESS;
@@ -6241,7 +6241,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
ndr_print_svcctl_StatusLevel(ndr, "info_level", r->in.info_level);
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -6249,11 +6249,11 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const
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_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
ndr->depth--;
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
@@ -6271,18 +6271,18 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, in
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
if (r->in.resume_handle) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
}
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.buf_size));
- if (r->out.bytes_needed == NULL) {
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
if (r->out.service_returned == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -6311,7 +6311,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, in
uint32_t _ptr_resume_handle;
uint32_t _ptr_group_name;
TALLOC_CTX *_mem_save_scmanager_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
TALLOC_CTX *_mem_save_service_returned_0;
TALLOC_CTX *_mem_save_resume_handle_0;
TALLOC_CTX *_mem_save_group_name_0;
@@ -6329,7 +6329,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, in
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
if (_ptr_resume_handle) {
NDR_PULL_ALLOC(ndr, r->in.resume_handle);
@@ -6342,23 +6342,23 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, in
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(ndr, r->out.bytes_needed);
- ZERO_STRUCTP(r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.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_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
+ NDR_PULL_ALLOC(ndr, r->out.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));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.service_returned);
}
@@ -6424,7 +6424,7 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char
ndr_print_uint32(ndr, "info_level", r->in.info_level);
ndr_print_uint32(ndr, "type", r->in.type);
ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
ndr->depth++;
if (r->in.resume_handle) {
@@ -6436,10 +6436,10 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "EnumServicesStatusExA");
ndr->depth++;
- ndr_print_array_uint8(ndr, "services", r->out.services, r->in.buf_size);
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
ndr->depth++;
@@ -6476,7 +6476,7 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, in
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
if (r->in.resume_handle) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
@@ -6493,12 +6493,12 @@ static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, in
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) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
+ if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
if (r->out.service_returned == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -6517,7 +6517,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
uint32_t _ptr_resume_handle;
uint32_t _ptr_group_name;
TALLOC_CTX *_mem_save_scmanager_0;
- TALLOC_CTX *_mem_save_bytes_needed_0;
+ TALLOC_CTX *_mem_save_needed_0;
TALLOC_CTX *_mem_save_service_returned_0;
TALLOC_CTX *_mem_save_resume_handle_0;
TALLOC_CTX *_mem_save_group_name_0;
@@ -6534,8 +6534,8 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
- if (r->in.buf_size > 0x40000) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
+ if (r->in.offered > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
@@ -6571,10 +6571,10 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
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_N(ndr, r->out.services, r->in.offered);
+ memset(r->out.services, 0, (r->in.offered) * sizeof(*r->out.services));
+ NDR_PULL_ALLOC(ndr, r->out.needed);
+ ZERO_STRUCTP(r->out.needed);
NDR_PULL_ALLOC(ndr, r->out.service_returned);
ZERO_STRUCTP(r->out.service_returned);
}
@@ -6585,15 +6585,15 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
}
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);
+ NDR_PULL_ALLOC(ndr, r->out.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 > 0x40000) {
+ _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
+ if (*r->out.needed > 0x40000) {
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_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.service_returned);
}
@@ -6621,7 +6621,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
}
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));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.services, r->in.offered));
}
}
return NDR_ERR_SUCCESS;
@@ -6644,7 +6644,7 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char
ndr_print_uint32(ndr, "info_level", r->in.info_level);
ndr_print_uint32(ndr, "type", r->in.type);
ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
- ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
+ ndr_print_uint32(ndr, "offered", r->in.offered);
ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
ndr->depth++;
if (r->in.resume_handle) {
@@ -6664,11 +6664,11 @@ _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char
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_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
ndr->depth--;
- ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
+ ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
- ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
+ ndr_print_uint32(ndr, "needed", *r->out.needed);
ndr->depth--;
ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
ndr->depth++;
diff --git a/librpc/gen_ndr/srv_svcctl.c b/librpc/gen_ndr/srv_svcctl.c
index bf8689907b..3d80472313 100644
--- a/librpc/gen_ndr/srv_svcctl.c
+++ b/librpc/gen_ndr/srv_svcctl.c
@@ -1047,14 +1047,14 @@ static bool api_svcctl_EnumDependentServicesW(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.service_status = talloc_zero_array(r, uint8_t, r->in.buf_size);
+ r->out.service_status = talloc_zero_array(r, uint8_t, r->in.offered);
if (r->out.service_status == NULL) {
talloc_free(r);
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -1140,14 +1140,14 @@ 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);
+ r->out.service = talloc_zero_array(r, uint8_t, r->in.offered);
if (r->out.service == NULL) {
talloc_free(r);
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -1398,8 +1398,8 @@ static bool api_svcctl_QueryServiceConfigW(pipes_struct *p)
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -1484,8 +1484,8 @@ static bool api_svcctl_QueryServiceLockStatusW(pipes_struct *p)
return false;
}
- r->out.required_buf_size = talloc_zero(r, uint32_t);
- if (r->out.required_buf_size == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -2038,8 +2038,8 @@ static bool api_svcctl_EnumDependentServicesA(pipes_struct *p)
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -2125,14 +2125,14 @@ 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);
+ r->out.service = talloc_zero_array(r, uint8_t, r->in.offered);
if (r->out.service == NULL) {
talloc_free(r);
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -2370,14 +2370,14 @@ static bool api_svcctl_QueryServiceConfigA(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.query = talloc_zero_array(r, uint8_t, r->in.buf_size);
+ r->out.query = talloc_zero_array(r, uint8_t, r->in.offered);
if (r->out.query == NULL) {
talloc_free(r);
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -2462,8 +2462,8 @@ static bool api_svcctl_QueryServiceLockStatusA(pipes_struct *p)
return false;
}
- r->out.required_buf_size = talloc_zero(r, uint32_t);
- if (r->out.required_buf_size == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -3069,14 +3069,14 @@ static bool api_svcctl_QueryServiceConfig2A(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buf_size);
+ r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
if (r->out.buffer == NULL) {
talloc_free(r);
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -3155,14 +3155,14 @@ static bool api_svcctl_QueryServiceConfig2W(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buf_size);
+ r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
if (r->out.buffer == NULL) {
talloc_free(r);
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -3241,14 +3241,14 @@ static bool api_svcctl_QueryServiceStatusEx(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buf_size);
+ r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
if (r->out.buffer == NULL) {
talloc_free(r);
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -3328,14 +3328,14 @@ 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);
+ r->out.services = talloc_zero_array(r, uint8_t, r->in.offered);
if (r->out.services == NULL) {
talloc_free(r);
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -3427,14 +3427,14 @@ 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);
+ r->out.services = talloc_zero_array(r, uint8_t, r->in.offered);
if (r->out.services == NULL) {
talloc_free(r);
return false;
}
- r->out.bytes_needed = talloc_zero(r, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(r, uint32_t);
+ if (r->out.needed == NULL) {
talloc_free(r);
return false;
}
@@ -3744,13 +3744,13 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
case NDR_SVCCTL_ENUMDEPENDENTSERVICESW: {
struct svcctl_EnumDependentServicesW *r = (struct svcctl_EnumDependentServicesW *)_r;
ZERO_STRUCT(r->out);
- r->out.service_status = talloc_zero_array(mem_ctx, uint8_t, r->in.buf_size);
+ r->out.service_status = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
if (r->out.service_status == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -3767,13 +3767,13 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
struct svcctl_EnumServicesStatusW *r = (struct svcctl_EnumServicesStatusW *)_r;
ZERO_STRUCT(r->out);
r->out.resume_handle = r->in.resume_handle;
- r->out.service = talloc_zero_array(mem_ctx, uint8_t, r->in.buf_size);
+ r->out.service = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
if (r->out.service == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -3818,8 +3818,8 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -3835,8 +3835,8 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
return NT_STATUS_NO_MEMORY;
}
- r->out.required_buf_size = talloc_zero(mem_ctx, uint32_t);
- if (r->out.required_buf_size == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -3914,8 +3914,8 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -3932,13 +3932,13 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
struct svcctl_EnumServicesStatusA *r = (struct svcctl_EnumServicesStatusA *)_r;
ZERO_STRUCT(r->out);
r->out.resume_handle = r->in.resume_handle;
- r->out.service = talloc_zero_array(mem_ctx, uint8_t, r->in.buf_size);
+ r->out.service = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
if (r->out.service == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -3972,13 +3972,13 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
case NDR_SVCCTL_QUERYSERVICECONFIGA: {
struct svcctl_QueryServiceConfigA *r = (struct svcctl_QueryServiceConfigA *)_r;
ZERO_STRUCT(r->out);
- r->out.query = talloc_zero_array(mem_ctx, uint8_t, r->in.buf_size);
+ r->out.query = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
if (r->out.query == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -3994,8 +3994,8 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
return NT_STATUS_NO_MEMORY;
}
- r->out.required_buf_size = talloc_zero(mem_ctx, uint32_t);
- if (r->out.required_buf_size == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -4062,13 +4062,13 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
case NDR_SVCCTL_QUERYSERVICECONFIG2A: {
struct svcctl_QueryServiceConfig2A *r = (struct svcctl_QueryServiceConfig2A *)_r;
ZERO_STRUCT(r->out);
- r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.buf_size);
+ r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
if (r->out.buffer == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -4079,13 +4079,13 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
case NDR_SVCCTL_QUERYSERVICECONFIG2W: {
struct svcctl_QueryServiceConfig2W *r = (struct svcctl_QueryServiceConfig2W *)_r;
ZERO_STRUCT(r->out);
- r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.buf_size);
+ r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
if (r->out.buffer == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -4096,13 +4096,13 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
case NDR_SVCCTL_QUERYSERVICESTATUSEX: {
struct svcctl_QueryServiceStatusEx *r = (struct svcctl_QueryServiceStatusEx *)_r;
ZERO_STRUCT(r->out);
- r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.buf_size);
+ r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
if (r->out.buffer == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -4114,13 +4114,13 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
struct EnumServicesStatusExA *r = (struct EnumServicesStatusExA *)_r;
ZERO_STRUCT(r->out);
r->out.resume_handle = r->in.resume_handle;
- r->out.services = talloc_zero_array(mem_ctx, uint8_t, r->in.buf_size);
+ r->out.services = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
if (r->out.services == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -4142,13 +4142,13 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c
struct EnumServicesStatusExW *r = (struct EnumServicesStatusExW *)_r;
ZERO_STRUCT(r->out);
r->out.resume_handle = r->in.resume_handle;
- r->out.services = talloc_zero_array(mem_ctx, uint8_t, r->in.buf_size);
+ r->out.services = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
if (r->out.services == NULL) {
return NT_STATUS_NO_MEMORY;
}
- r->out.bytes_needed = talloc_zero(mem_ctx, uint32_t);
- if (r->out.bytes_needed == NULL) {
+ r->out.needed = talloc_zero(mem_ctx, uint32_t);
+ if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/librpc/gen_ndr/svcctl.h b/librpc/gen_ndr/svcctl.h
index 16d482139c..f87d2cce0c 100644
--- a/librpc/gen_ndr/svcctl.h
+++ b/librpc/gen_ndr/svcctl.h
@@ -479,12 +479,12 @@ struct svcctl_EnumDependentServicesW {
struct {
struct policy_handle *service;/* [ref] */
uint32_t state;
- uint32_t buf_size;/* [range(0,0x40000)] */
+ uint32_t offered;/* [range(0,0x40000)] */
} in;
struct {
- uint8_t *service_status;/* [ref,size_is(buf_size)] */
- uint32_t *bytes_needed;/* [ref,range(0,0x40000)] */
+ uint8_t *service_status;/* [ref,size_is(offered)] */
+ uint32_t *needed;/* [ref,range(0,0x40000)] */
uint32_t *services_returned;/* [ref,range(0,0x40000)] */
WERROR result;
} out;
@@ -497,13 +497,13 @@ struct svcctl_EnumServicesStatusW {
struct policy_handle *handle;/* [ref] */
uint32_t type;
enum svcctl_ServiceState state;
- uint32_t buf_size;/* [range(0,0x40000)] */
+ uint32_t offered;/* [range(0,0x40000)] */
uint32_t *resume_handle;/* [unique] */
} in;
struct {
- uint8_t *service;/* [ref,size_is(buf_size)] */
- uint32_t *bytes_needed;/* [ref,range(0,0x40000)] */
+ uint8_t *service;/* [ref,size_is(offered)] */
+ uint32_t *needed;/* [ref,range(0,0x40000)] */
uint32_t *services_returned;/* [ref,range(0,0x40000)] */
uint32_t *resume_handle;/* [unique] */
WERROR result;
@@ -545,12 +545,12 @@ struct svcctl_OpenServiceW {
struct svcctl_QueryServiceConfigW {
struct {
struct policy_handle *handle;/* [ref] */
- uint32_t buf_size;/* [range(0,8192)] */
+ uint32_t offered;/* [range(0,8192)] */
} in;
struct {
struct QUERY_SERVICE_CONFIG *query;/* [ref] */
- uint32_t *bytes_needed;/* [ref,range(0,8192)] */
+ uint32_t *needed;/* [ref,range(0,8192)] */
WERROR result;
} out;
@@ -560,12 +560,12 @@ struct svcctl_QueryServiceConfigW {
struct svcctl_QueryServiceLockStatusW {
struct {
struct policy_handle *handle;/* [ref] */
- uint32_t buf_size;
+ uint32_t offered;
} in;
struct {
struct SERVICE_LOCK_STATUS *lock_status;/* [ref] */
- uint32_t *required_buf_size;/* [ref] */
+ uint32_t *needed;/* [ref] */
WERROR result;
} out;
@@ -683,12 +683,12 @@ struct svcctl_EnumDependentServicesA {
struct {
struct policy_handle *service;/* [ref] */
uint32_t state;
- uint32_t buf_size;
+ uint32_t offered;
} in;
struct {
struct ENUM_SERVICE_STATUSA *service_status;/* [unique] */
- uint32_t *bytes_needed;/* [ref] */
+ uint32_t *needed;/* [ref] */
uint32_t *services_returned;/* [ref] */
WERROR result;
} out;
@@ -701,13 +701,13 @@ struct svcctl_EnumServicesStatusA {
struct policy_handle *handle;/* [ref] */
uint32_t type;
enum svcctl_ServiceState state;
- uint32_t buf_size;
+ uint32_t offered;
uint32_t *resume_handle;/* [unique] */
} in;
struct {
- uint8_t *service;/* [size_is(buf_size)] */
- uint32_t *bytes_needed;/* [ref] */
+ uint8_t *service;/* [size_is(offered)] */
+ uint32_t *needed;/* [ref] */
uint32_t *services_returned;/* [ref] */
uint32_t *resume_handle;/* [unique] */
WERROR result;
@@ -748,12 +748,12 @@ struct svcctl_OpenServiceA {
struct svcctl_QueryServiceConfigA {
struct {
struct policy_handle *handle;/* [ref] */
- uint32_t buf_size;
+ uint32_t offered;
} in;
struct {
uint8_t *query;
- uint32_t *bytes_needed;/* [ref] */
+ uint32_t *needed;/* [ref] */
WERROR result;
} out;
@@ -763,12 +763,12 @@ struct svcctl_QueryServiceConfigA {
struct svcctl_QueryServiceLockStatusA {
struct {
struct policy_handle *handle;/* [ref] */
- uint32_t buf_size;
+ uint32_t offered;
} in;
struct {
struct SERVICE_LOCK_STATUS *lock_status;/* [ref] */
- uint32_t *required_buf_size;/* [ref] */
+ uint32_t *needed;/* [ref] */
WERROR result;
} out;
@@ -869,12 +869,12 @@ struct svcctl_QueryServiceConfig2A {
struct {
struct policy_handle *handle;/* [ref] */
enum svcctl_ConfigLevel info_level;
- uint32_t buf_size;
+ uint32_t offered;
} in;
struct {
uint8_t *buffer;
- uint32_t *bytes_needed;/* [ref] */
+ uint32_t *needed;/* [ref] */
WERROR result;
} out;
@@ -885,12 +885,12 @@ struct svcctl_QueryServiceConfig2W {
struct {
struct policy_handle *handle;/* [ref] */
enum svcctl_ConfigLevel info_level;
- uint32_t buf_size;/* [range(0,8192)] */
+ uint32_t offered;/* [range(0,8192)] */
} in;
struct {
- uint8_t *buffer;/* [ref,size_is(buf_size)] */
- uint32_t *bytes_needed;/* [ref,range(0,8192)] */
+ uint8_t *buffer;/* [ref,size_is(offered)] */
+ uint32_t *needed;/* [ref,range(0,8192)] */
WERROR result;
} out;
@@ -901,12 +901,12 @@ struct svcctl_QueryServiceStatusEx {
struct {
struct policy_handle *handle;/* [ref] */
enum svcctl_StatusLevel info_level;
- uint32_t buf_size;/* [range(0,8192)] */
+ uint32_t offered;/* [range(0,8192)] */
} in;
struct {
- uint8_t *buffer;/* [ref,size_is(buf_size)] */
- uint32_t *bytes_needed;/* [ref,range(0,8192)] */
+ uint8_t *buffer;/* [ref,size_is(offered)] */
+ uint32_t *needed;/* [ref,range(0,8192)] */
WERROR result;
} out;
@@ -919,13 +919,13 @@ struct EnumServicesStatusExA {
uint32_t info_level;
uint32_t type;
enum svcctl_ServiceState state;
- uint32_t buf_size;
+ uint32_t offered;
uint32_t *resume_handle;/* [unique] */
} in;
struct {
uint8_t *services;
- uint32_t *bytes_needed;/* [ref] */
+ uint32_t *needed;/* [ref] */
uint32_t *service_returned;/* [ref] */
const char **group_name;/* [ref,charset(UTF16)] */
uint32_t *resume_handle;/* [unique] */
@@ -941,14 +941,14 @@ struct EnumServicesStatusExW {
uint32_t info_level;
uint32_t type;
enum svcctl_ServiceState state;
- uint32_t buf_size;/* [range(0,0x40000)] */
+ uint32_t offered;/* [range(0,0x40000)] */
const char *group_name;/* [unique,charset(UTF16)] */
uint32_t *resume_handle;/* [unique,range(0,0x40000)] */
} in;
struct {
- uint8_t *services;/* [ref,size_is(buf_size)] */
- uint32_t *bytes_needed;/* [ref,range(0,0x40000)] */
+ uint8_t *services;/* [ref,size_is(offered)] */
+ uint32_t *needed;/* [ref,range(0,0x40000)] */
uint32_t *service_returned;/* [ref,range(0,0x40000)] */
uint32_t *resume_handle;/* [unique,range(0,0x40000)] */
WERROR result;
diff --git a/librpc/idl/svcctl.idl b/librpc/idl/svcctl.idl
index 4b66d9cc5d..2f461d6889 100644
--- a/librpc/idl/svcctl.idl
+++ b/librpc/idl/svcctl.idl
@@ -261,9 +261,9 @@ import "misc.idl", "security.idl";
WERROR svcctl_EnumDependentServicesW(
[in,ref] policy_handle *service,
[in] uint32 state,
- [out,ref,size_is(buf_size)] uint8 *service_status,
- [in,range(0,0x40000)] uint32 buf_size,
- [out,ref,range(0,0x40000)] uint32 *bytes_needed,
+ [out,ref,size_is(offered)] uint8 *service_status,
+ [in,range(0,0x40000)] uint32 offered,
+ [out,ref,range(0,0x40000)] uint32 *needed,
[out,ref,range(0,0x40000)] uint32 *services_returned
);
@@ -280,9 +280,9 @@ import "misc.idl", "security.idl";
[in,ref] policy_handle *handle,
[in] uint32 type,
[in] svcctl_ServiceState state,
- [out,ref,size_is(buf_size)] uint8 *service,
- [in] [range(0,0x40000)] uint32 buf_size,
- [out,ref] [range(0,0x40000)] uint32 *bytes_needed,
+ [out,ref,size_is(offered)] uint8 *service,
+ [in] [range(0,0x40000)] uint32 offered,
+ [out,ref] [range(0,0x40000)] uint32 *needed,
[out,ref] [range(0,0x40000)] uint32 *services_returned,
[in,out,unique] uint32 *resume_handle
);
@@ -389,17 +389,17 @@ import "misc.idl", "security.idl";
WERROR svcctl_QueryServiceConfigW(
[in,ref] policy_handle *handle,
[out] QUERY_SERVICE_CONFIG *query,
- [in] [range(0,8192)] uint32 buf_size,
- [out,ref] [range(0,8192)] uint32 *bytes_needed
+ [in] [range(0,8192)] uint32 offered,
+ [out,ref] [range(0,8192)] uint32 *needed
);
/*****************/
/* Function 0x12 */
WERROR svcctl_QueryServiceLockStatusW(
[in,ref] policy_handle *handle,
- [in] uint32 buf_size,
+ [in] uint32 offered,
[out,ref] SERVICE_LOCK_STATUS *lock_status,
- [out,ref] uint32 *required_buf_size
+ [out,ref] uint32 *needed
);
/*****************/
@@ -477,8 +477,8 @@ import "misc.idl", "security.idl";
[in,ref] policy_handle *service,
[in] uint32 state,
[out,unique] ENUM_SERVICE_STATUSA *service_status,
- [in] uint32 buf_size,
- [out,ref] uint32 *bytes_needed,
+ [in] uint32 offered,
+ [out,ref] uint32 *needed,
[out,ref] uint32 *services_returned
);
@@ -488,9 +488,9 @@ import "misc.idl", "security.idl";
[in,ref] policy_handle *handle,
[in] uint32 type,
[in] svcctl_ServiceState state,
- [in] uint32 buf_size,
- [out,size_is(buf_size)] uint8 service[*],
- [out,ref] uint32 *bytes_needed,
+ [in] uint32 offered,
+ [out,size_is(offered)] uint8 service[*],
+ [out,ref] uint32 *needed,
[out,ref] uint32 *services_returned,
[in,out,unique] uint32 *resume_handle
);
@@ -516,18 +516,18 @@ import "misc.idl", "security.idl";
/* Function 0x1d */
WERROR svcctl_QueryServiceConfigA(
[in,ref] policy_handle *handle,
- [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */
- [in] uint32 buf_size,
- [out,ref] uint32 *bytes_needed
+ [out] uint8 query[offered], /*QUERYU_SERVICE_CONFIG */
+ [in] uint32 offered,
+ [out,ref] uint32 *needed
);
/*****************/
/* Function 0x1e */
WERROR svcctl_QueryServiceLockStatusA(
[in,ref] policy_handle *handle,
- [in] uint32 buf_size,
+ [in] uint32 offered,
[out,ref] SERVICE_LOCK_STATUS *lock_status,
- [out,ref] uint32 *required_buf_size
+ [out,ref] uint32 *needed
);
/*****************/
@@ -617,9 +617,9 @@ import "misc.idl", "security.idl";
WERROR svcctl_QueryServiceConfig2A(
[in,ref] policy_handle *handle,
[in] svcctl_ConfigLevel info_level,
- [out] uint8 buffer[buf_size],
- [in] uint32 buf_size,
- [out,ref] uint32 *bytes_needed
+ [out] uint8 buffer[offered],
+ [in] uint32 offered,
+ [out,ref] uint32 *needed
);
/*****************/
@@ -627,9 +627,9 @@ import "misc.idl", "security.idl";
WERROR svcctl_QueryServiceConfig2W(
[in,ref] policy_handle *handle,
[in] svcctl_ConfigLevel info_level,
- [out,ref,size_is(buf_size)] uint8 *buffer,
- [in] [range(0,8192)] uint32 buf_size,
- [out,ref] [range(0,8192)] uint32 *bytes_needed
+ [out,ref,size_is(offered)] uint8 *buffer,
+ [in] [range(0,8192)] uint32 offered,
+ [out,ref] [range(0,8192)] uint32 *needed
);
/*****************/
@@ -642,9 +642,9 @@ import "misc.idl", "security.idl";
WERROR svcctl_QueryServiceStatusEx(
[in,ref] policy_handle *handle,
[in] svcctl_StatusLevel info_level,
- [out,ref,size_is(buf_size)] uint8 *buffer,
- [in] [range(0,8192)] uint32 buf_size,
- [out,ref] [range(0,8192)] uint32 *bytes_needed
+ [out,ref,size_is(offered)] uint8 *buffer,
+ [in] [range(0,8192)] uint32 offered,
+ [out,ref] [range(0,8192)] uint32 *needed
);
/*****************/
@@ -654,9 +654,9 @@ import "misc.idl", "security.idl";
[in] uint32 info_level,
[in] uint32 type,
[in] svcctl_ServiceState state,
- [out] uint8 services[buf_size],
- [in] uint32 buf_size,
- [out,ref] uint32 *bytes_needed,
+ [out] uint8 services[offered],
+ [in] uint32 offered,
+ [out,ref] uint32 *needed,
[out,ref] uint32 *service_returned,
[in,out,unique] uint32 *resume_handle,
[out,ref] [string,charset(UTF16)] uint16 **group_name
@@ -669,9 +669,9 @@ import "misc.idl", "security.idl";
[in] uint32 info_level,
[in] uint32 type,
[in] svcctl_ServiceState state,
- [out,ref,size_is(buf_size)] uint8 *services,
- [in] [range(0,0x40000)] uint32 buf_size,
- [out,ref] [range(0,0x40000)] uint32 *bytes_needed,
+ [out,ref,size_is(offered)] uint8 *services,
+ [in] [range(0,0x40000)] uint32 offered,
+ [out,ref] [range(0,0x40000)] uint32 *needed,
[out,ref] [range(0,0x40000)] uint32 *service_returned,
[in,out,unique] [range(0,0x40000)] uint32 *resume_handle,
[in,unique] [string,charset(UTF16)] uint16 *group_name
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index 6aafd5ab2c..ddfe0df10b 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -444,7 +444,7 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p,
buffer_size += buffer_size % 4;
- if (buffer_size > r->in.buf_size ) {
+ if (buffer_size > r->in.offered) {
num_services = 0;
result = WERR_MORE_DATA;
}
@@ -466,12 +466,12 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p,
}
blob = ndr_push_blob(ndr);
- if (blob.length >= r->in.buf_size) {
- memcpy(r->out.service, blob.data, r->in.buf_size);
+ if (blob.length >= r->in.offered) {
+ memcpy(r->out.service, blob.data, r->in.offered);
}
}
- *r->out.bytes_needed = (buffer_size > r->in.buf_size) ? buffer_size : r->in.buf_size;
+ *r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered;
*r->out.services_returned = (uint32)num_services;
*r->out.resume_handle = 0x0;
@@ -552,7 +552,7 @@ WERROR _svcctl_EnumDependentServicesW(pipes_struct *p,
incoming buffer size (even in the case of failure */
/* this is done in the autogenerated server already - gd */
- *r->out.bytes_needed = r->in.buf_size;
+ *r->out.needed = r->in.offered;
/* no dependent services...basically a stub function */
*r->out.services_returned = 0;
@@ -580,7 +580,7 @@ WERROR _svcctl_QueryServiceStatusEx(pipes_struct *p,
/* we have to set the outgoing buffer size to the same as the
incoming buffer size (even in the case of failure) */
- *r->out.bytes_needed = r->in.buf_size;
+ *r->out.needed = r->in.offered;
switch ( r->in.info_level ) {
case SVC_STATUS_PROCESS_INFO:
@@ -612,9 +612,9 @@ WERROR _svcctl_QueryServiceStatusEx(pipes_struct *p,
buffer_size += buffer_size % 4;
- *r->out.bytes_needed = (buffer_size > r->in.buf_size) ? buffer_size : r->in.buf_size;
+ *r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered;
- if (buffer_size > r->in.buf_size ) {
+ if (buffer_size > r->in.offered ) {
return WERR_INSUFFICIENT_BUFFER;
}
@@ -697,7 +697,7 @@ WERROR _svcctl_QueryServiceConfigW(pipes_struct *p,
/* we have to set the outgoing buffer size to the same as the
incoming buffer size (even in the case of failure */
- *r->out.bytes_needed = r->in.buf_size;
+ *r->out.needed = r->in.offered;
wresult = fill_svc_config( p->mem_ctx, info->name, r->out.query,
p->server_info->ptok);
@@ -705,9 +705,9 @@ WERROR _svcctl_QueryServiceConfigW(pipes_struct *p,
return wresult;
buffer_size = ndr_size_QUERY_SERVICE_CONFIG(r->out.query, NULL, 0);
- *r->out.bytes_needed = (buffer_size > r->in.buf_size) ? buffer_size : r->in.buf_size;
+ *r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered;
- if (buffer_size > r->in.buf_size ) {
+ if (buffer_size > r->in.offered ) {
ZERO_STRUCTP(r->out.query);
return WERR_INSUFFICIENT_BUFFER;
}
@@ -735,7 +735,7 @@ WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p,
/* we have to set the outgoing buffer size to the same as the
incoming buffer size (even in the case of failure */
- *r->out.bytes_needed = r->in.buf_size;
+ *r->out.needed = r->in.offered;
switch ( r->in.info_level ) {
case SERVICE_CONFIG_DESCRIPTION:
@@ -792,9 +792,9 @@ WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p,
}
buffer_size += buffer_size % 4;
- *r->out.bytes_needed = (buffer_size > r->in.buf_size) ? buffer_size : r->in.buf_size;
+ *r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered;
- if (buffer_size > r->in.buf_size )
+ if (buffer_size > r->in.offered)
return WERR_INSUFFICIENT_BUFFER;
return WERR_OK;
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index a4b9e6bed1..375df9f647 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -82,8 +82,8 @@ static bool test_QueryServiceStatusEx(struct torture_context *tctx, struct dcerp
uint32_t info_level = SVC_STATUS_PROCESS_INFO;
uint8_t *buffer;
- uint32_t buf_size = 0;
- uint32_t bytes_needed = 0;
+ uint32_t offered = 0;
+ uint32_t needed = 0;
if (!test_OpenSCManager(p, tctx, &h))
return false;
@@ -95,16 +95,16 @@ static bool test_QueryServiceStatusEx(struct torture_context *tctx, struct dcerp
r.in.handle = &s;
r.in.info_level = info_level;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
r.out.buffer = buffer;
- r.out.bytes_needed = &bytes_needed;
+ r.out.needed = &needed;
status = dcerpc_svcctl_QueryServiceStatusEx(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "QueryServiceStatusEx failed!");
if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
- r.in.buf_size = bytes_needed;
- buffer = talloc_array(tctx, uint8_t, bytes_needed);
+ r.in.offered = needed;
+ buffer = talloc_array(tctx, uint8_t, needed);
r.out.buffer = buffer;
status = dcerpc_svcctl_QueryServiceStatusEx(p, tctx, &r);
@@ -129,8 +129,8 @@ static bool test_QueryServiceConfig2W(struct torture_context *tctx, struct dcerp
uint32_t info_level = SERVICE_CONFIG_DESCRIPTION;
uint8_t *buffer;
- uint32_t buf_size = 0;
- uint32_t bytes_needed = 0;
+ uint32_t offered = 0;
+ uint32_t needed = 0;
if (!test_OpenSCManager(p, tctx, &h))
return false;
@@ -142,16 +142,16 @@ static bool test_QueryServiceConfig2W(struct torture_context *tctx, struct dcerp
r.in.handle = &s;
r.in.info_level = info_level;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
r.out.buffer = buffer;
- r.out.bytes_needed = &bytes_needed;
+ r.out.needed = &needed;
status = dcerpc_svcctl_QueryServiceConfig2W(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "QueryServiceConfig2W failed!");
if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
- r.in.buf_size = bytes_needed;
- buffer = talloc_array(tctx, uint8_t, bytes_needed);
+ r.in.offered = needed;
+ buffer = talloc_array(tctx, uint8_t, needed);
r.out.buffer = buffer;
status = dcerpc_svcctl_QueryServiceConfig2W(p, tctx, &r);
@@ -160,16 +160,16 @@ static bool test_QueryServiceConfig2W(struct torture_context *tctx, struct dcerp
}
r.in.info_level = SERVICE_CONFIG_FAILURE_ACTIONS;
- r.in.buf_size = buf_size;
+ r.in.offered = offered;
r.out.buffer = buffer;
- r.out.bytes_needed = &bytes_needed;
+ r.out.needed = &needed;
status = dcerpc_svcctl_QueryServiceConfig2W(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "QueryServiceConfig2W failed!");
if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
- r.in.buf_size = bytes_needed;
- buffer = talloc_array(tctx, uint8_t, bytes_needed);
+ r.in.offered = needed;
+ buffer = talloc_array(tctx, uint8_t, needed);
r.out.buffer = buffer;
status = dcerpc_svcctl_QueryServiceConfig2W(p, tctx, &r);
@@ -194,7 +194,7 @@ static bool test_EnumServicesStatus(struct torture_context *tctx, struct dcerpc_
NTSTATUS status;
uint32_t resume_handle = 0;
struct ENUM_SERVICE_STATUSW *service = NULL;
- uint32_t bytes_needed = 0;
+ uint32_t needed = 0;
uint32_t services_returned = 0;
if (!test_OpenSCManager(p, tctx, &h))
@@ -203,20 +203,20 @@ static bool test_EnumServicesStatus(struct torture_context *tctx, struct dcerpc_
r.in.handle = &h;
r.in.type = SERVICE_TYPE_WIN32;
r.in.state = SERVICE_STATE_ALL;
- r.in.buf_size = 0;
+ r.in.offered = 0;
r.in.resume_handle = &resume_handle;
r.out.service = NULL;
r.out.resume_handle = &resume_handle;
r.out.services_returned = &services_returned;
- r.out.bytes_needed = &bytes_needed;
+ r.out.needed = &needed;
status = dcerpc_svcctl_EnumServicesStatusW(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "EnumServicesStatus failed!");
if (W_ERROR_EQUAL(r.out.result, WERR_MORE_DATA)) {
- r.in.buf_size = bytes_needed;
- r.out.service = talloc_array(tctx, uint8_t, bytes_needed);
+ r.in.offered = needed;
+ r.out.service = talloc_array(tctx, uint8_t, needed);
status = dcerpc_svcctl_EnumServicesStatusW(p, tctx, &r);
@@ -230,7 +230,7 @@ static bool test_EnumServicesStatus(struct torture_context *tctx, struct dcerpc_
DATA_BLOB blob;
struct ndr_pull *ndr;
- blob.length = r.in.buf_size;
+ blob.length = r.in.offered;
blob.data = talloc_steal(tctx, r.out.service);
ndr = ndr_pull_init_blob(&blob, tctx, lp_iconv_convenience(tctx->lp_ctx));