1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

svcctl: move SVC_STATUS_ to idl.

Guenther
This commit is contained in:
Günther Deschner 2008-11-14 11:58:12 +01:00
parent 61a23c5eea
commit 550c64bef9
7 changed files with 48 additions and 9 deletions

View File

@ -2026,7 +2026,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint32_t info_level /* [in] */,
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)] */,

View File

@ -299,7 +299,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint32_t info_level /* [in] */,
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)] */,

View File

@ -591,6 +591,30 @@ _PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG
return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG, ic);
}
static enum ndr_err_code ndr_push_svcctl_StatusLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_StatusLevel r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NDR_ERR_SUCCESS;
}
static enum ndr_err_code ndr_pull_svcctl_StatusLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_StatusLevel *r)
{
uint32_t v;
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
*r = v;
return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_svcctl_StatusLevel(struct ndr_print *ndr, const char *name, enum svcctl_StatusLevel r)
{
const char *val = NULL;
switch (r) {
case SVC_STATUS_PROCESS_INFO: val = "SVC_STATUS_PROCESS_INFO"; break;
}
ndr_print_enum(ndr, name, "ENUM", val, r);
}
static enum ndr_err_code ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
{
if (flags & NDR_IN) {
@ -5456,7 +5480,7 @@ static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *n
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.info_level));
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));
}
if (flags & NDR_OUT) {
@ -5488,7 +5512,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *n
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.info_level));
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 < 0 || r->in.buf_size > 8192) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
@ -5536,7 +5560,7 @@ _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
ndr_print_uint32(ndr, "info_level", r->in.info_level);
ndr_print_svcctl_StatusLevel(ndr, "info_level", r->in.info_level);
ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
ndr->depth--;
}

View File

@ -113,6 +113,7 @@ enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_fl
enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r);
void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r);
size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, struct smb_iconv_convenience *ic, int flags);
void ndr_print_svcctl_StatusLevel(struct ndr_print *ndr, const char *name, enum svcctl_StatusLevel r);
void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r);
void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r);
void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r);

View File

@ -128,6 +128,17 @@ struct QUERY_SERVICE_CONFIG {
const char *displayname;/* [unique,range(0,8192),charset(UTF16)] */
}/* [gensize,public] */;
enum svcctl_StatusLevel
#ifndef USE_UINT_ENUMS
{
SVC_STATUS_PROCESS_INFO=0x00000000
}
#else
{ __donnot_use_enum_svcctl_StatusLevel=0x7FFFFFFF}
#define SVC_STATUS_PROCESS_INFO ( 0x00000000 )
#endif
;
struct svcctl_CloseServiceHandle {
struct {
@ -744,7 +755,7 @@ struct svcctl_QueryServiceConfig2W {
struct svcctl_QueryServiceStatusEx {
struct {
struct policy_handle *handle;/* [ref] */
uint32_t info_level;
enum svcctl_StatusLevel info_level;
uint32_t buf_size;/* [range(0,8192)] */
} in;

View File

@ -548,9 +548,14 @@ import "misc.idl", "security.idl";
/*****************/
/* Function 0x28 */
typedef [v1_enum] enum {
SVC_STATUS_PROCESS_INFO = 0x00000000
} svcctl_StatusLevel;
WERROR svcctl_QueryServiceStatusEx(
[in,ref] policy_handle *handle,
[in] uint32 info_level,
[in] svcctl_StatusLevel info_level,
[out,ref,size_is(buf_size)] uint8 *buffer,
[in] [range(0,8192)] uint32 buf_size,
[out,ref] [range(0,8192)] uint32 *bytes_needed

View File

@ -107,8 +107,6 @@
#define SVC_HANDLE_IS_SERVICE 0x0000002
#define SVC_HANDLE_IS_DBLOCK 0x0000003
#define SVC_STATUS_PROCESS_INFO 0x00000000
/* utility structures for RPCs */
/*