idl: some lsa vars are uint3264
[ira/wip.git] / librpc / idl / lsa.idl
index db5ca3172044ad76ad30c0dc3d8f2b02f9cd7b48..58e0ea9e26cc2371e5f2f3426c668a9af6824009 100644 (file)
@@ -113,14 +113,14 @@ import "misc.idl", "security.idl";
        /******************/
        /* Function: 0x06 */
        typedef struct {
-               uint32  len; /* ignored */
+               uint3264  len; /* ignored */
                uint16  impersonation_level;
                uint8   context_mode;
                uint8   effective_only;
        } lsa_QosInfo;
 
        typedef struct {
-               uint32 len; /* ignored */
+               uint3264 len; /* ignored */
                uint8 *root_dir;
                [string,charset(UTF16)] uint16 *object_name;
                uint32 attributes;
@@ -140,9 +140,89 @@ import "misc.idl", "security.idl";
                LSA_POLICY_SET_AUDIT_REQUIREMENTS       = 0x00000100,
                LSA_POLICY_AUDIT_LOG_ADMIN              = 0x00000200,
                LSA_POLICY_SERVER_ADMIN                 = 0x00000400,
-               LSA_POLICY_LOOKUP_NAMES                 = 0x00000800
+               LSA_POLICY_LOOKUP_NAMES                 = 0x00000800,
+               LSA_POLICY_NOTIFICATION                 = 0x00001000
        } lsa_PolicyAccessMask;
 
+       const int LSA_POLICY_ALL_ACCESS =
+               (STANDARD_RIGHTS_REQUIRED_ACCESS        |
+               LSA_POLICY_VIEW_LOCAL_INFORMATION       |
+               LSA_POLICY_VIEW_AUDIT_INFORMATION       |
+               LSA_POLICY_GET_PRIVATE_INFORMATION      |
+               LSA_POLICY_TRUST_ADMIN                  |
+               LSA_POLICY_CREATE_ACCOUNT               |
+               LSA_POLICY_CREATE_SECRET                |
+               LSA_POLICY_CREATE_PRIVILEGE             |
+               LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS     |
+               LSA_POLICY_SET_AUDIT_REQUIREMENTS       |
+               LSA_POLICY_AUDIT_LOG_ADMIN              |
+               LSA_POLICY_SERVER_ADMIN                 |
+               LSA_POLICY_LOOKUP_NAMES);
+
+       const int LSA_POLICY_READ =
+               (STANDARD_RIGHTS_READ_ACCESS            |
+               LSA_POLICY_VIEW_LOCAL_INFORMATION       |
+               LSA_POLICY_VIEW_AUDIT_INFORMATION       |
+               LSA_POLICY_GET_PRIVATE_INFORMATION);
+
+       const int LSA_POLICY_WRITE =
+               (STANDARD_RIGHTS_READ_ACCESS            |
+               LSA_POLICY_TRUST_ADMIN                  |
+               LSA_POLICY_CREATE_ACCOUNT               |
+               LSA_POLICY_CREATE_SECRET                |
+               LSA_POLICY_CREATE_PRIVILEGE             |
+               LSA_POLICY_SET_DEFAULT_QUOTA_LIMITS     |
+               LSA_POLICY_SET_AUDIT_REQUIREMENTS       |
+               LSA_POLICY_AUDIT_LOG_ADMIN              |
+               LSA_POLICY_SERVER_ADMIN);
+
+       const int LSA_POLICY_EXECUTE =
+               (STANDARD_RIGHTS_EXECUTE_ACCESS         |
+               LSA_POLICY_VIEW_LOCAL_INFORMATION       |
+               LSA_POLICY_LOOKUP_NAMES);
+
+       typedef [public,bitmap32bit] bitmap {
+               LSA_ACCOUNT_VIEW                        = 0x00000001,
+               LSA_ACCOUNT_ADJUST_PRIVILEGES           = 0x00000002,
+               LSA_ACCOUNT_ADJUST_QUOTAS               = 0x00000004,
+               LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS        = 0x00000008
+       } lsa_AccountAccessMask;
+
+       const int LSA_ACCOUNT_ALL_ACCESS =
+               (STANDARD_RIGHTS_REQUIRED_ACCESS        |
+               LSA_ACCOUNT_VIEW                        |
+               LSA_ACCOUNT_ADJUST_PRIVILEGES           |
+               LSA_ACCOUNT_ADJUST_QUOTAS               |
+               LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS);
+
+       const int LSA_ACCOUNT_READ =
+               (STANDARD_RIGHTS_READ_ACCESS            |
+               LSA_ACCOUNT_VIEW);
+
+       const int LSA_ACCOUNT_WRITE =
+               (STANDARD_RIGHTS_READ_ACCESS            |
+               LSA_ACCOUNT_ADJUST_PRIVILEGES           |
+               LSA_ACCOUNT_ADJUST_QUOTAS               |
+               LSA_ACCOUNT_ADJUST_SYSTEM_ACCESS);
+
+       const int LSA_ACCOUNT_EXECUTE =
+               (STANDARD_RIGHTS_EXECUTE_ACCESS);
+
+       typedef [public,bitmap32bit] bitmap {
+               LSA_SECRET_SET_VALUE                    = 0x00000001,
+               LSA_SECRET_QUERY_VALUE                  = 0x00000002
+       } lsa_SecretAccessMask;
+
+       typedef [public,bitmap32bit] bitmap {
+               LSA_TRUSTED_QUERY_DOMAIN_NAME           = 0x00000001,
+               LSA_TRUSTED_QUERY_CONTROLLERS           = 0x00000002,
+               LSA_TRUSTED_SET_CONTROLLERS             = 0x00000004,
+               LSA_TRUSTED_QUERY_POSIX                 = 0x00000008,
+               LSA_TRUSTED_SET_POSIX                   = 0x00000010,
+               LSA_TRUSTED_SET_AUTH                    = 0x00000020,
+               LSA_TRUSTED_QUERY_AUTH                  = 0x00000040
+       } lsa_TrustedAccessMask;
+
        /* notice the screwup with the system_name - thats why MS created
           OpenPolicy2 */
        [public] NTSTATUS lsa_OpenPolicy (
@@ -309,7 +389,7 @@ import "misc.idl", "security.idl";
        [public] NTSTATUS lsa_CreateAccount (
                [in]    policy_handle *handle,
                [in,ref] dom_sid2 *sid,
-               [in]    uint32 access_mask,
+               [in]    lsa_AccountAccessMask access_mask,
                [out]   policy_handle *acct_handle
                );
 
@@ -340,7 +420,7 @@ import "misc.idl", "security.idl";
        [public] NTSTATUS lsa_CreateTrustedDomain(
                [in]         policy_handle *policy_handle,
                [in]         lsa_DomainInfo *info,
-               [in]         uint32 access_mask,
+               [in]         lsa_TrustedAccessMask access_mask,
                [out]        policy_handle *trustdom_handle
                );
 
@@ -445,7 +525,7 @@ import "misc.idl", "security.idl";
                [in,ref]     lsa_SidArray *sids,
                [out,ref]    lsa_RefDomainList **domains,
                [in,out,ref] lsa_TransNameArray *names,
-               [in]         uint16 level,
+               [in]         lsa_LookupNamesLevel level,
                [in,out,ref] uint32 *count
                );
 
