diff options
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r-- | librpc/gen_ndr/cli_svcctl.c | 152 | ||||
-rw-r--r-- | librpc/gen_ndr/cli_svcctl.h | 76 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_ntsvcs.c | 43 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_ntsvcs.h | 1 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_svcctl.c | 565 | ||||
-rw-r--r-- | librpc/gen_ndr/ntsvcs.h | 13 | ||||
-rw-r--r-- | librpc/gen_ndr/srv_svcctl.c | 144 | ||||
-rw-r--r-- | librpc/gen_ndr/svcctl.h | 78 |
8 files changed, 558 insertions, 514 deletions
diff --git a/librpc/gen_ndr/cli_svcctl.c b/librpc/gen_ndr/cli_svcctl.c index 4c013f52b3..f6cedfbc7c 100644 --- a/librpc/gen_ndr/cli_svcctl.c +++ b/librpc/gen_ndr/cli_svcctl.c @@ -189,8 +189,8 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t security_flags /* [in] */, - uint8_t *buffer /* [out] [ref,size_is(buffer_size)] */, - uint32_t buffer_size /* [in] [range(0,0x40000)] */, + uint8_t *buffer /* [out] [ref,size_is(offered)] */, + uint32_t offered /* [in] [range(0,0x40000)] */, uint32_t *needed /* [out] [ref,range(0,0x40000)] */, WERROR *werror) { @@ -200,7 +200,7 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, /* In parameters */ r.in.handle = handle; r.in.security_flags = security_flags; - r.in.buffer_size = buffer_size; + r.in.offered = offered; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &r); @@ -225,7 +225,7 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, } /* Return variables */ - memcpy(buffer, r.out.buffer, r.in.buffer_size * sizeof(*buffer)); + memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer)); *needed = *r.out.needed; /* Return result */ @@ -240,8 +240,8 @@ NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t security_flags /* [in] */, - uint8_t *buffer /* [in] [ref,size_is(buffer_size)] */, - uint32_t buffer_size /* [in] */, + uint8_t *buffer /* [in] [ref,size_is(offered)] */, + uint32_t offered /* [in] */, WERROR *werror) { struct svcctl_SetServiceObjectSecurity r; @@ -251,7 +251,7 @@ NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, r.in.handle = handle; r.in.security_flags = security_flags; r.in.buffer = buffer; - r.in.buffer_size = buffer_size; + r.in.offered = offered; if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r); @@ -647,10 +647,10 @@ NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, 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)] */, + enum svcctl_ServiceState state /* [in] */, + 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) { @@ -1288,10 +1288,10 @@ NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service /* [in] [ref] */, - uint32_t state /* [in] */, + enum svcctl_ServiceState 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..c656eba530 100644 --- a/librpc/gen_ndr/cli_svcctl.h +++ b/librpc/gen_ndr/cli_svcctl.h @@ -24,16 +24,16 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t security_flags /* [in] */, - uint8_t *buffer /* [out] [ref,size_is(buffer_size)] */, - uint32_t buffer_size /* [in] [range(0,0x40000)] */, + uint8_t *buffer /* [out] [ref,size_is(offered)] */, + uint32_t offered /* [in] [range(0,0x40000)] */, uint32_t *needed /* [out] [ref,range(0,0x40000)] */, WERROR *werror); NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t security_flags /* [in] */, - uint8_t *buffer /* [in] [ref,size_is(buffer_size)] */, - uint32_t buffer_size /* [in] */, + uint8_t *buffer /* [in] [ref,size_is(offered)] */, + uint32_t offered /* [in] */, WERROR *werror); NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, @@ -93,10 +93,10 @@ NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, 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)] */, + enum svcctl_ServiceState state /* [in] */, + 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, @@ -198,10 +198,10 @@ NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service /* [in] [ref] */, - uint32_t state /* [in] */, + enum svcctl_ServiceState 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_ntsvcs.c b/librpc/gen_ndr/ndr_ntsvcs.c index ef2ecc1d7d..d317c9f325 100644 --- a/librpc/gen_ndr/ndr_ntsvcs.c +++ b/librpc/gen_ndr/ndr_ntsvcs.c @@ -4,6 +4,37 @@ #include "../librpc/gen_ndr/ndr_ntsvcs.h" #include "librpc/gen_ndr/ndr_winreg.h" +static enum ndr_err_code ndr_push_PNP_GetIdListFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_PNP_GetIdListFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_PNP_GetIdListFlags(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "CM_GETIDLIST_FILTER_ENUMERATOR", CM_GETIDLIST_FILTER_ENUMERATOR, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "CM_GETIDLIST_FILTER_SERVICE", CM_GETIDLIST_FILTER_SERVICE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "CM_GETIDLIST_FILTER_EJECTRELATIONS", CM_GETIDLIST_FILTER_EJECTRELATIONS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "CM_GETIDLIST_FILTER_REMOVALRELATIONS", CM_GETIDLIST_FILTER_REMOVALRELATIONS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "CM_GETIDLIST_FILTER_POWERRELATIONS", CM_GETIDLIST_FILTER_POWERRELATIONS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "CM_GETIDLIST_FILTER_BUSRELATIONS", CM_GETIDLIST_FILTER_BUSRELATIONS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "CM_GETIDLIST_DONOTGENERATE", CM_GETIDLIST_DONOTGENERATE, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "CM_GETIDLIST_FILTER_TRANSPORTRELATIONS", CM_GETIDLIST_FILTER_TRANSPORTRELATIONS, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "CM_GETIDLIST_FILTER_PRESENT", CM_GETIDLIST_FILTER_PRESENT, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "CM_GETIDLIST_FILTER_CLASS", CM_GETIDLIST_FILTER_CLASS, r); + ndr->depth--; +} + static enum ndr_err_code ndr_push_PNP_HwProfInfo(struct ndr_push *ndr, int ndr_flags, const struct PNP_HwProfInfo *r) { uint32_t cntr_friendly_name_0; @@ -522,7 +553,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int fl return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_PNP_GetIdListFlags(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { if (r->out.buffer == NULL) { @@ -578,7 +609,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceList(struct ndr_pull *ndr, int fl NDR_PULL_SET_MEM_CTX(ndr, r->in.length, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.length)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_PNP_GetIdListFlags(ndr, NDR_SCALARS, &r->in.flags)); NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.length); memset(r->out.buffer, 0, (*r->in.length) * sizeof(*r->out.buffer)); NDR_PULL_ALLOC(ndr, r->out.length); @@ -638,7 +669,7 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_uint32(ndr, "length", *r->in.length); ndr->depth--; - ndr_print_uint32(ndr, "flags", r->in.flags); + ndr_print_PNP_GetIdListFlags(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { @@ -677,7 +708,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceListSize(struct ndr_push *ndr, in NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicename, CH_UTF16))); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicename, ndr_charset_length(r->in.devicename, CH_UTF16), sizeof(uint16_t), CH_UTF16)); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags)); + NDR_CHECK(ndr_push_PNP_GetIdListFlags(ndr, NDR_SCALARS, r->in.flags)); } if (flags & NDR_OUT) { if (r->out.size == NULL) { @@ -715,7 +746,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceListSize(struct ndr_pull *ndr, in NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicename, ndr_get_array_length(ndr, &r->in.devicename), sizeof(uint16_t), CH_UTF16)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devicename_0, 0); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); + NDR_CHECK(ndr_pull_PNP_GetIdListFlags(ndr, NDR_SCALARS, &r->in.flags)); NDR_PULL_ALLOC(ndr, r->out.size); ZERO_STRUCTP(r->out.size); } @@ -748,7 +779,7 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char ndr_print_string(ndr, "devicename", r->in.devicename); } ndr->depth--; - ndr_print_uint32(ndr, "flags", r->in.flags); + ndr_print_PNP_GetIdListFlags(ndr, "flags", r->in.flags); ndr->depth--; } if (flags & NDR_OUT) { diff --git a/librpc/gen_ndr/ndr_ntsvcs.h b/librpc/gen_ndr/ndr_ntsvcs.h index b70c383678..a5ad373a71 100644 --- a/librpc/gen_ndr/ndr_ntsvcs.h +++ b/librpc/gen_ndr/ndr_ntsvcs.h @@ -142,6 +142,7 @@ extern const struct ndr_interface_table ndr_table_ntsvcs; #define NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS (0x40) #define NDR_NTSVCS_CALL_COUNT (65) +void ndr_print_PNP_GetIdListFlags(struct ndr_print *ndr, const char *name, uint32_t r); void ndr_print_PNP_HwProfInfo(struct ndr_print *ndr, const char *name, const struct PNP_HwProfInfo *r); void ndr_print_PNP_Disconnect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Disconnect *r); void ndr_print_PNP_Connect(struct ndr_print *ndr, const char *name, int flags, const struct PNP_Connect *r); diff --git a/librpc/gen_ndr/ndr_svcctl.c b/librpc/gen_ndr/ndr_svcctl.c index 6101b7da87..ee828ee49d 100644 --- a/librpc/gen_ndr/ndr_svcctl.c +++ b/librpc/gen_ndr/ndr_svcctl.c @@ -120,7 +120,6 @@ _PUBLIC_ void ndr_print_svcctl_ControlsAccepted(struct ndr_print *ndr, const cha { ndr_print_uint32(ndr, name, r); ndr->depth++; - ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_NONE", SVCCTL_ACCEPT_NONE, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_STOP", SVCCTL_ACCEPT_STOP, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PAUSE_CONTINUE", SVCCTL_ACCEPT_PAUSE_CONTINUE, r); ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_SHUTDOWN", SVCCTL_ACCEPT_SHUTDOWN, r); @@ -1593,15 +1592,15 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_p 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.security_flags)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size)); + NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags)); + 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.buffer_size)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buffer_size)); + 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"); } @@ -1625,13 +1624,13 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_p 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.security_flags)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_size)); - if (r->in.buffer_size > 0x40000) { + NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags)); + 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.buffer, r->in.buffer_size); - memset(r->out.buffer, 0, (r->in.buffer_size) * sizeof(*r->out.buffer)); + 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); } @@ -1653,7 +1652,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_p 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.buffer_size)); + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered)); } } return NDR_ERR_SUCCESS; @@ -1673,8 +1672,8 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, ndr->depth++; ndr_print_policy_handle(ndr, "handle", r->in.handle); ndr->depth--; - ndr_print_uint32(ndr, "security_flags", r->in.security_flags); - ndr_print_uint32(ndr, "buffer_size", r->in.buffer_size); + ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags); + ndr_print_uint32(ndr, "offered", r->in.offered); ndr->depth--; } if (flags & NDR_OUT) { @@ -1682,7 +1681,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, ndr->depth++; ndr_print_ptr(ndr, "buffer", r->out.buffer); ndr->depth++; - ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buffer_size); + ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered); ndr->depth--; ndr_print_ptr(ndr, "needed", r->out.needed); ndr->depth++; @@ -1701,13 +1700,13 @@ static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_pus 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.security_flags)); + NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags)); if (r->in.buffer == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.buffer_size)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buffer_size)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered)); } if (flags & NDR_OUT) { NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); @@ -1726,15 +1725,15 @@ static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pul 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.security_flags)); + NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags)); NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer)); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)); } NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer))); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_size)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); if (r->in.buffer) { - NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.buffer_size)); + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.offered)); } } if (flags & NDR_OUT) { @@ -1757,12 +1756,12 @@ _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, c ndr->depth++; ndr_print_policy_handle(ndr, "handle", r->in.handle); ndr->depth--; - ndr_print_uint32(ndr, "security_flags", r->in.security_flags); + ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags); ndr_print_ptr(ndr, "buffer", r->in.buffer); ndr->depth++; - ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.buffer_size); + ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered); ndr->depth--; - ndr_print_uint32(ndr, "buffer_size", r->in.buffer_size); + ndr_print_uint32(ndr, "offered", r->in.offered); ndr->depth--; } if (flags & NDR_OUT) { @@ -2690,19 +2689,19 @@ static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(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.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_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state)); + 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"); } @@ -2715,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,15 +2726,15 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC); 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_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state)); + 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); } @@ -2746,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); } @@ -2767,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,8 +2786,8 @@ _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, con ndr->depth++; 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_svcctl_ServiceState(ndr, "state", r->in.state); + ndr_print_uint32(ndr, "offered", r->in.offered); ndr->depth--; } if (flags & NDR_OUT) { @@ -2796,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++; @@ -2821,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)); @@ -2831,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"); } @@ -2854,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) { @@ -2869,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)); @@ -2885,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); } @@ -2899,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); } @@ -2932,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; @@ -2954,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) { @@ -2968,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++; @@ -3219,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; @@ -3239,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); @@ -3250,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) { @@ -3268,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; @@ -3296,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) { @@ -3306,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--; @@ -3323,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; @@ -3343,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); @@ -3354,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) { @@ -3369,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; @@ -3394,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) { @@ -3404,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,18 +4561,18 @@ static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesA(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.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_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state)); + 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"); } @@ -4588,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,10 +4599,10 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC); 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_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state)); + 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); } @@ -4621,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,8 +4652,8 @@ _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, con ndr->depth++; 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_svcctl_ServiceState(ndr, "state", r->in.state); + ndr_print_uint32(ndr, "offered", r->in.offered); ndr->depth--; } if (flags & NDR_OUT) { @@ -4666,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++; @@ -4689,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"); } @@ -4719,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) { @@ -4734,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); @@ -4747,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); } @@ -4757,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); } @@ -4784,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; @@ -4806,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) { @@ -4818,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++; @@ -5069,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; @@ -5085,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); @@ -5096,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; @@ -5129,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--; @@ -5153,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; @@ -5173,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); @@ -5184,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) { @@ -5199,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; @@ -5224,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) { @@ -5234,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--; @@ -5967,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; @@ -5983,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); @@ -5995,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; @@ -6029,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--; @@ -6054,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; @@ -6074,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); @@ -6086,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)); @@ -6102,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; @@ -6134,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) { @@ -6142,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--; @@ -6162,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; @@ -6182,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); @@ -6194,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)); @@ -6210,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; @@ -6242,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) { @@ -6250,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--; @@ -6272,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"); } @@ -6312,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; @@ -6330,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); @@ -6343,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); } @@ -6425,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) { @@ -6437,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++; @@ -6477,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)); @@ -6494,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"); } @@ -6518,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; @@ -6535,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)); @@ -6572,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); } @@ -6586,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); } @@ -6622,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; @@ -6645,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) { @@ -6665,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/ntsvcs.h b/librpc/gen_ndr/ntsvcs.h index 804c452816..f59fcae2e7 100644 --- a/librpc/gen_ndr/ntsvcs.h +++ b/librpc/gen_ndr/ntsvcs.h @@ -8,7 +8,20 @@ #ifndef _HEADER_ntsvcs #define _HEADER_ntsvcs +#define CM_GETIDLIST_FILTER_NONE ( 0x00000000 ) #define DEV_REGPROP_DESC ( 1 ) +/* bitmap PNP_GetIdListFlags */ +#define CM_GETIDLIST_FILTER_ENUMERATOR ( 0x00000001 ) +#define CM_GETIDLIST_FILTER_SERVICE ( 0x00000002 ) +#define CM_GETIDLIST_FILTER_EJECTRELATIONS ( 0x00000004 ) +#define CM_GETIDLIST_FILTER_REMOVALRELATIONS ( 0x00000008 ) +#define CM_GETIDLIST_FILTER_POWERRELATIONS ( 0x00000010 ) +#define CM_GETIDLIST_FILTER_BUSRELATIONS ( 0x00000020 ) +#define CM_GETIDLIST_DONOTGENERATE ( 0x10000040 ) +#define CM_GETIDLIST_FILTER_TRANSPORTRELATIONS ( 0x00000080 ) +#define CM_GETIDLIST_FILTER_PRESENT ( 0x00000100 ) +#define CM_GETIDLIST_FILTER_CLASS ( 0x00000200 ) + struct PNP_HwProfInfo { uint32_t profile_handle; uint16_t friendly_name[80]; diff --git a/librpc/gen_ndr/srv_svcctl.c b/librpc/gen_ndr/srv_svcctl.c index bf8689907b..cd5a0eec65 100644 --- a/librpc/gen_ndr/srv_svcctl.c +++ b/librpc/gen_ndr/srv_svcctl.c @@ -353,7 +353,7 @@ static bool api_svcctl_QueryServiceObjectSecurity(pipes_struct *p) } ZERO_STRUCT(r->out); - r->out.buffer = talloc_zero_array(r, uint8_t, r->in.buffer_size); + r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered); if (r->out.buffer == NULL) { talloc_free(r); return false; @@ -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; } @@ -3658,7 +3658,7 @@ NTSTATUS rpc_svcctl_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, c case NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY: { struct svcctl_QueryServiceObjectSecurity *r = (struct svcctl_QueryServiceObjectSecurity *)_r; ZERO_STRUCT(r->out); - r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.buffer_size); + r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered); if (r->out.buffer == NULL) { return NT_STATUS_NO_MEMORY; } @@ -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 6ba0e4f378..c0daab43d5 100644 --- a/librpc/gen_ndr/svcctl.h +++ b/librpc/gen_ndr/svcctl.h @@ -9,6 +9,7 @@ #ifndef _HEADER_svcctl #define _HEADER_svcctl +#define SVCCTL_ACCEPT_NONE ( 0x00000000 ) #define SERVICE_TYPE_KERNEL_DRIVER ( 0x01 ) #define SERVICE_TYPE_FS_DRIVER ( 0x02 ) #define SERVICE_TYPE_ADAPTER ( 0x04 ) @@ -59,7 +60,6 @@ enum svcctl_ServiceStatus ; /* bitmap svcctl_ControlsAccepted */ -#define SVCCTL_ACCEPT_NONE ( 0x00000000 ) #define SVCCTL_ACCEPT_STOP ( 0x00000001 ) #define SVCCTL_ACCEPT_PAUSE_CONTINUE ( 0x00000002 ) #define SVCCTL_ACCEPT_SHUTDOWN ( 0x00000004 ) @@ -341,11 +341,11 @@ struct svcctl_QueryServiceObjectSecurity { struct { struct policy_handle *handle;/* [ref] */ uint32_t security_flags; - uint32_t buffer_size;/* [range(0,0x40000)] */ + uint32_t offered;/* [range(0,0x40000)] */ } in; struct { - uint8_t *buffer;/* [ref,size_is(buffer_size)] */ + uint8_t *buffer;/* [ref,size_is(offered)] */ uint32_t *needed;/* [ref,range(0,0x40000)] */ WERROR result; } out; @@ -357,8 +357,8 @@ struct svcctl_SetServiceObjectSecurity { struct { struct policy_handle *handle;/* [ref] */ uint32_t security_flags; - uint8_t *buffer;/* [ref,size_is(buffer_size)] */ - uint32_t buffer_size; + uint8_t *buffer;/* [ref,size_is(offered)] */ + uint32_t offered; } in; struct { @@ -478,13 +478,13 @@ struct svcctl_CreateServiceW { struct svcctl_EnumDependentServicesW { struct { struct policy_handle *service;/* [ref] */ - uint32_t state; - uint32_t buf_size;/* [range(0,0x40000)] */ + enum svcctl_ServiceState state; + 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; @@ -682,13 +682,13 @@ struct svcctl_CreateServiceA { struct svcctl_EnumDependentServicesA { struct { struct policy_handle *service;/* [ref] */ - uint32_t state; - uint32_t buf_size; + enum svcctl_ServiceState state; + 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; |