libcli/security Rename all privilege bitmaps constants
[sfrench/samba-autobuild/.git] / librpc / idl / svcctl.idl
index 4b66d9cc5dccf26646415e5247c647b7e08ca5a8..19866d273f4350fe85976c2b4dbe37d193468c0d 100644 (file)
@@ -156,9 +156,9 @@ import "misc.idl", "security.idl";
        /* Function 0x04 */
        WERROR svcctl_QueryServiceObjectSecurity(
                [in] policy_handle *handle,
-               [in] uint32 security_flags,
-               [out,ref,size_is(buffer_size)] uint8 *buffer,
-               [in,range(0,0x40000)] uint32 buffer_size,
+               [in] security_secinfo security_flags,
+               [out,ref,size_is(offered)] uint8 *buffer,
+               [in,range(0,0x40000)] uint32 offered,
                [out,ref,range(0,0x40000)] uint32 *needed
        );
 
@@ -166,9 +166,9 @@ import "misc.idl", "security.idl";
        /* Function 0x05 */
        WERROR svcctl_SetServiceObjectSecurity(
                [in] policy_handle *handle,
-               [in] uint32 security_flags,
-               [in,ref,size_is(buffer_size)] uint8 *buffer,
-               [in] uint32 buffer_size
+               [in] security_secinfo security_flags,
+               [in,ref,size_is(offered)] uint8 *buffer,
+               [in] uint32 offered
        );
 
        /*****************/
@@ -260,10 +260,10 @@ import "misc.idl", "security.idl";
        /* Function 0x0d */
        WERROR svcctl_EnumDependentServicesW(
                [in,ref] policy_handle *service,
-               [in] uint32 state,
-               [out,ref,size_is(buf_size)] uint8 *service_status,
-               [in,range(0,0x40000)] uint32 buf_size,
-               [out,ref,range(0,0x40000)] uint32 *bytes_needed,
+               [in] svcctl_ServiceState state,
+               [out,ref,size_is(offered)] uint8 *service_status,
+               [in,range(0,0x40000)] uint32 offered,
+               [out,ref,range(0,0x40000)] uint32 *needed,
                [out,ref,range(0,0x40000)] uint32 *services_returned
        );
 
@@ -280,9 +280,9 @@ import "misc.idl", "security.idl";
                [in,ref] policy_handle *handle,
                [in] uint32 type,
                [in] svcctl_ServiceState state,
-               [out,ref,size_is(buf_size)] uint8 *service,
-               [in] [range(0,0x40000)] uint32 buf_size,
-               [out,ref] [range(0,0x40000)] uint32 *bytes_needed,
+               [out,ref,size_is(offered)] uint8 *service,
+               [in] [range(0,0x40000)] uint32 offered,
+               [out,ref] [range(0,0x40000)] uint32 *needed,
                [out,ref] [range(0,0x40000)] uint32 *services_returned,
                [in,out,unique] uint32 *resume_handle
        );
@@ -389,25 +389,33 @@ import "misc.idl", "security.idl";
        WERROR svcctl_QueryServiceConfigW(
                [in,ref] policy_handle *handle,
                [out] QUERY_SERVICE_CONFIG *query,
-               [in] [range(0,8192)] uint32 buf_size,
-               [out,ref] [range(0,8192)] uint32 *bytes_needed
+               [in] [range(0,8192)] uint32 offered,
+               [out,ref] [range(0,8192)] uint32 *needed
        );
 
        /*****************/
        /* Function 0x12 */
        WERROR svcctl_QueryServiceLockStatusW(
                [in,ref] policy_handle *handle,
-               [in] uint32 buf_size,
+               [in] uint32 offered,
                [out,ref] SERVICE_LOCK_STATUS *lock_status,
-               [out,ref] uint32 *required_buf_size
+               [out,ref] uint32 *needed
        );
 
        /*****************/
        /* Function 0x13 */
+
+       const int SC_MAX_ARGUMENT_LENGTH = 1024;
+       const int SC_MAX_ARGUMENTS = 1024;
+
+       typedef struct {
+               [string,charset(UTF16),range(0,SC_MAX_ARGUMENT_LENGTH)] uint16 *string;
+       } svcctl_ArgumentString;
+
        WERROR svcctl_StartServiceW(
                [in,ref] policy_handle *handle,
-               [in] uint32 NumArgs,
-               [in,unique/*FIXME:,length_is(NumArgs)*/] [string,charset(UTF16)] uint16 *Arguments
+               [in,range(0,SC_MAX_ARGUMENTS)] uint32 NumArgs,
+               [in,unique,size_is(NumArgs)] svcctl_ArgumentString *Arguments
        );
 
        /*****************/
