Release 20030408.
[wine/gsoc-2012-control.git] / include / ntsecapi.h
blobb5e2b5c6866f0883e1bbda5d54fced3f49bbc0e0
1 /*
2 * Copyright (C) 1999 Juergen Schmied
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.
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.
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
19 #ifndef __WINE_NTSECAPI_H
20 #define __WINE_NTSECAPI_H
22 #include "winnt.h"
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
28 /* Policy access rights */
29 #define POLICY_VIEW_LOCAL_INFORMATION 0x00000001L
30 #define POLICY_VIEW_AUDIT_INFORMATION 0x00000002L
31 #define POLICY_GET_PRIVATE_INFORMATION 0x00000004L
32 #define POLICY_TRUST_ADMIN 0x00000008L
33 #define POLICY_CREATE_ACCOUNT 0x00000010L
34 #define POLICY_CREATE_SECRET 0x00000020L
35 #define POLICY_CREATE_PRIVILEGE 0x00000040L
36 #define POLICY_SET_DEFAULT_QUOTA_LIMITS 0x00000080L
37 #define POLICY_SET_AUDIT_REQUIREMENTS 0x00000100L
38 #define POLICY_AUDIT_LOG_ADMIN 0x00000200L
39 #define POLICY_SERVER_ADMIN 0x00000400L
40 #define POLICY_LOOKUP_NAMES 0x00000800L
41 #define POLICY_NOTIFICATION 0x00001000L
43 #define POLICY_ALL_ACCESS ( \
44 STANDARD_RIGHTS_REQUIRED | \
45 POLICY_VIEW_LOCAL_INFORMATION | \
46 POLICY_VIEW_AUDIT_INFORMATION | \
47 POLICY_GET_PRIVATE_INFORMATION | \
48 POLICY_TRUST_ADMIN | \
49 POLICY_CREATE_ACCOUNT | \
50 POLICY_CREATE_SECRET | \
51 POLICY_CREATE_PRIVILEGE | \
52 POLICY_SET_DEFAULT_QUOTA_LIMITS | \
53 POLICY_SET_AUDIT_REQUIREMENTS | \
54 POLICY_AUDIT_LOG_ADMIN | \
55 POLICY_SERVER_ADMIN | \
56 POLICY_LOOKUP_NAMES)
59 #define POLICY_READ ( \
60 STANDARD_RIGHTS_READ | \
61 POLICY_VIEW_AUDIT_INFORMATION | \
62 POLICY_GET_PRIVATE_INFORMATION)
64 #define POLICY_WRITE ( \
65 STANDARD_RIGHTS_WRITE | \
66 POLICY_TRUST_ADMIN | \
67 POLICY_CREATE_ACCOUNT | \
68 POLICY_CREATE_SECRET | \
69 POLICY_CREATE_PRIVILEGE | \
70 POLICY_SET_DEFAULT_QUOTA_LIMITS | \
71 POLICY_SET_AUDIT_REQUIREMENTS | \
72 POLICY_AUDIT_LOG_ADMIN | \
73 POLICY_SERVER_ADMIN)
75 #define POLICY_EXECUTE ( \
76 STANDARD_RIGHTS_EXECUTE | \
77 POLICY_VIEW_LOCAL_INFORMATION | \
78 POLICY_LOOKUP_NAMES)
80 typedef UNICODE_STRING LSA_UNICODE_STRING, *PLSA_UNICODE_STRING;
81 typedef STRING LSA_STRING, *PLSA_STRING;
82 typedef OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES, *PLSA_OBJECT_ATTRIBUTES;
84 typedef PVOID LSA_HANDLE, *PLSA_HANDLE;
86 NTSTATUS WINAPI LsaOpenPolicy(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
88 typedef enum
90 PolicyAuditLogInformation = 1,
91 PolicyAuditEventsInformation,
92 PolicyPrimaryDomainInformation,
93 PolicyPdAccountInformation,
94 PolicyAccountDomainInformation,
95 PolicyLsaServerRoleInformation,
96 PolicyReplicaSourceInformation,
97 PolicyDefaultQuotaInformation,
98 PolicyModificationInformation,
99 PolicyAuditFullSetInformation,
100 PolicyAuditFullQueryInformation,
101 PolicyDnsDomainInformation
102 } POLICY_INFORMATION_CLASS, *PPOLICY_INFORMATION_CLASS;
104 typedef ULONG POLICY_AUDIT_EVENT_OPTIONS, *PPOLICY_AUDIT_EVENT_OPTIONS;
106 typedef struct _POLICY_AUDIT_EVENTS_INFO
108 BOOLEAN AuditingMode;
109 PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;
110 ULONG MaximumAuditEventCount;
111 } POLICY_AUDIT_EVENTS_INFO, *PPOLICY_AUDIT_EVENTS_INFO;
113 typedef struct _POLICY_PRIMARY_DOMAIN_INFO
115 LSA_UNICODE_STRING Name;
116 PSID Sid;
117 } POLICY_PRIMARY_DOMAIN_INFO, *PPOLICY_PRIMARY_DOMAIN_INFO;
119 typedef struct _POLICY_ACCOUNT_DOMAIN_INFO
121 LSA_UNICODE_STRING DomainName;
122 PSID DomainSid;
123 } POLICY_ACCOUNT_DOMAIN_INFO, *PPOLICY_ACCOUNT_DOMAIN_INFO;
126 NTSTATUS WINAPI LsaQueryInformationPolicy(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
128 NTSTATUS WINAPI LsaFreeMemory(PVOID);
129 NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle);
130 ULONG WINAPI LsaNtStatusToWinError(NTSTATUS Status);
133 #ifdef __cplusplus
134 } /* extern "C" */
135 #endif /* defined(__cplusplus) */
137 #endif /* !defined(__WINE_NTSECAPI_H) */