Remove c++-style comment.
[wine] / include / ntsecapi.h
1 /*
2  * Copyright (C) 1999 Juergen Schmied
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_NTSECAPI_H
20 #define __WINE_NTSECAPI_H
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* defined(__cplusplus) */
25
26 /* Policy access rights */
27 #define POLICY_VIEW_LOCAL_INFORMATION           0x00000001L
28 #define POLICY_VIEW_AUDIT_INFORMATION           0x00000002L
29 #define POLICY_GET_PRIVATE_INFORMATION          0x00000004L
30 #define POLICY_TRUST_ADMIN                      0x00000008L
31 #define POLICY_CREATE_ACCOUNT                   0x00000010L
32 #define POLICY_CREATE_SECRET                    0x00000020L
33 #define POLICY_CREATE_PRIVILEGE                 0x00000040L
34 #define POLICY_SET_DEFAULT_QUOTA_LIMITS         0x00000080L
35 #define POLICY_SET_AUDIT_REQUIREMENTS           0x00000100L
36 #define POLICY_AUDIT_LOG_ADMIN                  0x00000200L
37 #define POLICY_SERVER_ADMIN                     0x00000400L
38 #define POLICY_LOOKUP_NAMES                     0x00000800L
39 #define POLICY_NOTIFICATION                     0x00001000L
40
41 #define POLICY_ALL_ACCESS                       ( \
42     STANDARD_RIGHTS_REQUIRED | \
43     POLICY_VIEW_LOCAL_INFORMATION | \
44     POLICY_VIEW_AUDIT_INFORMATION | \
45     POLICY_GET_PRIVATE_INFORMATION | \
46     POLICY_TRUST_ADMIN | \
47     POLICY_CREATE_ACCOUNT | \
48     POLICY_CREATE_SECRET | \
49     POLICY_CREATE_PRIVILEGE | \
50     POLICY_SET_DEFAULT_QUOTA_LIMITS | \
51     POLICY_SET_AUDIT_REQUIREMENTS | \
52     POLICY_AUDIT_LOG_ADMIN | \
53     POLICY_SERVER_ADMIN | \
54     POLICY_LOOKUP_NAMES)
55
56
57 #define POLICY_READ                             ( \
58     STANDARD_RIGHTS_READ | \
59     POLICY_VIEW_AUDIT_INFORMATION | \
60     POLICY_GET_PRIVATE_INFORMATION)
61
62 #define POLICY_WRITE                            ( \
63    STANDARD_RIGHTS_WRITE | \
64    POLICY_TRUST_ADMIN | \
65    POLICY_CREATE_ACCOUNT | \
66    POLICY_CREATE_SECRET | \
67    POLICY_CREATE_PRIVILEGE | \
68    POLICY_SET_DEFAULT_QUOTA_LIMITS | \
69    POLICY_SET_AUDIT_REQUIREMENTS | \
70    POLICY_AUDIT_LOG_ADMIN | \
71    POLICY_SERVER_ADMIN)
72
73 #define POLICY_EXECUTE                          ( \
74    STANDARD_RIGHTS_EXECUTE | \
75    POLICY_VIEW_LOCAL_INFORMATION | \
76    POLICY_LOOKUP_NAMES)
77
78 typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
79 typedef STRING LSA_STRING, *PLSA_STRING;
80 typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
81
82 typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
83
84 NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
85
86 typedef enum
87 {
88         PolicyAuditLogInformation = 1,
89         PolicyAuditEventsInformation,
90         PolicyPrimaryDomainInformation,
91         PolicyPdAccountInformation,
92         PolicyAccountDomainInformation,
93         PolicyLsaServerRoleInformation,
94         PolicyReplicaSourceInformation,
95         PolicyDefaultQuotaInformation,
96         PolicyModificationInformation,
97         PolicyAuditFullSetInformation,
98         PolicyAuditFullQueryInformation,
99         PolicyDnsDomainInformation
100 } POLICY_INFORMATION_CLASS, *PPOLICY_INFORMATION_CLASS;
101
102 typedef ULONG POLICY_AUDIT_EVENT_OPTIONS, *PPOLICY_AUDIT_EVENT_OPTIONS;
103
104 typedef struct _POLICY_AUDIT_EVENTS_INFO
105 {
106         BOOLEAN AuditingMode;
107         PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;
108         ULONG MaximumAuditEventCount;
109 } POLICY_AUDIT_EVENTS_INFO, *PPOLICY_AUDIT_EVENTS_INFO;
110
111 typedef struct _POLICY_PRIMARY_DOMAIN_INFO
112 {
113     LSA_UNICODE_STRING Name;
114     PSID Sid;
115 } POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
116
117 typedef struct _POLICY_ACCOUNT_DOMAIN_INFO
118 {
119     LSA_UNICODE_STRING DomainName;
120     PSID DomainSid;
121 } POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
122
123 typedef struct
124 {
125     SID_NAME_USE Use;
126     LSA_UNICODE_STRING Name;
127     LONG DomainIndex;
128 } LSA_TRANSLATED_NAME, *PLSA_TRANSLATED_NAME;
129
130 typedef struct
131 {
132     LSA_UNICODE_STRING Name;
133     PSID Sid;
134 } LSA_TRUST_INFORMATION, *PLSA_TRUST_INFORMATION;
135
136 typedef struct
137 {
138     ULONG Entries;
139     PLSA_TRUST_INFORMATION Domains;
140 } LSA_REFERENCED_DOMAIN_LIST, *PLSA_REFERENCED_DOMAIN_LIST;
141
142 NTSTATUS WINAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
143
144 NTSTATUS WINAPI LsaFreeMemory(PVOID);
145 NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle);
146 ULONG WINAPI LsaNtStatusToWinError(NTSTATUS Status);
147
148
149 #ifdef __cplusplus
150 } /* extern "C" */
151 #endif /* defined(__cplusplus) */
152
153 #endif /* !defined(__WINE_NTSECAPI_H) */