@@ -475,10 +483,10 @@ import "misc.idl", "security.idl";
        /* Function 0x19 */
        WERROR svcctl_EnumDependentServicesA(
                [in,ref] policy_handle *service,
-               [in] uint32 state,
+               [in] svcctl_ServiceState state,
                [out,unique] ENUM_SERVICE_STATUSA *service_status,
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed,
+               [in] uint32 offered,
+               [out,ref] uint32 *needed,
                [out,ref] uint32 *services_returned
        );
 
@@ -488,9 +496,9 @@ import "misc.idl", "security.idl";
                [in,ref] policy_handle *handle,
                [in] uint32 type,
                [in] svcctl_ServiceState state,
-               [in] uint32 buf_size,
-               [out,size_is(buf_size)] uint8 service[*],
-               [out,ref] uint32 *bytes_needed,
+               [in] uint32 offered,
+               [out,size_is(offered)] uint8 service[*],
+               [out,ref] uint32 *needed,
                [out,ref] uint32 *services_returned,
                [in,out,unique] uint32 *resume_handle
        );
@@ -516,18 +524,18 @@ import "misc.idl", "security.idl";
        /* Function 0x1d */
        WERROR svcctl_QueryServiceConfigA(
                [in,ref] policy_handle *handle,
-               [out] uint8 query[buf_size], /*QUERYU_SERVICE_CONFIG */
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed
+               [out] uint8 query[offered], /*QUERYU_SERVICE_CONFIG */
+               [in] uint32 offered,
+               [out,ref] uint32 *needed
        );
 
        /*****************/
        /* Function 0x1e */
        WERROR svcctl_QueryServiceLockStatusA(
                [in,ref] policy_handle *handle,
-               [in] uint32 buf_size,
+               [in] uint32 offered,
                [out,ref] SERVICE_LOCK_STATUS *lock_status,
-               [out,ref] uint32 *required_buf_size
+               [out,ref] uint32 *needed
        );
 
        /*****************/
@@ -617,9 +625,9 @@ import "misc.idl", "security.idl";
        WERROR svcctl_QueryServiceConfig2A(
                [in,ref] policy_handle *handle,
                [in] svcctl_ConfigLevel info_level,
-               [out] uint8 buffer[buf_size],
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed
+               [out] uint8 buffer[offered],
+               [in] uint32 offered,
+               [out,ref] uint32 *needed
        );
 
        /*****************/
@@ -627,9 +635,9 @@ import "misc.idl", "security.idl";
        WERROR svcctl_QueryServiceConfig2W(
                [in,ref] policy_handle *handle,
                [in] svcctl_ConfigLevel info_level,
-               [out,ref,size_is(buf_size)] uint8 *buffer,
-               [in] [range(0,8192)] uint32 buf_size,
-               [out,ref] [range(0,8192)] uint32 *bytes_needed
+               [out,ref,size_is(offered)] uint8 *buffer,
+               [in] [range(0,8192)] uint32 offered,
+               [out,ref] [range(0,8192)] uint32 *needed
        );
 
        /*****************/
@@ -642,9 +650,9 @@ import "misc.idl", "security.idl";
        WERROR svcctl_QueryServiceStatusEx(
                [in,ref] policy_handle *handle,
                [in] svcctl_StatusLevel info_level,
-               [out,ref,size_is(buf_size)] uint8 *buffer,
-               [in] [range(0,8192)] uint32 buf_size,
-               [out,ref] [range(0,8192)] uint32 *bytes_needed
+               [out,ref,size_is(offered)] uint8 *buffer,
+               [in] [range(0,8192)] uint32 offered,
+               [out,ref] [range(0,8192)] uint32 *needed
        );
 
        /*****************/
@@ -654,9 +662,9 @@ import "misc.idl", "security.idl";
                [in] uint32 info_level,
                [in] uint32 type,
                [in] svcctl_ServiceState state,
-               [out] uint8 services[buf_size],
-               [in] uint32 buf_size,
-               [out,ref] uint32 *bytes_needed,
+               [out] uint8 services[offered],
+               [in] uint32 offered,
+               [out,ref] uint32 *needed,
                [out,ref] uint32 *service_returned,
                [in,out,unique] uint32 *resume_handle,
                [out,ref] [string,charset(UTF16)] uint16 **group_name
@@ -669,9 +677,9 @@ import "misc.idl", "security.idl";
                [in] uint32 info_level,
                [in] uint32 type,
                [in] svcctl_ServiceState state,
-               [out,ref,size_is(buf_size)] uint8 *services,
-               [in] [range(0,0x40000)] uint32 buf_size,
-               [out,ref] [range(0,0x40000)] uint32 *bytes_needed,
+               [out,ref,size_is(offered)] uint8 *services,
+               [in] [range(0,0x40000)] uint32 offered,
+               [out,ref] [range(0,0x40000)] uint32 *needed,
                [out,ref] [range(0,0x40000)] uint32 *service_returned,
                [in,out,unique] [range(0,0x40000)] uint32 *resume_handle,
                [in,unique] [string,charset(UTF16)] uint16 *group_name