6 #define REVISED_AUDIT_ENTRY_STRUCT
7 #define LOGFLAGS_FORWARD 0
8 #define LOGFLAGS_BACKWARD 1
9 #define LOGFLAGS_SEEK 2
10 #define ACTION_LOCKOUT 0
11 #define ACTION_ADMINUNLOCK 1
16 #define AE_USERLIMIT 0
23 #define AE_ADMINPRIVREQD 2
25 #define AE_NOACCESSPERM 3
26 #define AE_ACCRESTRICT 4
27 #define AE_NORMAL_CLOSE 0
28 #define AE_SES_CLOSE 1
29 #define AE_ADMIN_CLOSE 2
30 #define AE_LIM_UNKNOWN 0
31 #define AE_LIM_LOGONHOURS 1
32 #define AE_LIM_EXPIRED 2
33 #define AE_LIM_INVAL_WKSTA 3
34 #define AE_LIM_DISABLED 4
35 #define AE_LIM_DELETED 5
40 #define AE_UAS_GROUP 1
41 #define AE_UAS_MODALS 2
42 #define SVAUD_SERVICE 1
43 #define SVAUD_GOODSESSLOGON 6
44 #define SVAUD_BADSESSLOGON 24
45 #define SVAUD_SESSLOGON (SVAUD_GOODSESSLOGON|SVAUD_BADSESSLOGON)
46 #define SVAUD_GOODNETLOGON 96
47 #define SVAUD_BADNETLOGON 384
48 #define SVAUD_NETLOGON (SVAUD_GOODNETLOGON|SVAUD_BADNETLOGON)
49 #define SVAUD_LOGON (SVAUD_NETLOGON|SVAUD_SESSLOGON)
50 #define SVAUD_GOODUSE 0x600
51 #define SVAUD_BADUSE 0x1800
52 #define SVAUD_USE (SVAUD_GOODUSE|SVAUD_BADUSE)
53 #define SVAUD_USERLIST 8192
54 #define SVAUD_PERMISSIONS 16384
55 #define SVAUD_RESOURCE 32768
56 #define SVAUD_LOGONLIM 65536
57 #define AA_AUDIT_ALL 1
62 #define AA_S_CREATE 32
63 #define AA_S_DELETE 64
67 #define AA_F_WRITE 512
68 #define AA_F_CREATE 512
69 #define AA_F_DELETE 1024
71 #define AA_F_ALL (AA_F_OPEN|AA_F_WRITE|AA_F_DELETE|AA_F_ACL)
72 #define AA_A_OPEN 2048
73 #define AA_A_WRITE 4096
74 #define AA_A_CREATE 8192
75 #define AA_A_DELETE 16384
76 #define AA_A_ACL 32768
77 #define AA_A_ALL (AA_F_OPEN|AA_F_WRITE|AA_F_DELETE|AA_F_ACL)
78 typedef struct _AUDIT_ENTRY
{
85 } AUDIT_ENTRY
,*PAUDIT_ENTRY
,*LPAUDIT_ENTRY
;
86 typedef struct _HLOG
{
91 } HLOG
,*PHLOG
,*LPHLOG
;
92 typedef struct _AE_SRVSTATUS
{
94 } AE_SRVSTATUS
,*PAE_SRVSTATUS
,*LPAE_SRVSTATUS
;
95 typedef struct _AE_SESSLOGON
{
98 DWORD ae_so_privilege
;
99 } AE_SESSLOGON
,*PAE_SESSLOGON
,*LPAE_SESSLOGON
;
100 typedef struct _AE_SESSLOGOFF
{
101 DWORD ae_sf_compname
;
102 DWORD ae_sf_username
;
104 } AE_SESSLOGOFF
,*PAE_SESSLOGOFF
,*LPAE_SESSLOGOFF
;
105 typedef struct _AE_SESSPWERR
{
106 DWORD ae_sp_compname
;
107 DWORD ae_sp_username
;
108 } AE_SESSPWERR
,*PAE_SESSPWERR
,*LPAE_SESSPWERR
;
109 typedef struct _AE_CONNSTART
{
110 DWORD ae_ct_compname
;
111 DWORD ae_ct_username
;
114 } AE_CONNSTART
,*PAE_CONNSTART
,*LPAE_CONNSTART
;
115 typedef struct _AE_CONNSTOP
{
116 DWORD ae_cp_compname
;
117 DWORD ae_cp_username
;
121 } AE_CONNSTOP
,*PAE_CONNSTOP
,*LPAE_CONNSTOP
;
122 typedef struct _AE_CONNREJ
{
123 DWORD ae_cr_compname
;
124 DWORD ae_cr_username
;
127 } AE_CONNREJ
,*PAE_CONNREJ
,*LPAE_CONNREJ
;
128 typedef struct _AE_RESACCESS
{
129 DWORD ae_ra_compname
;
130 DWORD ae_ra_username
;
132 DWORD ae_ra_operation
;
133 DWORD ae_ra_returncode
;
136 } AE_RESACCESS
,*PAE_RESACCESS
,*LPAE_RESACCESS
;
137 typedef struct _AE_RESACCESSREJ
{
138 DWORD ae_rr_compname
;
139 DWORD ae_rr_username
;
141 DWORD ae_rr_operation
;
142 } AE_RESACCESSREJ
,*PAE_RESACCESSREJ
,*LPAE_RESACCESSREJ
;
143 typedef struct _AE_CLOSEFILE
{
144 DWORD ae_cf_compname
;
145 DWORD ae_cf_username
;
148 DWORD ae_cf_duration
;
150 } AE_CLOSEFILE
,*PAE_CLOSEFILE
,*LPAE_CLOSEFILE
;
151 typedef struct _AE_SERVICESTAT
{
152 DWORD ae_ss_compname
;
153 DWORD ae_ss_username
;
158 DWORD ae_ss_returnval
;
159 } AE_SERVICESTAT
,*PAE_SERVICESTAT
,*LPAE_SERVICESTAT
;
160 typedef struct _AE_ACLMOD
{
161 DWORD ae_am_compname
;
162 DWORD ae_am_username
;
166 } AE_ACLMOD
,*PAE_ACLMOD
,*LPAE_ACLMOD
;
167 typedef struct _AE_UASMOD
{
168 DWORD ae_um_compname
;
169 DWORD ae_um_username
;
174 } AE_UASMOD
,*PAE_UASMOD
,*LPAE_UASMOD
;
175 typedef struct _AE_NETLOGON
{
176 DWORD ae_no_compname
;
177 DWORD ae_no_username
;
178 DWORD ae_no_privilege
;
179 DWORD ae_no_authflags
;
180 } AE_NETLOGON
,*PAE_NETLOGON
,*LPAE_NETLOGON
;
181 typedef struct _AE_NETLOGOFF
{
182 DWORD ae_nf_compname
;
183 DWORD ae_nf_username
;
184 DWORD ae_nf_reserved1
;
185 DWORD ae_nf_reserved2
;
186 } AE_NETLOGOFF
,*PAE_NETLOGOFF
,*LPAE_NETLOGOFF
;
187 typedef struct _AE_ACCLIM
{
188 DWORD ae_al_compname
;
189 DWORD ae_al_username
;
192 } AE_ACCLIM
,*PAE_ACCLIM
,*LPAE_ACCLIM
;
193 typedef struct _AE_LOCKOUT
{
194 DWORD ae_lk_compname
;
195 DWORD ae_lk_username
;
197 DWORD ae_lk_bad_pw_count
;
198 } AE_LOCKOUT
,*PAE_LOCKOUT
,*LPAE_LOCKOUT
;
199 typedef struct _AE_GENERIC
{
212 } AE_GENERIC
,*PAE_GENERIC
,*LPAE_GENERIC
;
213 NET_API_STATUS WINAPI
NetAuditClear(LPCWSTR
,LPCWSTR
,LPCWSTR
);
214 NET_API_STATUS WINAPI
NetAuditRead(LPTSTR
,LPTSTR
,LPHLOG
,DWORD
,PDWORD
,DWORD
,DWORD
,PBYTE
*,DWORD
,PDWORD
,PDWORD
);
215 NET_API_STATUS WINAPI
NetAuditWrite(DWORD
,PBYTE
,DWORD
,LPTSTR
,PBYTE
);
217 /* These conflict with struct typedefs, why? */
218 #define AE_SRVSTATUS 0
219 #define AE_SESSLOGON 1
220 #define AE_SESSLOGOFF 2
221 #define AE_SESSPWERR 3
222 #define AE_CONNSTART 4
223 #define AE_CONNSTOP 5
225 #define AE_RESACCESS 7
226 #define AE_RESACCESSREJ 8
227 #define AE_CLOSEFILE 9
228 #define AE_SERVICESTAT 11
231 #define AE_NETLOGON 14
232 #define AE_NETLOGOFF 15
233 #define AE_NETLOGDENIED 16
234 #define AE_ACCLIMITEXCD 17
235 #define AE_RESACCESS2 18
236 #define AE_ACLMODFAIL 19
237 #define AE_LOCKOUT 20
238 #define AE_GENERIC_TYPE 21
239 #define AE_SRVSTART 0
240 #define AE_SRVPAUSED 1