@@ -454,7 +534,7 @@ import "misc.idl", "security.idl";
        [public] NTSTATUS lsa_CreateSecret(
                [in]         policy_handle *handle,
                [in]         lsa_String       name,
-               [in]         uint32         access_mask,
+               [in]         lsa_SecretAccessMask access_mask,
                [out]        policy_handle *sec_handle
                );
 
@@ -464,7 +544,7 @@ import "misc.idl", "security.idl";
        NTSTATUS lsa_OpenAccount(
                [in]         policy_handle *handle,
                [in,ref]     dom_sid2 *sid,
-               [in]         uint32 access_mask,
+               [in]         lsa_AccountAccessMask access_mask,
                [out]        policy_handle *acct_handle
                );
 
@@ -530,26 +610,26 @@ import "misc.idl", "security.idl";
        /* Function:    0x17 */
        NTSTATUS lsa_GetSystemAccessAccount(
                [in]      policy_handle *handle,
-               [out,ref] uint32 *access_mask
+               [out,ref] lsa_AccountAccessMask *access_mask
                );
 
        /* Function:    0x18 */
        NTSTATUS lsa_SetSystemAccessAccount(
                [in] policy_handle *handle,
-               [in] uint32 access_mask
+               [in] lsa_AccountAccessMask access_mask
                );
 
        /* Function:        0x19 */
        NTSTATUS lsa_OpenTrustedDomain(
                [in]     policy_handle *handle,
                [in]     dom_sid2      *sid,
-               [in]     uint32         access_mask,
+               [in]     lsa_TrustedAccessMask access_mask,
                [out]    policy_handle *trustdom_handle
                );
 
        typedef [flag(NDR_PAHEX)] struct {
-               uint32 length;
-               uint32 size;
+               uint3264 length;
+               uint3264 size;
                [size_is(size),length_is(length)] uint8 *data;
        } lsa_DATA_BUF;
 
@@ -571,7 +651,7 @@ import "misc.idl", "security.idl";
                LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_INTERNAL    = 10,
                LSA_TRUSTED_DOMAIN_INFO_INFO_EX2_INTERNAL     = 11,
                LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL  = 12,
-               LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES = 13
+               LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES = 13
        } lsa_TrustDomInfoEnum;
 
        typedef [public,bitmap32bit] bitmap {
@@ -708,7 +788,7 @@ import "misc.idl", "security.idl";
                        lsa_TrustDomainInfoInfoEx2Internal   info_ex2_internal;
                [case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO_2_INTERNAL)]
                        lsa_TrustDomainInfoFullInfo2Internal     full_info2_internal;
-               [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRTYPION_TYPES)]
+               [case(LSA_TRUSTED_DOMAIN_SUPPORTED_ENCRYPTION_TYPES)]
                        lsa_TrustDomainInfoSupportedEncTypes enc_types;
        } lsa_TrustedDomainInfo;
 
@@ -730,7 +810,7 @@ import "misc.idl", "security.idl";
        [public] NTSTATUS lsa_OpenSecret(
                [in]     policy_handle    *handle,
                [in]         lsa_String        name,
-               [in]         uint32            access_mask,
+               [in]     lsa_SecretAccessMask access_mask,
                [out]    policy_handle    *sec_handle
                );
 
@@ -855,10 +935,18 @@ import "misc.idl", "security.idl";
        );
 
        /* Function:       0x2a */
-       [todo] NTSTATUS lsa_StorePrivateData();
-       /* Function:        0x2b */
-       [todo] NTSTATUS lsa_RetrievePrivateData();
+       NTSTATUS lsa_StorePrivateData(
+               [in]            policy_handle   *handle,
+               [in,ref]        lsa_String      *name,
+               [in,unique]     lsa_DATA_BUF    *val
+       );
 
+       /* Function:        0x2b */
+       NTSTATUS lsa_RetrievePrivateData(
+               [in]            policy_handle   *handle,
+               [in,ref]        lsa_String      *name,
+               [in,out,ref]    lsa_DATA_BUF    **val
+       );
 
        /**********************/
        /* Function:     0x2c */
@@ -1011,15 +1099,25 @@ import "misc.idl", "security.idl";
                [size_is(count)] lsa_TranslatedName2 *names;
        } lsa_TransNameArray2;
 
+       typedef [v1_enum] enum {
+               LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES         = 0x00000000,
+               LSA_LOOKUP_OPTION_SEARCH_ISOLATED_NAMES_LOCAL   = 0x80000000
+       } lsa_LookupOptions;
+
+       typedef [v1_enum] enum {
+               LSA_CLIENT_REVISION_1   = 0x00000001,
+               LSA_CLIENT_REVISION_2   = 0x00000002
+       } lsa_ClientRevision;
+
        [public] NTSTATUS lsa_LookupSids2(
                [in]     policy_handle *handle,
                [in,ref] lsa_SidArray *sids,
                [out,ref]    lsa_RefDomainList **domains,
                [in,out,ref] lsa_TransNameArray2 *names,
-               [in]         uint16 level,
+               [in]         lsa_LookupNamesLevel level,
                [in,out,ref] uint32 *count,
-               [in]         uint32 unknown1,
-               [in]         uint32 unknown2
+               [in]         lsa_LookupOptions lookup_options,
+               [in]         lsa_ClientRevision client_revision
                );
 
        /**********************/
@@ -1045,8 +1143,8 @@ import "misc.idl", "security.idl";
                [in,out,ref] lsa_TransSidArray2 *sids,
                [in]         lsa_LookupNamesLevel level,
                [in,out,ref] uint32 *count,
-               [in]         uint32 lookup_options,
-               [in]         uint32 client_revision /* LSA_CLIENT_REVISION* */
+               [in]         lsa_LookupOptions lookup_options,
+               [in]         lsa_ClientRevision client_revision
                );
 
        /* Function 0x3b */
@@ -1104,8 +1202,8 @@ import "misc.idl", "security.idl";
                [in,out,ref] lsa_TransSidArray3 *sids,
                [in]         lsa_LookupNamesLevel level,
                [in,out,ref] uint32 *count,
-               [in]         uint32 lookup_options,
-               [in]         uint32 client_revision /* LSA_CLIENT_REVISION* */
+               [in]         lsa_LookupOptions lookup_options,
+               [in]         lsa_ClientRevision client_revision
                );
 
        /* Function 0x45 */
@@ -1122,7 +1220,7 @@ import "misc.idl", "security.idl";
 
        /* Function 0x49 */
        typedef struct {
-               [range(0,131072)] uint32 length;
+               [range(0,131072)] uint3264 length;
                [size_is(length)] uint8 *data;
        } lsa_ForestTrustBinaryData;
 
@@ -1178,10 +1276,10 @@ import "misc.idl", "security.idl";
                [in,ref]     lsa_SidArray *sids,
                [out,ref]    lsa_RefDomainList **domains,
                [in,out,ref] lsa_TransNameArray2 *names,
-               [in]         uint16 level,
+               [in]         lsa_LookupNamesLevel level,
                [in,out,ref] uint32 *count,
-               [in]         uint32 unknown1,
-               [in]         uint32 unknown2
+               [in]         lsa_LookupOptions lookup_options,
+               [in]         lsa_ClientRevision client_revision
                );
 
        const int LSA_CLIENT_REVISION_NO_DNS     = 0x00000001;
@@ -1197,8 +1295,8 @@ import "misc.idl", "security.idl";
                [in,out,ref] lsa_TransSidArray3 *sids,
                [in]         lsa_LookupNamesLevel level,
                [in,out,ref] uint32 *count,
-               [in]         uint32 lookup_options,
-               [in]         uint32 client_revision /* LSA_CLIENT_REVISION* */
+               [in]         lsa_LookupOptions lookup_options,
+               [in]         lsa_ClientRevision client_revision
                );
 
        /* Function 0x4e */