1 | /* $Id: ADVAPI32.CPP,v 1.15 2000-10-03 05:52:30 bird Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Win32 advanced API functions for OS/2
|
---|
5 | *
|
---|
6 | * 1998/06/12
|
---|
7 | *
|
---|
8 | * Copyright 1998 Sander van Leeuwen
|
---|
9 | * Copyright 1998 Patrick Haller
|
---|
10 | *
|
---|
11 | * @(#) ADVAPI32.C 1.0.1 1998/06/14 PH added stubs
|
---|
12 | *
|
---|
13 | *
|
---|
14 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
15 | *
|
---|
16 | */
|
---|
17 |
|
---|
18 |
|
---|
19 | /*****************************************************************************
|
---|
20 | * Includes *
|
---|
21 | *****************************************************************************/
|
---|
22 |
|
---|
23 | #include <os2win.h>
|
---|
24 | #include <stdlib.h>
|
---|
25 | #include <stdarg.h>
|
---|
26 | #include <string.h>
|
---|
27 | #include <odinwrap.h>
|
---|
28 | #include "misc.h"
|
---|
29 | #include "advapi32.h"
|
---|
30 | #include "unicode.h"
|
---|
31 | #include "winreg.h"
|
---|
32 | #include <heapstring.h>
|
---|
33 |
|
---|
34 | ODINDEBUGCHANNEL(ADVAPI32-ADVAPI32)
|
---|
35 |
|
---|
36 |
|
---|
37 | /*****************************************************************************
|
---|
38 | * Defines *
|
---|
39 | *****************************************************************************/
|
---|
40 |
|
---|
41 | /* this define enables certain less important debug messages */
|
---|
42 | //#define DEBUG_LOCAL 1
|
---|
43 |
|
---|
44 | #define PTOKEN_GROUPS LPVOID
|
---|
45 | #define ACL_INFORMATION_CLASS DWORD
|
---|
46 |
|
---|
47 | /*
|
---|
48 | * Watcom C/C++ messed things up...
|
---|
49 | */
|
---|
50 | #ifdef __WATCOM__
|
---|
51 | extern "C"
|
---|
52 | {
|
---|
53 | BOOL WIN32API SetTokenInformation(HANDLE hToken,
|
---|
54 | TOKEN_INFORMATION_CLASS tic,
|
---|
55 | LPVOID lpvInformation,
|
---|
56 | DWORD cbInformation);
|
---|
57 | BOOL WIN32API GetUserNameA( /*PLF Wed 98-02-11 13:33:39*/
|
---|
58 | LPTSTR lpBuffer, /* address of name buffer */
|
---|
59 | LPDWORD lpcchBuffer); /* address of size of name buffer */
|
---|
60 |
|
---|
61 | BOOL WIN32API GetUserNameW( /*KSO Thu 21.05.1998 */
|
---|
62 | LPWSTR lpBuffer,
|
---|
63 | LPDWORD lpccBuffer
|
---|
64 | );
|
---|
65 |
|
---|
66 | BOOL WIN32API AbortSystemShutdownA(LPTSTR lpMachineName);
|
---|
67 | BOOL WIN32API AbortSystemShutdownW(LPWSTR lpMachineName);
|
---|
68 | BOOL WIN32API AccessCheckAndAuditAlarmA(LPCSTR SubsystemName,
|
---|
69 | LPVOID HandleId,
|
---|
70 | LPTSTR ObjectTypeName,
|
---|
71 | LPTSTR ObjectName,
|
---|
72 | PSECURITY_DESCRIPTOR SecurityDescriptor,
|
---|
73 | DWORD DesiredAccess,
|
---|
74 | PGENERIC_MAPPING GenericMapping,
|
---|
75 | BOOL ObjectCreation,
|
---|
76 | LPDWORD GrantedAccess,
|
---|
77 | LPBOOL AccessStatus,
|
---|
78 | LPBOOL pfGenerateOnClose);
|
---|
79 | BOOL WIN32API AccessCheckAndAuditAlarmW(LPCWSTR SubsystemName,
|
---|
80 | LPVOID HandleId,
|
---|
81 | LPWSTR ObjectTypeName,
|
---|
82 | LPWSTR ObjectName,
|
---|
83 | PSECURITY_DESCRIPTOR SecurityDescriptor,
|
---|
84 | DWORD DesiredAccess,
|
---|
85 | PGENERIC_MAPPING GenericMapping,
|
---|
86 | BOOL ObjectCreation,
|
---|
87 | LPDWORD GrantedAccess,
|
---|
88 | LPBOOL AccessStatus,
|
---|
89 | LPBOOL pfGenerateOnClose);
|
---|
90 | BOOL WIN32API AddAccessAllowedAce(PACL pAcl,
|
---|
91 | DWORD dwAceRevision,
|
---|
92 | DWORD AccessMask,
|
---|
93 | PSID pSid);
|
---|
94 | BOOL WIN32API AddAccessDeniedAce(PACL pAcl,
|
---|
95 | DWORD dwAceRevision,
|
---|
96 | DWORD AccessMask,
|
---|
97 | PSID pSid);
|
---|
98 | BOOL WIN32API AddAce(PACL pAcl,
|
---|
99 | DWORD dwAceRevision,
|
---|
100 | DWORD dwStartingAceIndex,
|
---|
101 | LPVOID pAceList,
|
---|
102 | DWORD nAceListLength);
|
---|
103 | BOOL WIN32API AddAuditAccessAce(PACL pAcl,
|
---|
104 | DWORD dwAceRevision,
|
---|
105 | DWORD dwAccessMask,
|
---|
106 | PSID pSid,
|
---|
107 | BOOL bAuditSuccess,
|
---|
108 | BOOL bAuditFailure);
|
---|
109 | BOOL WIN32API AdjustTokenGroups(HANDLE TokenHandle,
|
---|
110 | BOOL ResetToDefault,
|
---|
111 | PTOKEN_GROUPS NewState,
|
---|
112 | DWORD BufferLength,
|
---|
113 | PTOKEN_GROUPS PreviousState,
|
---|
114 | LPDWORD ReturnLength);
|
---|
115 | BOOL WIN32API AllocateLocallyUniqueId(PLUID Luid);
|
---|
116 | BOOL WIN32API AreAllAccessesGranted(DWORD GrantedAccess,
|
---|
117 | DWORD DesiredAccess);
|
---|
118 | BOOL WIN32API AreAnyAccessesGranted(DWORD GrantedAccess,
|
---|
119 | DWORD DesiredAccess);
|
---|
120 | BOOL WIN32API CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor,
|
---|
121 | PSECURITY_DESCRIPTOR CreatorDescriptor,
|
---|
122 | PSECURITY_DESCRIPTOR *NewDescriptor,
|
---|
123 | BOOL IsDirectoryObject,
|
---|
124 | HANDLE Token,
|
---|
125 | PGENERIC_MAPPING GenericMapping);
|
---|
126 | BOOL WIN32API CreateProcessAsUserA(HANDLE hToken,
|
---|
127 | LPCSTR lpApplicationName,
|
---|
128 | LPTSTR lpCommandLine,
|
---|
129 | LPSECURITY_ATTRIBUTES lpProcessAttributes,
|
---|
130 | LPSECURITY_ATTRIBUTES lpThreadAttributes,
|
---|
131 | BOOL bInheritHandles,
|
---|
132 | DWORD dwCreationFlags,
|
---|
133 | LPVOID lpEnvironment,
|
---|
134 | LPCSTR lpCurrentDirectory,
|
---|
135 | LPSTARTUPINFOA lpStartupInfo,
|
---|
136 | LPPROCESS_INFORMATION lpProcessInformation);
|
---|
137 | BOOL WIN32API CreateProcessAsUserW(HANDLE hToken,
|
---|
138 | LPCWSTR lpApplicationName,
|
---|
139 | LPWSTR lpCommandLine,
|
---|
140 | LPSECURITY_ATTRIBUTES lpProcessAttributes,
|
---|
141 | LPSECURITY_ATTRIBUTES lpThreadAttributes,
|
---|
142 | BOOL bInheritHandles,
|
---|
143 | DWORD dwCreationFlags,
|
---|
144 | LPVOID lpEnvironment,
|
---|
145 | LPCWSTR lpCurrentDirectory,
|
---|
146 | LPSTARTUPINFOA lpStartupInfo,
|
---|
147 | LPPROCESS_INFORMATION lpProcessInformation);
|
---|
148 | BOOL WIN32API DeleteAce(PACL pAcl,
|
---|
149 | DWORD dwAceIndex);
|
---|
150 | BOOL WIN32API DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR *ObjectDescriptor);
|
---|
151 | BOOL WIN32API DuplicateToken(HANDLE ExistingTokenHandle,
|
---|
152 | SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
|
---|
153 | PHANDLE DuplicateTokenHandle);
|
---|
154 | BOOL WIN32API FindFirstFreeAce(PACL pAcl,
|
---|
155 | LPVOID *pAce);
|
---|
156 | BOOL WIN32API GetAce(PACL pAcl,
|
---|
157 | DWORD dwAceIndex,
|
---|
158 | LPVOID *pAce);
|
---|
159 | BOOL WIN32API GetAclInformation(PACL pAcl,
|
---|
160 | LPVOID pAclInformation,
|
---|
161 | DWORD nAclInformationLength,
|
---|
162 | ACL_INFORMATION_CLASS dwAclInformationClass);
|
---|
163 | BOOL WIN32API GetKernelObjectSecurity(HANDLE Handle,
|
---|
164 | SECURITY_INFORMATION RequestedInformation,
|
---|
165 | PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
---|
166 | DWORD nLength,
|
---|
167 | LPDWORD lpnLengthNeeded);
|
---|
168 | BOOL WIN32API GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR ObjectDescriptor,
|
---|
169 | SECURITY_INFORMATION SecurityInformation,
|
---|
170 | PSECURITY_DESCRIPTOR ResultantDescriptor,
|
---|
171 | DWORD DescriptorLength,
|
---|
172 | LPDWORD ReturnLength);
|
---|
173 | BOOL WIN32API ImpersonateLoggedOnUser(HANDLE hToken);
|
---|
174 | BOOL WIN32API ImpersonateNamedPipeClient(HANDLE hNamedPipe);
|
---|
175 | BOOL WIN32API InitiateSystemShutdownA(LPTSTR lpMachineName,
|
---|
176 | LPTSTR lpMessage,
|
---|
177 | DWORD dwTimeout,
|
---|
178 | BOOL bForceAppsClosed,
|
---|
179 | BOOL bRebootAfterShutdown);
|
---|
180 | BOOL WIN32API InitiateSystemShutdownW(LPWSTR lpMachineName,
|
---|
181 | LPWSTR lpMessage,
|
---|
182 | DWORD dwTimeout,
|
---|
183 | BOOL bForceAppsClosed,
|
---|
184 | BOOL bRebootAfterShutdown);
|
---|
185 | DWORD WIN32API IsTextUnicode(CONST LPVOID lpBuffer,
|
---|
186 | int cb,
|
---|
187 | LPINT lpi);
|
---|
188 | BOOL WIN32API IsValidAcl(PACL pAcl);
|
---|
189 | BOOL WIN32API LogonUserA(LPTSTR lpszUsername,
|
---|
190 | LPTSTR lpszDomain,
|
---|
191 | LPTSTR lpszPassword,
|
---|
192 | DWORD dwLogonType,
|
---|
193 | DWORD dwLogonProvider,
|
---|
194 | PHANDLE phToken);
|
---|
195 | BOOL WIN32API LogonUserW(LPWSTR lpszUsername,
|
---|
196 | LPWSTR lpszDomain,
|
---|
197 | LPWSTR lpszPassword,
|
---|
198 | DWORD dwLogonType,
|
---|
199 | DWORD dwLogonProvider,
|
---|
200 | PHANDLE phToken);
|
---|
201 | BOOL WIN32API LookupAccountNameA(LPCSTR lpSystemName,
|
---|
202 | LPCSTR lpAccountName,
|
---|
203 | PSID Sid,
|
---|
204 | LPDWORD cbSid,
|
---|
205 | LPTSTR ReferencedDomainName,
|
---|
206 | LPDWORD cbReferencedDomainName,
|
---|
207 | PSID_NAME_USE peUse);
|
---|
208 | BOOL WIN32API LookupAccountNameW(LPCWSTR lpSystemName,
|
---|
209 | LPCWSTR lpAccountName,
|
---|
210 | PSID Sid,
|
---|
211 | LPDWORD cbSid,
|
---|
212 | LPWSTR ReferencedDomainName,
|
---|
213 | LPDWORD cbReferencedDomainName,
|
---|
214 | PSID_NAME_USE peUse);
|
---|
215 | BOOL WIN32API LookupPrivilegeDisplayNameA(LPCSTR lpSystemName,
|
---|
216 | LPCSTR lpName,
|
---|
217 | LPTSTR lpDisplayName,
|
---|
218 | LPDWORD cbDisplayName,
|
---|
219 | LPDWORD lpLanguageId);
|
---|
220 | BOOL WIN32API LookupPrivilegeDisplayNameW(LPCWSTR lpSystemName,
|
---|
221 | LPCWSTR lpName,
|
---|
222 | LPWSTR lpDisplayName,
|
---|
223 | LPDWORD cbDisplayName,
|
---|
224 | LPDWORD lpLanguageId);
|
---|
225 | BOOL WIN32API LookupPrivilegeNameA(LPCSTR lpSystemName,
|
---|
226 | PLUID lpLuid,
|
---|
227 | LPTSTR lpName,
|
---|
228 | LPDWORD cbName);
|
---|
229 | BOOL WIN32API LookupPrivilegeNameW(LPCWSTR lpSystemName,
|
---|
230 | PLUID lpLuid,
|
---|
231 | LPWSTR lpName,
|
---|
232 | LPDWORD cbName);
|
---|
233 | BOOL WIN32API MakeAbsoluteSD(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
|
---|
234 | PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
|
---|
235 | LPDWORD lpdwAbsoluteSecurityDescriptorSize,
|
---|
236 | PACL pDacl,
|
---|
237 | LPDWORD lpdwDaclSize,
|
---|
238 | PACL pSacl,
|
---|
239 | LPDWORD lpdwSaclSize,
|
---|
240 | PSID pOwner,
|
---|
241 | LPDWORD lpdwOwnerSize,
|
---|
242 | PSID pPrimaryGroup,
|
---|
243 | LPDWORD lpdwPrimaryGroupSize);
|
---|
244 | VOID WIN32API MapGenericMask(LPDWORD AccessMask,
|
---|
245 | PGENERIC_MAPPING GenericMapping);
|
---|
246 | BOOL WIN32API ObjectCloseAuditAlarmA(LPCSTR SubsystemName,
|
---|
247 | LPVOID HandleId,
|
---|
248 | BOOL GenerateOnClose);
|
---|
249 | BOOL WIN32API ObjectCloseAuditAlarmW(LPCWSTR SubsystemName,
|
---|
250 | LPVOID HandleId,
|
---|
251 | BOOL GenerateOnClose);
|
---|
252 | BOOL WIN32API ObjectOpenAuditAlarmA(LPCSTR SubsystemName,
|
---|
253 | LPVOID HandleId,
|
---|
254 | LPTSTR ObjectTypeName,
|
---|
255 | LPTSTR ObjectName,
|
---|
256 | PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
---|
257 | HANDLE ClientToken,
|
---|
258 | DWORD DesiredAccess,
|
---|
259 | DWORD GrantedAccess,
|
---|
260 | PPRIVILEGE_SET Privileges,
|
---|
261 | BOOL ObjectCreation,
|
---|
262 | BOOL AccessGranted,
|
---|
263 | LPBOOL GenerateOnClose);
|
---|
264 | BOOL WIN32API ObjectOpenAuditAlarmW(LPCWSTR SubsystemName,
|
---|
265 | LPVOID HandleId,
|
---|
266 | LPWSTR ObjectTypeName,
|
---|
267 | LPWSTR ObjectName,
|
---|
268 | PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
---|
269 | HANDLE ClientToken,
|
---|
270 | DWORD DesiredAccess,
|
---|
271 | DWORD GrantedAccess,
|
---|
272 | PPRIVILEGE_SET Privileges,
|
---|
273 | BOOL ObjectCreation,
|
---|
274 | BOOL AccessGranted,
|
---|
275 | LPBOOL GenerateOnClose);
|
---|
276 | BOOL WIN32API ObjectPrivilegeAuditAlarmA(LPCSTR lpszSubsystem,
|
---|
277 | LPVOID lpvHandleId,
|
---|
278 | HANDLE hClientToken,
|
---|
279 | DWORD dwDesiredAccess,
|
---|
280 | PPRIVILEGE_SET pps,
|
---|
281 | BOOL fAccessGranted);
|
---|
282 | BOOL WIN32API ObjectPrivilegeAuditAlarmW(LPCWSTR lpszSubsystem,
|
---|
283 | LPVOID lpvHandleId,
|
---|
284 | HANDLE hClientToken,
|
---|
285 | DWORD dwDesiredAccess,
|
---|
286 | PPRIVILEGE_SET pps,
|
---|
287 | BOOL fAccessGranted);
|
---|
288 | BOOL WIN32API PrivilegeCheck(HANDLE hClientToken,
|
---|
289 | PPRIVILEGE_SET pps,
|
---|
290 | LPBOOL lpfResult);
|
---|
291 | BOOL WIN32API PrivilegedServiceAuditAlarmA(LPCSTR lpszSubsystem,
|
---|
292 | LPCSTR lpszService,
|
---|
293 | HANDLE hClientToken,
|
---|
294 | PPRIVILEGE_SET pps,
|
---|
295 | BOOL fAccessGranted);
|
---|
296 | BOOL WIN32API PrivilegedServiceAuditAlarmW(LPCWSTR lpszSubsystem,
|
---|
297 | LPCWSTR lpszService,
|
---|
298 | HANDLE hClientToken,
|
---|
299 | PPRIVILEGE_SET pps,
|
---|
300 | BOOL fAccessGranted);
|
---|
301 | BOOL WIN32API SetAclInformation(PACL pAcl,
|
---|
302 | LPVOID lpvAclInfo,
|
---|
303 | DWORD cbAclInfo,
|
---|
304 | ACL_INFORMATION_CLASS aclic);
|
---|
305 | BOOL WIN32API SetKernelObjectSecurity(HANDLE hObject,
|
---|
306 | SECURITY_INFORMATION si,
|
---|
307 | PSECURITY_DESCRIPTOR psd);
|
---|
308 | BOOL WIN32API SetPrivateObjectSecurity(SECURITY_INFORMATION si,
|
---|
309 | PSECURITY_DESCRIPTOR psdSource,
|
---|
310 | PSECURITY_DESCRIPTOR *lppsdTarget,
|
---|
311 | PGENERIC_MAPPING pgm,
|
---|
312 | HANDLE hClientToken);
|
---|
313 | }
|
---|
314 | #endif //__WATCOM__
|
---|
315 |
|
---|
316 | /*****************************************************************************
|
---|
317 | * Name : SetTokenInformation
|
---|
318 | * Purpose : The SetTokenInformation function sets various types of
|
---|
319 | * information for a specified access token. The information it
|
---|
320 | * sets replaces existing information. The calling process must
|
---|
321 | * have appropriate access rights to set the information.
|
---|
322 | * Parameters: HANDLE hToken handle of access token
|
---|
323 | * TOKEN_INFORMATION_CLASS tic type of information to set
|
---|
324 | * LPVOID lpvInformation address of information to set
|
---|
325 | * DWORD cbInformation size of information buffer
|
---|
326 | * Variables :
|
---|
327 | * Result :
|
---|
328 | * Remark :
|
---|
329 | * Status : UNTESTED STUB
|
---|
330 | *
|
---|
331 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
332 | *****************************************************************************/
|
---|
333 |
|
---|
334 | #define TOKEN_INFORMATION_CLASS DWORD
|
---|
335 | BOOL WIN32API SetTokenInformation(HANDLE hToken,
|
---|
336 | TOKEN_INFORMATION_CLASS tic,
|
---|
337 | LPVOID lpvInformation,
|
---|
338 | DWORD cbInformation)
|
---|
339 | {
|
---|
340 | dprintf(("ADVAPI32: SetTokenInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
341 | hToken,
|
---|
342 | tic,
|
---|
343 | lpvInformation,
|
---|
344 | cbInformation));
|
---|
345 |
|
---|
346 | return (FALSE); /* signal failure */
|
---|
347 | }
|
---|
348 |
|
---|
349 | //******************************************************************************
|
---|
350 | //******************************************************************************
|
---|
351 | BOOL WIN32API GetUserNameA( /*PLF Wed 98-02-11 13:33:39*/
|
---|
352 | LPTSTR lpBuffer, /* address of name buffer */
|
---|
353 | LPDWORD lpcchBuffer) /* address of size of name buffer */
|
---|
354 |
|
---|
355 |
|
---|
356 | /* The GetUserName function retrieves the user name of the current
|
---|
357 | * thread. This is the name of the user currently logged onto the
|
---|
358 | * system.
|
---|
359 | */
|
---|
360 |
|
---|
361 | {
|
---|
362 | #define USERNAME "USER"
|
---|
363 | if(*lpcchBuffer < sizeof(USERNAME))
|
---|
364 | return FALSE;
|
---|
365 | strcpy(lpBuffer, USERNAME);
|
---|
366 | return TRUE;
|
---|
367 | }
|
---|
368 | //******************************************************************************
|
---|
369 | //******************************************************************************
|
---|
370 | BOOL WIN32API GetUserNameW( /*KSO Thu 21.05.1998 */
|
---|
371 | LPWSTR lpBuffer,
|
---|
372 | LPDWORD lpccBuffer
|
---|
373 | )
|
---|
374 | {
|
---|
375 |
|
---|
376 | if ( *lpccBuffer >= sizeof(USERNAME)*2 )
|
---|
377 | {
|
---|
378 | AsciiToUnicode(USERNAME, lpBuffer);
|
---|
379 | return TRUE;
|
---|
380 | }
|
---|
381 | return FALSE;
|
---|
382 | }
|
---|
383 | //******************************************************************************
|
---|
384 | //******************************************************************************
|
---|
385 |
|
---|
386 |
|
---|
387 |
|
---|
388 | /*PLF Sat 98-03-07 02:59:20*/
|
---|
389 |
|
---|
390 | /*****************************************************************************
|
---|
391 | * Name : AbortSystemShutdownA
|
---|
392 | * Purpose : The AbortSystemShutdown function stops a system shutdown started
|
---|
393 | * by using the InitiateSystemShutdown function.
|
---|
394 | * Parameters: LPTSTR lpMachineName address of name of computer to stop shutting down
|
---|
395 | * Variables :
|
---|
396 | * Result :
|
---|
397 | * Remark :
|
---|
398 | * Status : UNTESTED STUB
|
---|
399 | *
|
---|
400 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
401 | *****************************************************************************/
|
---|
402 |
|
---|
403 | BOOL WIN32API AbortSystemShutdownA(LPTSTR lpMachineName)
|
---|
404 | {
|
---|
405 | dprintf(("ADVAPI32: AbortSystemShutdownA(%s) not implemented.\n",
|
---|
406 | lpMachineName));
|
---|
407 |
|
---|
408 | return (FALSE);
|
---|
409 | }
|
---|
410 |
|
---|
411 |
|
---|
412 | /*****************************************************************************
|
---|
413 | * Name : AbortSystemShutdownW
|
---|
414 | * Purpose : The AbortSystemShutdown function stops a system shutdown started
|
---|
415 | * by using the InitiateSystemShutdown function.
|
---|
416 | * Parameters: LPWSTR lpMachineName address of name of computer to stop shutting down
|
---|
417 | * Variables :
|
---|
418 | * Result :
|
---|
419 | * Remark :
|
---|
420 | * Status : UNTESTED STUB
|
---|
421 | *
|
---|
422 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
423 | *****************************************************************************/
|
---|
424 |
|
---|
425 | BOOL WIN32API AbortSystemShutdownW(LPWSTR lpMachineName)
|
---|
426 | {
|
---|
427 | dprintf(("ADVAPI32: AbortSystemShutdownW(%s) not implemented.\n",
|
---|
428 | lpMachineName));
|
---|
429 |
|
---|
430 | return (FALSE);
|
---|
431 | }
|
---|
432 |
|
---|
433 |
|
---|
434 |
|
---|
435 |
|
---|
436 | /*****************************************************************************
|
---|
437 | * Name : AccessCheckAndAuditAlarmA
|
---|
438 | * Purpose : The AccessCheckAndAuditAlarm function performs an access
|
---|
439 | * validation and generates corresponding audit messages. An
|
---|
440 | * application can also use this function to determine whether
|
---|
441 | * necessary privileges are held by a client process. This function
|
---|
442 | * is generally used by a server application impersonating a client
|
---|
443 | * process. Alarms are not supported in the current version of Windows NT.
|
---|
444 | * Parameters: LPCSTR SubsystemName address of string for subsystem name
|
---|
445 | * LPVOID HandleId address of handle identifier
|
---|
446 | * LPTSTR ObjectTypeName address of string for object type
|
---|
447 | * LPTSTR ObjectName address of string for object name
|
---|
448 | * PSECURITY_DESCRIPTOR SecurityDescriptor address of security descriptor
|
---|
449 | * DWORD DesiredAccess mask for requested access rights
|
---|
450 | * PGENERIC_MAPPING GenericMapping address of GENERIC_MAPPING
|
---|
451 | * BOOL ObjectCreation object-creation flag
|
---|
452 | * LPDWORD GrantedAccess address of mask for granted rights
|
---|
453 | * LPBOOL AccessStatus address of flag for results
|
---|
454 | * LPBOOL pfGenerateOnClose address of flag for audit generation
|
---|
455 | * Variables :
|
---|
456 | * Result :
|
---|
457 | * Remark :
|
---|
458 | * Status : UNTESTED STUB
|
---|
459 | *
|
---|
460 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
461 | *****************************************************************************/
|
---|
462 |
|
---|
463 | BOOL WIN32API AccessCheckAndAuditAlarmA(LPCSTR SubsystemName,
|
---|
464 | LPVOID HandleId,
|
---|
465 | LPTSTR ObjectTypeName,
|
---|
466 | LPTSTR ObjectName,
|
---|
467 | PSECURITY_DESCRIPTOR SecurityDescriptor,
|
---|
468 | DWORD DesiredAccess,
|
---|
469 | PGENERIC_MAPPING GenericMapping,
|
---|
470 | BOOL ObjectCreation,
|
---|
471 | LPDWORD GrantedAccess,
|
---|
472 | LPBOOL AccessStatus,
|
---|
473 | LPBOOL pfGenerateOnClose)
|
---|
474 | {
|
---|
475 | dprintf(("ADVAPI32: AccessCheckAndAuditAlarmA(%s,%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
476 | SubsystemName,
|
---|
477 | HandleId,
|
---|
478 | ObjectTypeName,
|
---|
479 | ObjectName,
|
---|
480 | SecurityDescriptor,
|
---|
481 | DesiredAccess,
|
---|
482 | GenericMapping,
|
---|
483 | ObjectCreation,
|
---|
484 | GrantedAccess,
|
---|
485 | AccessStatus,
|
---|
486 | pfGenerateOnClose));
|
---|
487 |
|
---|
488 | return (FALSE);
|
---|
489 | }
|
---|
490 |
|
---|
491 |
|
---|
492 | /*****************************************************************************
|
---|
493 | * Name : AccessCheckAndAuditAlarmW
|
---|
494 | * Purpose : The AccessCheckAndAuditAlarm function performs an access
|
---|
495 | * validation and generates corresponding audit messages. An
|
---|
496 | * application can also use this function to determine whether
|
---|
497 | * necessary privileges are held by a client process. This function
|
---|
498 | * is generally used by a server application impersonating a client
|
---|
499 | * process. Alarms are not supported in the current version of Windows NT.
|
---|
500 | * Parameters: LPCSTR SubsystemName address of string for subsystem name
|
---|
501 | * LPVOID HandleId address of handle identifier
|
---|
502 | * LPTSTR ObjectTypeName address of string for object type
|
---|
503 | * LPTSTR ObjectName address of string for object name
|
---|
504 | * PSECURITY_DESCRIPTOR SecurityDescriptor address of security descriptor
|
---|
505 | * DWORD DesiredAccess mask for requested access rights
|
---|
506 | * PGENERIC_MAPPING GenericMapping address of GENERIC_MAPPING
|
---|
507 | * BOOL ObjectCreation object-creation flag
|
---|
508 | * LPDWORD GrantedAccess address of mask for granted rights
|
---|
509 | * LPBOOL AccessStatus address of flag for results
|
---|
510 | * LPBOOL pfGenerateOnClose address of flag for audit generation
|
---|
511 | * Variables :
|
---|
512 | * Result :
|
---|
513 | * Remark :
|
---|
514 | * Status : UNTESTED STUB
|
---|
515 | *
|
---|
516 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
517 | *****************************************************************************/
|
---|
518 |
|
---|
519 | BOOL WIN32API AccessCheckAndAuditAlarmW(LPCWSTR SubsystemName,
|
---|
520 | LPVOID HandleId,
|
---|
521 | LPWSTR ObjectTypeName,
|
---|
522 | LPWSTR ObjectName,
|
---|
523 | PSECURITY_DESCRIPTOR SecurityDescriptor,
|
---|
524 | DWORD DesiredAccess,
|
---|
525 | PGENERIC_MAPPING GenericMapping,
|
---|
526 | BOOL ObjectCreation,
|
---|
527 | LPDWORD GrantedAccess,
|
---|
528 | LPBOOL AccessStatus,
|
---|
529 | LPBOOL pfGenerateOnClose)
|
---|
530 | {
|
---|
531 | dprintf(("ADVAPI32: AccessCheckAndAuditAlarmW(%s,%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
532 | SubsystemName,
|
---|
533 | HandleId,
|
---|
534 | ObjectTypeName,
|
---|
535 | ObjectName,
|
---|
536 | SecurityDescriptor,
|
---|
537 | DesiredAccess,
|
---|
538 | GenericMapping,
|
---|
539 | ObjectCreation,
|
---|
540 | GrantedAccess,
|
---|
541 | AccessStatus,
|
---|
542 | pfGenerateOnClose));
|
---|
543 |
|
---|
544 | return (FALSE);
|
---|
545 | }
|
---|
546 |
|
---|
547 |
|
---|
548 | /*****************************************************************************
|
---|
549 | * Name : AddAccessAllowedAce
|
---|
550 | * Purpose : The AddAccessAllowedAce function adds an access-allowed ACE to
|
---|
551 | * an ACL. The access is granted to a specified SID. An ACE is an
|
---|
552 | * access-control entry. An ACL is an access-control list. A SID is
|
---|
553 | * a security identifier.
|
---|
554 | * Parameters: PACL pAcl address of access-control list
|
---|
555 | * DWORD dwAceRevision ACL revision level
|
---|
556 | * DWORD AccessMask access mask
|
---|
557 | * PSID pSid address of security identifier
|
---|
558 | * Variables :
|
---|
559 | * Result :
|
---|
560 | * Remark :
|
---|
561 | * Status : UNTESTED STUB
|
---|
562 | *
|
---|
563 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
564 | *****************************************************************************/
|
---|
565 |
|
---|
566 | BOOL WIN32API AddAccessAllowedAce(PACL pAcl,
|
---|
567 | DWORD dwAceRevision,
|
---|
568 | DWORD AccessMask,
|
---|
569 | PSID pSid)
|
---|
570 | {
|
---|
571 | dprintf(("ADVAPI32: AddAccessAllowedAce(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
572 | pAcl,
|
---|
573 | dwAceRevision,
|
---|
574 | AccessMask,
|
---|
575 | pSid));
|
---|
576 |
|
---|
577 | return (FALSE);
|
---|
578 | }
|
---|
579 |
|
---|
580 |
|
---|
581 | /*****************************************************************************
|
---|
582 | * Name : AddAccessDeniedAce
|
---|
583 | * Purpose : The AddAccessDeniedAce function adds an access-denied ACE to an
|
---|
584 | * ACL. The access is denied to a specified SID. An ACE is an
|
---|
585 | * access-control entry. An ACL is an access-control list. A SID
|
---|
586 | * is a security identifier.
|
---|
587 | * Parameters: PACL pAcl address of access-control list
|
---|
588 | * DWORD dwAceRevision ACL revision level
|
---|
589 | * DWORD AccessMask access mask
|
---|
590 | * PSID pSid address of security identifier
|
---|
591 | * Variables :
|
---|
592 | * Result :
|
---|
593 | * Remark :
|
---|
594 | * Status : UNTESTED STUB
|
---|
595 | *
|
---|
596 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
597 | *****************************************************************************/
|
---|
598 |
|
---|
599 | BOOL WIN32API AddAccessDeniedAce(PACL pAcl,
|
---|
600 | DWORD dwAceRevision,
|
---|
601 | DWORD AccessMask,
|
---|
602 | PSID pSid)
|
---|
603 | {
|
---|
604 | dprintf(("ADVAPI32: AddAccessDeniedAce(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
605 | pAcl,
|
---|
606 | dwAceRevision,
|
---|
607 | AccessMask,
|
---|
608 | pSid));
|
---|
609 |
|
---|
610 | return (FALSE);
|
---|
611 | }
|
---|
612 |
|
---|
613 |
|
---|
614 | /*****************************************************************************
|
---|
615 | * Name : AddAce
|
---|
616 | * Purpose : The AddAce function adds one or more ACEs to a specified ACL.
|
---|
617 | * An ACE is an access-control entry. An ACL is an access-control list.
|
---|
618 | * Parameters: PACL pAcl address of access-control list
|
---|
619 | * DWORD dwAceRevision ACL revision level
|
---|
620 | * DWORD dwStartingAceIndex index of ACE position in ACL
|
---|
621 | * LPVOID pAceList address of one or more ACEs
|
---|
622 | * DWORD nAceListLength size of buffer for ACEs
|
---|
623 | * Variables :
|
---|
624 | * Result :
|
---|
625 | * Remark :
|
---|
626 | * Status : UNTESTED STUB
|
---|
627 | *
|
---|
628 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
629 | *****************************************************************************/
|
---|
630 |
|
---|
631 | BOOL WIN32API AddAce(PACL pAcl,
|
---|
632 | DWORD dwAceRevision,
|
---|
633 | DWORD dwStartingAceIndex,
|
---|
634 | LPVOID pAceList,
|
---|
635 | DWORD nAceListLength)
|
---|
636 | {
|
---|
637 | dprintf(("ADVAPI32: AddAce(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
638 | pAcl,
|
---|
639 | dwAceRevision,
|
---|
640 | dwStartingAceIndex,
|
---|
641 | pAceList,
|
---|
642 | nAceListLength));
|
---|
643 |
|
---|
644 | return (FALSE);
|
---|
645 | }
|
---|
646 |
|
---|
647 |
|
---|
648 | /*****************************************************************************
|
---|
649 | * Name : AddAuditAccessAce
|
---|
650 | * Purpose : The AddAuditAccessAce function adds a system-audit ACE to a
|
---|
651 | * system ACL. The access of a specified SID is audited. An ACE is
|
---|
652 | * an access-control entry. An ACL is an access-control list. A SID
|
---|
653 | * is a security identifier.
|
---|
654 | * Parameters: PACL pAcl address of access-control list
|
---|
655 | * DWORD dwAceRevision ACL revision level
|
---|
656 | * DWORD dwAccessMask access mask
|
---|
657 | * PSID pSid address of security identifier
|
---|
658 | * BOOL bAuditSuccess flag for auditing successful access
|
---|
659 | * BOOL bAuditFailure flag for auditing unsuccessful access attempts
|
---|
660 | * Variables :
|
---|
661 | * Result :
|
---|
662 | * Remark :
|
---|
663 | * Status : UNTESTED STUB
|
---|
664 | *
|
---|
665 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
666 | *****************************************************************************/
|
---|
667 |
|
---|
668 | BOOL WIN32API AddAuditAccessAce(PACL pAcl,
|
---|
669 | DWORD dwAceRevision,
|
---|
670 | DWORD dwAccessMask,
|
---|
671 | PSID pSid,
|
---|
672 | BOOL bAuditSuccess,
|
---|
673 | BOOL bAuditFailure)
|
---|
674 | {
|
---|
675 | dprintf(("ADVAPI32: AddAuditAccessAce(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
676 | pAcl,
|
---|
677 | dwAceRevision,
|
---|
678 | dwAccessMask,
|
---|
679 | pSid,
|
---|
680 | bAuditSuccess,
|
---|
681 | bAuditFailure));
|
---|
682 |
|
---|
683 | return (FALSE);
|
---|
684 | }
|
---|
685 |
|
---|
686 |
|
---|
687 | /*****************************************************************************
|
---|
688 | * Name : AdjustTokenGroups
|
---|
689 | * Purpose : The AdjustTokenGroups function adjusts groups in the specified
|
---|
690 | * access token. TOKEN_ADJUST_GROUPS access is required to enable
|
---|
691 | * or disable groups in an access token.
|
---|
692 | * Parameters: HANDLE TokenHandle handle of token that contains groups
|
---|
693 | * BOOL ResetToDefault flag for default settings
|
---|
694 | * PTOKEN_GROUPS NewState address of new group information
|
---|
695 | * DWORD BufferLength size of buffer for previous information
|
---|
696 | * PTOKEN_GROUPS PreviousState address of previous group information
|
---|
697 | * LPDWORD ReturnLength address of required buffer size
|
---|
698 | * Variables :
|
---|
699 | * Result :
|
---|
700 | * Remark :
|
---|
701 | * Status : UNTESTED STUB
|
---|
702 | *
|
---|
703 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
704 | *****************************************************************************/
|
---|
705 |
|
---|
706 | BOOL WIN32API AdjustTokenGroups(HANDLE TokenHandle,
|
---|
707 | BOOL ResetToDefault,
|
---|
708 | PTOKEN_GROUPS NewState,
|
---|
709 | DWORD BufferLength,
|
---|
710 | PTOKEN_GROUPS PreviousState,
|
---|
711 | LPDWORD ReturnLength)
|
---|
712 | {
|
---|
713 | dprintf(("ADVAPI32: AdjustTokenGroups(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
714 | TokenHandle,
|
---|
715 | ResetToDefault,
|
---|
716 | NewState,
|
---|
717 | BufferLength,
|
---|
718 | PreviousState,
|
---|
719 | ReturnLength));
|
---|
720 |
|
---|
721 | return (FALSE); /* signal failure */
|
---|
722 | }
|
---|
723 |
|
---|
724 |
|
---|
725 |
|
---|
726 | /*****************************************************************************
|
---|
727 | * Name : AllocateLocallyUniqueId
|
---|
728 | * Purpose : The AllocateLocallyUniqueId function allocates a locally unique
|
---|
729 | * identifier (LUID).
|
---|
730 | * Parameters: PLUID Luid address of locally unique identifier
|
---|
731 | * Variables :
|
---|
732 | * Result :
|
---|
733 | * Remark :
|
---|
734 | * Status : UNTESTED STUB
|
---|
735 | *
|
---|
736 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
737 | *****************************************************************************/
|
---|
738 |
|
---|
739 | BOOL WIN32API AllocateLocallyUniqueId(PLUID Luid)
|
---|
740 | {
|
---|
741 | dprintf(("ADVAPI32: AllocateLocallyUniqueId(%08xh) not implemented.\n",
|
---|
742 | Luid));
|
---|
743 |
|
---|
744 | return (FALSE); /* signal failure */
|
---|
745 | }
|
---|
746 |
|
---|
747 |
|
---|
748 | /*****************************************************************************
|
---|
749 | * Name : AreAllAccessesGranted
|
---|
750 | * Purpose : The AreAllAccessesGranted function checks whether a set of
|
---|
751 | * requested access rights has been granted. The access rights are
|
---|
752 | * represented as bit flags in a 32-bit access mask.
|
---|
753 | * Parameters: DWORD GrantedAccess access mask for granted access rights
|
---|
754 | * DWORD DesiredAccess access mask for requested access rights
|
---|
755 | * Variables :
|
---|
756 | * Result :
|
---|
757 | * Remark :
|
---|
758 | * Status : UNTESTED STUB
|
---|
759 | *
|
---|
760 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
761 | *****************************************************************************/
|
---|
762 |
|
---|
763 | BOOL WIN32API AreAllAccessesGranted(DWORD GrantedAccess,
|
---|
764 | DWORD DesiredAccess)
|
---|
765 | {
|
---|
766 | dprintf(("ADVAPI32: AreAllAccessesGranted(%08xh,%08xh) not implemented.\n",
|
---|
767 | GrantedAccess,
|
---|
768 | DesiredAccess));
|
---|
769 |
|
---|
770 | return (TRUE); /* grant all access */
|
---|
771 | }
|
---|
772 |
|
---|
773 |
|
---|
774 | /*****************************************************************************
|
---|
775 | * Name : AreAnyAccessesGranted
|
---|
776 | * Purpose : The AreAnyAccessesGranted function tests whether any of a set of
|
---|
777 | * requested access rights has been granted. The access rights are
|
---|
778 | * represented as bit flags in a 32-bit access mask.
|
---|
779 | * Parameters: DWORD GrantedAccess access mask for granted access rights
|
---|
780 | * DWORD DesiredAccess access mask for requested access rights
|
---|
781 | * Variables :
|
---|
782 | * Result :
|
---|
783 | * Remark :
|
---|
784 | * Status : UNTESTED STUB
|
---|
785 | *
|
---|
786 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
787 | *****************************************************************************/
|
---|
788 |
|
---|
789 | BOOL WIN32API AreAnyAccessesGranted(DWORD GrantedAccess,
|
---|
790 | DWORD DesiredAccess)
|
---|
791 | {
|
---|
792 | dprintf(("ADVAPI32: AreAnyAccessesGranted(%08xh,%08xh) not implemented.\n",
|
---|
793 | GrantedAccess,
|
---|
794 | DesiredAccess));
|
---|
795 |
|
---|
796 | return (TRUE); /* grant all access */
|
---|
797 | }
|
---|
798 |
|
---|
799 | /*****************************************************************************
|
---|
800 | * Name : CreatePrivateObjectSecurity
|
---|
801 | * Purpose : The CreatePrivateObjectSecurity function allocates and initializes
|
---|
802 | * a self-relative security descriptor for a new protected server's
|
---|
803 | * object. This function is called when a new protected server object is being created.
|
---|
804 | * Parameters: PSECURITY_DESCRIPTOR ParentDescriptor address of parent directory SD
|
---|
805 | * PSECURITY_DESCRIPTOR CreatorDescriptor address of creator SD
|
---|
806 | * PSECURITY_DESCRIPTOR *NewDescriptor address of pointer to new SD
|
---|
807 | * BOOL IsDirectoryObject container flag for new SD
|
---|
808 | * HANDLE Token handle of client's access token
|
---|
809 | * PGENERIC_MAPPING GenericMapping address of access-rights structure
|
---|
810 | * Variables :
|
---|
811 | * Result :
|
---|
812 | * Remark :
|
---|
813 | * Status : UNTESTED STUB
|
---|
814 | *
|
---|
815 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
816 | *****************************************************************************/
|
---|
817 |
|
---|
818 | BOOL WIN32API CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR ParentDescriptor,
|
---|
819 | PSECURITY_DESCRIPTOR CreatorDescriptor,
|
---|
820 | PSECURITY_DESCRIPTOR *NewDescriptor,
|
---|
821 | BOOL IsDirectoryObject,
|
---|
822 | HANDLE Token,
|
---|
823 | PGENERIC_MAPPING GenericMapping)
|
---|
824 | {
|
---|
825 | dprintf(("ADVAPI32: CreatePrivateObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
826 | ParentDescriptor,
|
---|
827 | CreatorDescriptor,
|
---|
828 | NewDescriptor,
|
---|
829 | IsDirectoryObject,
|
---|
830 | Token,
|
---|
831 | GenericMapping));
|
---|
832 |
|
---|
833 | return (FALSE); /* signal failure */
|
---|
834 | }
|
---|
835 |
|
---|
836 |
|
---|
837 | /*****************************************************************************
|
---|
838 | * Name : CreateProcessAsUserA
|
---|
839 | * Purpose : The CreateProcessAsUser function creates a new process and its
|
---|
840 | * primary thread. The new process then executes a specified executable
|
---|
841 | * file. The CreateProcessAsUser function behaves just like the
|
---|
842 | * CreateProcess function, with one important difference: the
|
---|
843 | * created process runs in a context in which the system sees the
|
---|
844 | * user represented by the hToken parameter as if that user had
|
---|
845 | * logged on to the system and then called the CreateProcess function.
|
---|
846 | * Parameters: HANDLE hToken handle to a token that represents a logged-on user
|
---|
847 | * LPCSTR lpApplicationName pointer to name of executable module
|
---|
848 | * LPTSTR lpCommandLine pointer to command line string
|
---|
849 | * LPSECURITY_ATTRIBUTES lpProcessAttributes pointer to process security attributes
|
---|
850 | * LPSECURITY_ATTRIBUTES lpThreadAttributes pointer to thread security attributes
|
---|
851 | * BOOL bInheritHandles new process inherits handles
|
---|
852 | * DWORD dwCreationFlags creation flags
|
---|
853 | * LPVOID lpEnvironment pointer to new environment block
|
---|
854 | * LPCSTR lpCurrentDirectory pointer to current directory name
|
---|
855 | * LPSTARTUPINFO lpStartupInfo pointer to STARTUPINFO
|
---|
856 | * LPPROCESS_INFORMATION lpProcessInformation pointer to PROCESS_INFORMATION
|
---|
857 | * Variables :
|
---|
858 | * Result :
|
---|
859 | * Remark :
|
---|
860 | * Status : UNTESTED STUB
|
---|
861 | *
|
---|
862 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
863 | *****************************************************************************/
|
---|
864 |
|
---|
865 | BOOL WIN32API CreateProcessAsUserA(HANDLE hToken,
|
---|
866 | LPCSTR lpApplicationName,
|
---|
867 | LPTSTR lpCommandLine,
|
---|
868 | LPSECURITY_ATTRIBUTES lpProcessAttributes,
|
---|
869 | LPSECURITY_ATTRIBUTES lpThreadAttributes,
|
---|
870 | BOOL bInheritHandles,
|
---|
871 | DWORD dwCreationFlags,
|
---|
872 | LPVOID lpEnvironment,
|
---|
873 | LPCSTR lpCurrentDirectory,
|
---|
874 | LPSTARTUPINFOA lpStartupInfo,
|
---|
875 | LPPROCESS_INFORMATION lpProcessInformation)
|
---|
876 | {
|
---|
877 | dprintf(("ADVAPI32: CreateProcessAsUserA(%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%s,%08xh,%08xh) not implemented.\n",
|
---|
878 | hToken,
|
---|
879 | lpApplicationName,
|
---|
880 | lpCommandLine,
|
---|
881 | lpProcessAttributes,
|
---|
882 | lpThreadAttributes,
|
---|
883 | bInheritHandles,
|
---|
884 | dwCreationFlags,
|
---|
885 | lpEnvironment,
|
---|
886 | lpCurrentDirectory,
|
---|
887 | lpStartupInfo,
|
---|
888 | lpProcessInformation));
|
---|
889 |
|
---|
890 | return (FALSE); /* signal failure */
|
---|
891 | }
|
---|
892 |
|
---|
893 |
|
---|
894 | /*****************************************************************************
|
---|
895 | * Name : CreateProcessAsUserW
|
---|
896 | * Purpose : The CreateProcessAsUser function creates a new process and its
|
---|
897 | * primary thread. The new process then executes a specified executable
|
---|
898 | * file. The CreateProcessAsUser function behaves just like the
|
---|
899 | * CreateProcess function, with one important difference: the
|
---|
900 | * created process runs in a context in which the system sees the
|
---|
901 | * user represented by the hToken parameter as if that user had
|
---|
902 | * logged on to the system and then called the CreateProcess function.
|
---|
903 | * Parameters: HANDLE hToken handle to a token that represents a logged-on user
|
---|
904 | * LPCWSTR lpApplicationName pointer to name of executable module
|
---|
905 | * LPWSTR lpCommandLine pointer to command line string
|
---|
906 | * LPSECURITY_ATTRIBUTES lpProcessAttributes pointer to process security attributes
|
---|
907 | * LPSECURITY_ATTRIBUTES lpThreadAttributes pointer to thread security attributes
|
---|
908 | * BOOL bInheritHandles new process inherits handles
|
---|
909 | * DWORD dwCreationFlags creation flags
|
---|
910 | * LPVOID lpEnvironment pointer to new environment block
|
---|
911 | * LPCWSTR lpCurrentDirectory pointer to current directory name
|
---|
912 | * LPSTARTUPINFO lpStartupInfo pointer to STARTUPINFO
|
---|
913 | * LPPROCESS_INFORMATION lpProcessInformation pointer to PROCESS_INFORMATION
|
---|
914 | * Variables :
|
---|
915 | * Result :
|
---|
916 | * Remark :
|
---|
917 | * Status : UNTESTED STUB
|
---|
918 | *
|
---|
919 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
920 | *****************************************************************************/
|
---|
921 |
|
---|
922 | BOOL WIN32API CreateProcessAsUserW(HANDLE hToken,
|
---|
923 | LPCWSTR lpApplicationName,
|
---|
924 | LPWSTR lpCommandLine,
|
---|
925 | LPSECURITY_ATTRIBUTES lpProcessAttributes,
|
---|
926 | LPSECURITY_ATTRIBUTES lpThreadAttributes,
|
---|
927 | BOOL bInheritHandles,
|
---|
928 | DWORD dwCreationFlags,
|
---|
929 | LPVOID lpEnvironment,
|
---|
930 | LPCWSTR lpCurrentDirectory,
|
---|
931 | LPSTARTUPINFOA lpStartupInfo,
|
---|
932 | LPPROCESS_INFORMATION lpProcessInformation)
|
---|
933 | {
|
---|
934 | dprintf(("ADVAPI32: CreateProcessAsUserW(%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%s,%08xh,%08xh) not implemented.\n",
|
---|
935 | hToken,
|
---|
936 | lpApplicationName,
|
---|
937 | lpCommandLine,
|
---|
938 | lpProcessAttributes,
|
---|
939 | lpThreadAttributes,
|
---|
940 | bInheritHandles,
|
---|
941 | dwCreationFlags,
|
---|
942 | lpEnvironment,
|
---|
943 | lpCurrentDirectory,
|
---|
944 | lpStartupInfo,
|
---|
945 | lpProcessInformation));
|
---|
946 |
|
---|
947 | return (FALSE); /* signal failure */
|
---|
948 | }
|
---|
949 |
|
---|
950 |
|
---|
951 |
|
---|
952 | /*****************************************************************************
|
---|
953 | * Name : DeleteAce
|
---|
954 | * Purpose : The DeleteAce function deletes an ACE from an ACL.
|
---|
955 | * An ACE is an access-control entry. An ACL is an access-control list.
|
---|
956 | * Parameters: PACL pAcl address of access-control list
|
---|
957 | * DWORD dwAceIndex index of ACE position in ACL
|
---|
958 | * Variables :
|
---|
959 | * Result :
|
---|
960 | * Remark :
|
---|
961 | * Status : UNTESTED STUB
|
---|
962 | *
|
---|
963 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
964 | *****************************************************************************/
|
---|
965 |
|
---|
966 | BOOL WIN32API DeleteAce(PACL pAcl,
|
---|
967 | DWORD dwAceIndex)
|
---|
968 | {
|
---|
969 | dprintf(("ADVAPI32: DeleteAce(%08xh, %08xh) not implemented.\n",
|
---|
970 | pAcl,
|
---|
971 | dwAceIndex));
|
---|
972 |
|
---|
973 | return (FALSE); /* signal failure */
|
---|
974 | }
|
---|
975 |
|
---|
976 |
|
---|
977 |
|
---|
978 | /*****************************************************************************
|
---|
979 | * Name : DestroyPrivateObjectSecurity
|
---|
980 | * Purpose : The DestroyPrivateObjectSecurity function deletes a protected
|
---|
981 | * server object's security descriptor. This security descriptor
|
---|
982 | * must have been created by a call to the CreatePrivateObjectSecurity function.
|
---|
983 | * Parameters: PSECURITY_DESCRIPTOR * ObjectDescriptor address of pointer to SECURITY_DESCRIPTOR
|
---|
984 | * Variables :
|
---|
985 | * Result :
|
---|
986 | * Remark :
|
---|
987 | * Status : UNTESTED STUB
|
---|
988 | *
|
---|
989 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
990 | *****************************************************************************/
|
---|
991 |
|
---|
992 | BOOL WIN32API DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR *ObjectDescriptor)
|
---|
993 | {
|
---|
994 | dprintf(("ADVAPI32: DestroyPrivateObjectSecurity(%08xh) not implemented.\n",
|
---|
995 | ObjectDescriptor));
|
---|
996 |
|
---|
997 | return (FALSE); /* signal failure */
|
---|
998 | }
|
---|
999 |
|
---|
1000 |
|
---|
1001 | /*****************************************************************************
|
---|
1002 | * Name : DuplicateToken
|
---|
1003 | * Purpose : The DuplicateToken function creates a new access token that
|
---|
1004 | * duplicates one already in existence.
|
---|
1005 | * Parameters: HANDLE ExistingTokenHandle handle of token to duplicate
|
---|
1006 | * SECURITY_IMPERSONATION_LEVEL ImpersonationLevel impersonation level
|
---|
1007 | * PHANDLE DuplicateTokenHandle handle of duplicated token
|
---|
1008 | * Variables :
|
---|
1009 | * Result :
|
---|
1010 | * Remark :
|
---|
1011 | * Status : UNTESTED STUB
|
---|
1012 | *
|
---|
1013 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1014 | *****************************************************************************/
|
---|
1015 |
|
---|
1016 | BOOL WIN32API DuplicateToken(HANDLE ExistingTokenHandle,
|
---|
1017 | SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
|
---|
1018 | PHANDLE DuplicateTokenHandle)
|
---|
1019 | {
|
---|
1020 | dprintf(("ADVAPI32: DuplicateToken(%08x,%08xh,%08xh) not implemented.\n",
|
---|
1021 | ExistingTokenHandle,
|
---|
1022 | ImpersonationLevel,
|
---|
1023 | DuplicateTokenHandle));
|
---|
1024 |
|
---|
1025 | return (FALSE); /* signal failure */
|
---|
1026 | }
|
---|
1027 |
|
---|
1028 | /*****************************************************************************
|
---|
1029 | * Name : FindFirstFreeAce
|
---|
1030 | * Purpose : The FindFirstFreeAce function retrieves a pointer to the first
|
---|
1031 | * free byte in an access-control list (ACL).
|
---|
1032 | * Parameters: PACL pAcl address of access-control list
|
---|
1033 | * LPVOID *pAce address of pointer to first free byte
|
---|
1034 | * Variables :
|
---|
1035 | * Result :
|
---|
1036 | * Remark :
|
---|
1037 | * Status : UNTESTED STUB
|
---|
1038 | *
|
---|
1039 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1040 | *****************************************************************************/
|
---|
1041 |
|
---|
1042 | BOOL WIN32API FindFirstFreeAce(PACL pAcl,
|
---|
1043 | LPVOID *pAce)
|
---|
1044 | {
|
---|
1045 | dprintf(("ADVAPI32: FindFirstFreeAce(%08xh, %08xh) not implemented.\n",
|
---|
1046 | pAcl,
|
---|
1047 | pAce));
|
---|
1048 |
|
---|
1049 | return (FALSE); /* signal failure */
|
---|
1050 | }
|
---|
1051 |
|
---|
1052 |
|
---|
1053 | /*****************************************************************************
|
---|
1054 | * Name : GetAce
|
---|
1055 | * Purpose : The GetAce function obtains a pointer to an ACE in an ACL.
|
---|
1056 | * An ACE is an access control entry. An ACL is an access control list.
|
---|
1057 | * Parameters: PACL pAcl address of access-control list
|
---|
1058 | * DWORD dwAceIndex index of ACE to retrieve
|
---|
1059 | * LPVOID *pAce address of pointer to ACE
|
---|
1060 | * Variables :
|
---|
1061 | * Result :
|
---|
1062 | * Remark :
|
---|
1063 | * Status : UNTESTED STUB
|
---|
1064 | *
|
---|
1065 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1066 | *****************************************************************************/
|
---|
1067 |
|
---|
1068 | BOOL WIN32API GetAce(PACL pAcl,
|
---|
1069 | DWORD dwAceIndex,
|
---|
1070 | LPVOID *pAce)
|
---|
1071 | {
|
---|
1072 | dprintf(("ADVAPI32: GetAce(%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1073 | pAcl,
|
---|
1074 | dwAceIndex,
|
---|
1075 | pAce));
|
---|
1076 |
|
---|
1077 | return (FALSE); /* signal failure */
|
---|
1078 | }
|
---|
1079 |
|
---|
1080 |
|
---|
1081 | /*****************************************************************************
|
---|
1082 | * Name : GetAclInformation
|
---|
1083 | * Purpose : The GetAclInformation function retrieves information about an
|
---|
1084 | * access-control list (ACL).
|
---|
1085 | * Parameters: PACL pAcl address of access-control list
|
---|
1086 | * LPVOID pAclInformation address of ACL information
|
---|
1087 | * DWORD nAclInformationLength size of ACL information
|
---|
1088 | * ACL_INFORMATION_CLASS dwAclInformationClass class of requested information
|
---|
1089 | * Variables :
|
---|
1090 | * Result :
|
---|
1091 | * Remark :
|
---|
1092 | * Status : UNTESTED STUB
|
---|
1093 | *
|
---|
1094 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1095 | *****************************************************************************/
|
---|
1096 |
|
---|
1097 | BOOL WIN32API GetAclInformation(PACL pAcl,
|
---|
1098 | LPVOID pAclInformation,
|
---|
1099 | DWORD nAclInformationLength,
|
---|
1100 | ACL_INFORMATION_CLASS dwAclInformationClass)
|
---|
1101 | {
|
---|
1102 | dprintf(("ADVAPI32: GetAclInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1103 | pAcl,
|
---|
1104 | pAclInformation,
|
---|
1105 | nAclInformationLength,
|
---|
1106 | dwAclInformationClass));
|
---|
1107 |
|
---|
1108 | return (FALSE); /* signal failure */
|
---|
1109 | }
|
---|
1110 |
|
---|
1111 |
|
---|
1112 | /*****************************************************************************
|
---|
1113 | * Name : GetKernelObjectSecurity
|
---|
1114 | * Purpose : The GetKernelObjectSecurity function retrieves a copy of the
|
---|
1115 | * security descriptor protecting a kernel object.
|
---|
1116 | * Parameters: HANDLE Handle handle of object to query
|
---|
1117 | * SECURITY_INFORMATION RequestedInformation requested information
|
---|
1118 | * PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor
|
---|
1119 | * DWORD nLength size of buffer for security descriptor
|
---|
1120 | * LPDWORD lpnLengthNeeded address of required size of buffer
|
---|
1121 | * Variables :
|
---|
1122 | * Result :
|
---|
1123 | * Remark :
|
---|
1124 | * Status : UNTESTED STUB
|
---|
1125 | *
|
---|
1126 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1127 | *****************************************************************************/
|
---|
1128 |
|
---|
1129 | BOOL WIN32API GetKernelObjectSecurity(HANDLE Handle,
|
---|
1130 | SECURITY_INFORMATION RequestedInformation,
|
---|
1131 | PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
---|
1132 | DWORD nLength,
|
---|
1133 | LPDWORD lpnLengthNeeded)
|
---|
1134 | {
|
---|
1135 | dprintf(("ADVAPI32: GetKernelObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1136 | Handle,
|
---|
1137 | RequestedInformation,
|
---|
1138 | pSecurityDescriptor,
|
---|
1139 | nLength,
|
---|
1140 | lpnLengthNeeded));
|
---|
1141 |
|
---|
1142 | return (FALSE); /* signal failure */
|
---|
1143 | }
|
---|
1144 |
|
---|
1145 |
|
---|
1146 |
|
---|
1147 |
|
---|
1148 | /*****************************************************************************
|
---|
1149 | * Name : GetPrivateObjectSecurity
|
---|
1150 | * Purpose : The GetPrivateObjectSecurity retrieves information from a
|
---|
1151 | * protected server object's security descriptor.
|
---|
1152 | * Parameters: PSECURITY_DESCRIPTOR ObjectDescriptor address of SD to query
|
---|
1153 | * SECURITY_INFORMATION SecurityInformation requested information
|
---|
1154 | * PSECURITY_DESCRIPTOR ResultantDescriptor address of retrieved SD
|
---|
1155 | * DWORD DescriptorLength size of buffer for retrieved SD
|
---|
1156 | * LPDWORD ReturnLength address of buffer size required for SD
|
---|
1157 | * Variables :
|
---|
1158 | * Result :
|
---|
1159 | * Remark :
|
---|
1160 | * Status : UNTESTED STUB
|
---|
1161 | *
|
---|
1162 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1163 | *****************************************************************************/
|
---|
1164 |
|
---|
1165 | BOOL WIN32API GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR ObjectDescriptor,
|
---|
1166 | SECURITY_INFORMATION SecurityInformation,
|
---|
1167 | PSECURITY_DESCRIPTOR ResultantDescriptor,
|
---|
1168 | DWORD DescriptorLength,
|
---|
1169 | LPDWORD ReturnLength)
|
---|
1170 | {
|
---|
1171 | dprintf(("ADVAPI32: GetPrivateObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1172 | ObjectDescriptor,
|
---|
1173 | SecurityInformation,
|
---|
1174 | ResultantDescriptor,
|
---|
1175 | DescriptorLength,
|
---|
1176 | ReturnLength));
|
---|
1177 |
|
---|
1178 | return (FALSE); /* signal failure */
|
---|
1179 | }
|
---|
1180 |
|
---|
1181 |
|
---|
1182 | /*****************************************************************************
|
---|
1183 | * Name : ImpersonateLoggedOnUser
|
---|
1184 | * Purpose : The ImpersonateLoggedOnUser function lets the calling thread
|
---|
1185 | * impersonate a user. The user is represented by a token handle
|
---|
1186 | * obtained by calling the LogonUser function
|
---|
1187 | * Parameters: HANDLE hToken
|
---|
1188 | * Variables :
|
---|
1189 | * Result :
|
---|
1190 | * Remark :
|
---|
1191 | * Status : UNTESTED STUB
|
---|
1192 | *
|
---|
1193 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1194 | *****************************************************************************/
|
---|
1195 |
|
---|
1196 | BOOL WIN32API ImpersonateLoggedOnUser(HANDLE hToken)
|
---|
1197 | {
|
---|
1198 | dprintf(("ADVAPI32: ImpersonateLoggedOnUser(%08xh) not implemented.\n",
|
---|
1199 | hToken));
|
---|
1200 |
|
---|
1201 | return (TRUE); /* signal OK */
|
---|
1202 | }
|
---|
1203 |
|
---|
1204 |
|
---|
1205 | /*****************************************************************************
|
---|
1206 | * Name : ImpersonateNamedPipeClient
|
---|
1207 | * Purpose : The ImpersonateNamedPipeClient function impersonates a named-pipe
|
---|
1208 | * client application.
|
---|
1209 | * Parameters: HANDLE hNamedPipe handle of a named pipe
|
---|
1210 | * Variables :
|
---|
1211 | * Result :
|
---|
1212 | * Remark :
|
---|
1213 | * Status : UNTESTED STUB
|
---|
1214 | *
|
---|
1215 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1216 | *****************************************************************************/
|
---|
1217 |
|
---|
1218 | BOOL WIN32API ImpersonateNamedPipeClient(HANDLE hNamedPipe)
|
---|
1219 | {
|
---|
1220 | dprintf(("ADVAPI32: ImpersonateNamedPipeClient(%08xh) not implemented.\n",
|
---|
1221 | hNamedPipe));
|
---|
1222 |
|
---|
1223 | return (TRUE); /* signal OK */
|
---|
1224 | }
|
---|
1225 |
|
---|
1226 | /*****************************************************************************
|
---|
1227 | * Name : InitiateSystemShutdownA
|
---|
1228 | * Purpose : The InitiateSystemShutdown function initiates a shutdown and
|
---|
1229 | * optional restart of the specified computer.
|
---|
1230 | * Parameters: LPTSTR lpMachineName address of name of computer to shut down
|
---|
1231 | * LPTSTR lpMessage address of message to display in dialog box
|
---|
1232 | * DWORD dwTimeout time to display dialog box
|
---|
1233 | * BOOL bForceAppsClosed force applications with unsaved changes flag
|
---|
1234 | * BOOL bRebootAfterShutdown reboot flag
|
---|
1235 | * Variables :
|
---|
1236 | * Result :
|
---|
1237 | * Remark :
|
---|
1238 | * Status : UNTESTED STUB
|
---|
1239 | *
|
---|
1240 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1241 | *****************************************************************************/
|
---|
1242 |
|
---|
1243 | BOOL WIN32API InitiateSystemShutdownA(LPTSTR lpMachineName,
|
---|
1244 | LPTSTR lpMessage,
|
---|
1245 | DWORD dwTimeout,
|
---|
1246 | BOOL bForceAppsClosed,
|
---|
1247 | BOOL bRebootAfterShutdown)
|
---|
1248 | {
|
---|
1249 | dprintf(("ADVAPI32: InitiateSystemShutdownA(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1250 | lpMachineName,
|
---|
1251 | lpMessage,
|
---|
1252 | dwTimeout,
|
---|
1253 | bForceAppsClosed,
|
---|
1254 | bRebootAfterShutdown));
|
---|
1255 |
|
---|
1256 | return (FALSE); /* signal failure */
|
---|
1257 | }
|
---|
1258 |
|
---|
1259 |
|
---|
1260 | /*****************************************************************************
|
---|
1261 | * Name : InitiateSystemShutdownW
|
---|
1262 | * Purpose : The InitiateSystemShutdown function initiates a shutdown and
|
---|
1263 | * optional restart of the specified computer.
|
---|
1264 | * Parameters: LPWSTR lpMachineName address of name of computer to shut down
|
---|
1265 | * LPWSTR lpMessage address of message to display in dialog box
|
---|
1266 | * DWORD dwTimeout time to display dialog box
|
---|
1267 | * BOOL bForceAppsClosed force applications with unsaved changes flag
|
---|
1268 | * BOOL bRebootAfterShutdown reboot flag
|
---|
1269 | * Variables :
|
---|
1270 | * Result :
|
---|
1271 | * Remark :
|
---|
1272 | * Status : UNTESTED STUB
|
---|
1273 | *
|
---|
1274 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1275 | *****************************************************************************/
|
---|
1276 |
|
---|
1277 | BOOL WIN32API InitiateSystemShutdownW(LPWSTR lpMachineName,
|
---|
1278 | LPWSTR lpMessage,
|
---|
1279 | DWORD dwTimeout,
|
---|
1280 | BOOL bForceAppsClosed,
|
---|
1281 | BOOL bRebootAfterShutdown)
|
---|
1282 | {
|
---|
1283 | dprintf(("ADVAPI32: InitiateSystemShutdownW(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1284 | lpMachineName,
|
---|
1285 | lpMessage,
|
---|
1286 | dwTimeout,
|
---|
1287 | bForceAppsClosed,
|
---|
1288 | bRebootAfterShutdown));
|
---|
1289 |
|
---|
1290 | return (FALSE); /* signal failure */
|
---|
1291 | }
|
---|
1292 |
|
---|
1293 |
|
---|
1294 | /*****************************************************************************
|
---|
1295 | * Name : IsTextUnicode
|
---|
1296 | * Purpose : The IsTextUnicode function determines whether a buffer probably
|
---|
1297 | * contains a form of Unicode text. The function uses various
|
---|
1298 | * statistical and deterministic methods to make its determination,
|
---|
1299 | * under the control of flags passed via lpi. When the function
|
---|
1300 | * returns, the results of such tests are reported via lpi. If all
|
---|
1301 | * specified tests are passed, the function returns TRUE; otherwise,
|
---|
1302 | * it returns FALSE.
|
---|
1303 | * Parameters: CONST LPVOID lpBuffer pointer to an input buffer to be examined
|
---|
1304 | * int cb the size in bytes of the input buffer
|
---|
1305 | * LPINT lpi pointer to flags that condition text examination and receive results
|
---|
1306 | * Variables :
|
---|
1307 | * Result :
|
---|
1308 | * Remark :
|
---|
1309 | * Status : UNTESTED STUB
|
---|
1310 | *
|
---|
1311 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1312 | *****************************************************************************/
|
---|
1313 |
|
---|
1314 | DWORD WIN32API IsTextUnicode(CONST LPVOID lpBuffer,
|
---|
1315 | int cb,
|
---|
1316 | LPINT lpi)
|
---|
1317 | {
|
---|
1318 | DWORD dwResult = 0;
|
---|
1319 |
|
---|
1320 | dprintf(("ADVAPI32: IsTextUnicode(%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1321 | lpBuffer,
|
---|
1322 | cb,
|
---|
1323 | lpi));
|
---|
1324 |
|
---|
1325 | if (cb & 0x0001) dwResult |= IS_TEXT_UNICODE_ODD_LENGTH;
|
---|
1326 |
|
---|
1327 | return (dwResult); /* signal failure */
|
---|
1328 | }
|
---|
1329 |
|
---|
1330 |
|
---|
1331 | /*****************************************************************************
|
---|
1332 | * Name : IsValidAcl
|
---|
1333 | * Purpose : The IsValidAcl function validates an access-control list (ACL).
|
---|
1334 | * Parameters: PACL pAcl address of access-control list
|
---|
1335 | * Variables :
|
---|
1336 | * Result :
|
---|
1337 | * Remark :
|
---|
1338 | * Status : UNTESTED STUB
|
---|
1339 | *
|
---|
1340 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1341 | *****************************************************************************/
|
---|
1342 |
|
---|
1343 | BOOL WIN32API IsValidAcl(PACL pAcl)
|
---|
1344 | {
|
---|
1345 | dprintf(("ADVAPI32: IsValidAcl(%08xh) not implemented.\n",
|
---|
1346 | pAcl));
|
---|
1347 |
|
---|
1348 | return (TRUE); /* signal OK */
|
---|
1349 | }
|
---|
1350 |
|
---|
1351 |
|
---|
1352 | /*****************************************************************************
|
---|
1353 | * Name : LogonUserA
|
---|
1354 | * Purpose : The LogonUser function attempts to perform a user logon
|
---|
1355 | * operation. You specify the user with a user name and domain,
|
---|
1356 | * and authenticate the user with a clear-text password. If the
|
---|
1357 | * function succeeds, you receive a handle to a token that
|
---|
1358 | * represents the logged-on user. You can then use this token
|
---|
1359 | * handle to impersonate the specified user, or to create a process
|
---|
1360 | * running in the context of the specified user.
|
---|
1361 | * Parameters: LPTSTR lpszUsername string that specifies the user name
|
---|
1362 | * LPTSTR lpszDomain string that specifies the domain or servero
|
---|
1363 | * LPTSTR lpszPassword string that specifies the password
|
---|
1364 | * DWORD dwLogonType specifies the type of logon operation
|
---|
1365 | * DWORD dwLogonProvider specifies the logon provider
|
---|
1366 | * PHANDLE phToken pointer to variable to receive token handle
|
---|
1367 | * Variables :
|
---|
1368 | * Result :
|
---|
1369 | * Remark :
|
---|
1370 | * Status : UNTESTED STUB
|
---|
1371 | *
|
---|
1372 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1373 | *****************************************************************************/
|
---|
1374 |
|
---|
1375 | BOOL WIN32API LogonUserA(LPTSTR lpszUsername,
|
---|
1376 | LPTSTR lpszDomain,
|
---|
1377 | LPTSTR lpszPassword,
|
---|
1378 | DWORD dwLogonType,
|
---|
1379 | DWORD dwLogonProvider,
|
---|
1380 | PHANDLE phToken)
|
---|
1381 | {
|
---|
1382 | dprintf(("ADVAPI32: LogonUserA(%s,%s,%s,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1383 | lpszUsername,
|
---|
1384 | lpszDomain,
|
---|
1385 | lpszPassword,
|
---|
1386 | dwLogonType,
|
---|
1387 | dwLogonProvider,
|
---|
1388 | phToken));
|
---|
1389 |
|
---|
1390 | return (TRUE); /* signal OK */
|
---|
1391 | }
|
---|
1392 |
|
---|
1393 |
|
---|
1394 | /*****************************************************************************
|
---|
1395 | * Name : LogonUserW
|
---|
1396 | * Purpose : The LogonUser function attempts to perform a user logon
|
---|
1397 | * operation. You specify the user with a user name and domain,
|
---|
1398 | * and authenticate the user with a clear-text password. If the
|
---|
1399 | * function succeeds, you receive a handle to a token that
|
---|
1400 | * represents the logged-on user. You can then use this token
|
---|
1401 | * handle to impersonate the specified user, or to create a process
|
---|
1402 | * running in the context of the specified user.
|
---|
1403 | * Parameters: LPWSTR lpszUsername string that specifies the user name
|
---|
1404 | * LPWSTR lpszDomain string that specifies the domain or servero
|
---|
1405 | * LPWSTR lpszPassword string that specifies the password
|
---|
1406 | * DWORD dwLogonType specifies the type of logon operation
|
---|
1407 | * DWORD dwLogonProvider specifies the logon provider
|
---|
1408 | * PHANDLE phToken pointer to variable to receive token handle
|
---|
1409 | * Variables :
|
---|
1410 | * Result :
|
---|
1411 | * Remark :
|
---|
1412 | * Status : UNTESTED STUB
|
---|
1413 | *
|
---|
1414 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1415 | *****************************************************************************/
|
---|
1416 |
|
---|
1417 | BOOL WIN32API LogonUserW(LPWSTR lpszUsername,
|
---|
1418 | LPWSTR lpszDomain,
|
---|
1419 | LPWSTR lpszPassword,
|
---|
1420 | DWORD dwLogonType,
|
---|
1421 | DWORD dwLogonProvider,
|
---|
1422 | PHANDLE phToken)
|
---|
1423 | {
|
---|
1424 | dprintf(("ADVAPI32: LogonUserW(%s,%s,%s,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1425 | lpszUsername,
|
---|
1426 | lpszDomain,
|
---|
1427 | lpszPassword,
|
---|
1428 | dwLogonType,
|
---|
1429 | dwLogonProvider,
|
---|
1430 | phToken));
|
---|
1431 |
|
---|
1432 | return (TRUE); /* signal OK */
|
---|
1433 | }
|
---|
1434 |
|
---|
1435 |
|
---|
1436 | /*****************************************************************************
|
---|
1437 | * Name : LookupAccountNameA
|
---|
1438 | * Purpose : The LookupAccountName function accepts the name of a system and
|
---|
1439 | * an account as input. It retrieves a security identifier (SID)
|
---|
1440 | * for the account and the name of the domain on which the account was found.
|
---|
1441 | * Parameters: LPCSTR lpSystemName address of string for system name
|
---|
1442 | * LPCSTR lpAccountName address of string for account name
|
---|
1443 | * PSID Sid address of security identifier
|
---|
1444 | * LPDWORD cbSid address of size of security identifier
|
---|
1445 | * LPTSTR ReferencedDomainName address of string for referenced domain
|
---|
1446 | * LPDWORD cbReferencedDomainName address of size of domain string
|
---|
1447 | * PSID_NAME_USE peUse address of SID-type indicator
|
---|
1448 | * Variables :
|
---|
1449 | * Result :
|
---|
1450 | * Remark :
|
---|
1451 | * Status : UNTESTED STUB
|
---|
1452 | *
|
---|
1453 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1454 | *****************************************************************************/
|
---|
1455 |
|
---|
1456 | #define PSID_NAME_USE LPVOID
|
---|
1457 | BOOL WIN32API LookupAccountNameA(LPCSTR lpSystemName,
|
---|
1458 | LPCSTR lpAccountName,
|
---|
1459 | PSID Sid,
|
---|
1460 | LPDWORD cbSid,
|
---|
1461 | LPTSTR ReferencedDomainName,
|
---|
1462 | LPDWORD cbReferencedDomainName,
|
---|
1463 | PSID_NAME_USE peUse)
|
---|
1464 | {
|
---|
1465 | dprintf(("ADVAPI32: LookupAccountNameA(%s,%s,%08xh,%08xh,%s,%08xh,%08xh) not implemented.\n",
|
---|
1466 | lpSystemName,
|
---|
1467 | lpAccountName,
|
---|
1468 | Sid,
|
---|
1469 | cbSid,
|
---|
1470 | ReferencedDomainName,
|
---|
1471 | cbReferencedDomainName,
|
---|
1472 | peUse));
|
---|
1473 |
|
---|
1474 | return (FALSE); /* signal failure */
|
---|
1475 | }
|
---|
1476 |
|
---|
1477 |
|
---|
1478 | /*****************************************************************************
|
---|
1479 | * Name : LookupAccountNameW
|
---|
1480 | * Purpose : The LookupAccountName function accepts the name of a system and
|
---|
1481 | * an account as input. It retrieves a security identifier (SID)
|
---|
1482 | * for the account and the name of the domain on which the account was found.
|
---|
1483 | * Parameters: LPCWSTR lpSystemName address of string for system name
|
---|
1484 | * LPCWSTR lpAccountName address of string for account name
|
---|
1485 | * PSID Sid address of security identifier
|
---|
1486 | * LPDWORD cbSid address of size of security identifier
|
---|
1487 | * LPWSTR ReferencedDomainName address of string for referenced domain
|
---|
1488 | * LPDWORD cbReferencedDomainName address of size of domain string
|
---|
1489 | * PSID_NAME_USE peUse address of SID-type indicator
|
---|
1490 | * Variables :
|
---|
1491 | * Result :
|
---|
1492 | * Remark :
|
---|
1493 | * Status : UNTESTED STUB
|
---|
1494 | *
|
---|
1495 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1496 | *****************************************************************************/
|
---|
1497 |
|
---|
1498 | BOOL WIN32API LookupAccountNameW(LPCWSTR lpSystemName,
|
---|
1499 | LPCWSTR lpAccountName,
|
---|
1500 | PSID Sid,
|
---|
1501 | LPDWORD cbSid,
|
---|
1502 | LPWSTR ReferencedDomainName,
|
---|
1503 | LPDWORD cbReferencedDomainName,
|
---|
1504 | PSID_NAME_USE peUse)
|
---|
1505 | {
|
---|
1506 | dprintf(("ADVAPI32: LookupAccountNameW(%s,%s,%08xh,%08xh,%s,%08xh,%08xh) not implemented.\n",
|
---|
1507 | lpSystemName,
|
---|
1508 | lpAccountName,
|
---|
1509 | Sid,
|
---|
1510 | cbSid,
|
---|
1511 | ReferencedDomainName,
|
---|
1512 | cbReferencedDomainName,
|
---|
1513 | peUse));
|
---|
1514 |
|
---|
1515 | return (FALSE); /* signal failure */
|
---|
1516 | }
|
---|
1517 |
|
---|
1518 |
|
---|
1519 |
|
---|
1520 | /*****************************************************************************
|
---|
1521 | * Name : LookupPrivilegeDisplayNameA
|
---|
1522 | * Purpose : The LookupPrivilegeDisplayName function retrieves a displayable
|
---|
1523 | * name representing a specified privilege.
|
---|
1524 | * Parameters: LPCSTR lpSystemName address of string specifying the system
|
---|
1525 | * LPCSTR lpName address of string specifying the privilege
|
---|
1526 | * LPTSTR lpDisplayName address of string receiving the displayable name
|
---|
1527 | * LPDWORD cbDisplayName address of size of string for displayable name
|
---|
1528 | * LPDWORD lpLanguageId address of language identifier
|
---|
1529 | * Variables :
|
---|
1530 | * Result :
|
---|
1531 | * Remark :
|
---|
1532 | * Status : UNTESTED STUB
|
---|
1533 | *
|
---|
1534 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1535 | *****************************************************************************/
|
---|
1536 |
|
---|
1537 | BOOL WIN32API LookupPrivilegeDisplayNameA(LPCSTR lpSystemName,
|
---|
1538 | LPCSTR lpName,
|
---|
1539 | LPTSTR lpDisplayName,
|
---|
1540 | LPDWORD cbDisplayName,
|
---|
1541 | LPDWORD lpLanguageId)
|
---|
1542 | {
|
---|
1543 | dprintf(("ADVAPI32: LookupPrivilegeDisplayNameA(%s,%s,%s,%08xh,%08xh) not implemented.\n",
|
---|
1544 | lpSystemName,
|
---|
1545 | lpName,
|
---|
1546 | lpDisplayName,
|
---|
1547 | cbDisplayName,
|
---|
1548 | lpLanguageId));
|
---|
1549 |
|
---|
1550 | return (FALSE); /* signal failure */
|
---|
1551 | }
|
---|
1552 |
|
---|
1553 |
|
---|
1554 | /*****************************************************************************
|
---|
1555 | * Name : LookupPrivilegeDisplayNameW
|
---|
1556 | * Purpose : The LookupPrivilegeDisplayName function retrieves a displayable
|
---|
1557 | * name representing a specified privilege.
|
---|
1558 | * Parameters: LPCWSTR lpSystemName address of string specifying the system
|
---|
1559 | * LPCWSTR lpName address of string specifying the privilege
|
---|
1560 | * LPWSTR lpDisplayName address of string receiving the displayable name
|
---|
1561 | * LPDWORD cbDisplayName address of size of string for displayable name
|
---|
1562 | * LPDWORD lpLanguageId address of language identifier
|
---|
1563 | * Variables :
|
---|
1564 | * Result :
|
---|
1565 | * Remark :
|
---|
1566 | * Status : UNTESTED STUB
|
---|
1567 | *
|
---|
1568 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1569 | *****************************************************************************/
|
---|
1570 |
|
---|
1571 | BOOL WIN32API LookupPrivilegeDisplayNameW(LPCWSTR lpSystemName,
|
---|
1572 | LPCWSTR lpName,
|
---|
1573 | LPWSTR lpDisplayName,
|
---|
1574 | LPDWORD cbDisplayName,
|
---|
1575 | LPDWORD lpLanguageId)
|
---|
1576 | {
|
---|
1577 | dprintf(("ADVAPI32: LookupPrivilegeDisplayNameW(%s,%s,%s,%08xh,%08xh) not implemented.\n",
|
---|
1578 | lpSystemName,
|
---|
1579 | lpName,
|
---|
1580 | lpDisplayName,
|
---|
1581 | cbDisplayName,
|
---|
1582 | lpLanguageId));
|
---|
1583 |
|
---|
1584 | return (FALSE); /* signal failure */
|
---|
1585 | }
|
---|
1586 |
|
---|
1587 |
|
---|
1588 | /*****************************************************************************
|
---|
1589 | * Name : LookupPrivilegeNameA
|
---|
1590 | * Purpose : The LookupPrivilegeName function retrieves the name corresponding
|
---|
1591 | * to the privilege represented on a specific system by a specified
|
---|
1592 | * locally unique identifier (LUID).
|
---|
1593 | * Parameters: LPCSTR lpSystemName address of string specifying the system
|
---|
1594 | * PLUID lpLuid address of locally unique identifier
|
---|
1595 | * LPTSTR lpName address of string specifying the privilege
|
---|
1596 | * LPDWORD cbName address of size of string for displayable name
|
---|
1597 | * Variables :
|
---|
1598 | * Result :
|
---|
1599 | * Remark :
|
---|
1600 | * Status : UNTESTED STUB
|
---|
1601 | *
|
---|
1602 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1603 | *****************************************************************************/
|
---|
1604 |
|
---|
1605 | BOOL WIN32API LookupPrivilegeNameA(LPCSTR lpSystemName,
|
---|
1606 | PLUID lpLuid,
|
---|
1607 | LPTSTR lpName,
|
---|
1608 | LPDWORD cbName)
|
---|
1609 | {
|
---|
1610 | dprintf(("ADVAPI32: LookupPrivilegeNameA(%s,%08xh,%s,%08xh) not implemented.\n",
|
---|
1611 | lpSystemName,
|
---|
1612 | lpLuid,
|
---|
1613 | lpName,
|
---|
1614 | cbName));
|
---|
1615 |
|
---|
1616 | return (FALSE); /* signal failure */
|
---|
1617 | }
|
---|
1618 |
|
---|
1619 |
|
---|
1620 | /*****************************************************************************
|
---|
1621 | * Name : LookupPrivilegeNameW
|
---|
1622 | * Purpose : The LookupPrivilegeName function retrieves the name corresponding
|
---|
1623 | * to the privilege represented on a specific system by a specified
|
---|
1624 | * locally unique identifier (LUID).
|
---|
1625 | * Parameters: LPCWSTR lpSystemName address of string specifying the system
|
---|
1626 | * PLUID lpLuid address of locally unique identifier
|
---|
1627 | * LPWSTR lpName address of string specifying the privilege
|
---|
1628 | * LPDWORD cbName address of size of string for displayable name
|
---|
1629 | * Variables :
|
---|
1630 | * Result :
|
---|
1631 | * Remark :
|
---|
1632 | * Status : UNTESTED STUB
|
---|
1633 | *
|
---|
1634 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1635 | *****************************************************************************/
|
---|
1636 |
|
---|
1637 | BOOL WIN32API LookupPrivilegeNameW(LPCWSTR lpSystemName,
|
---|
1638 | PLUID lpLuid,
|
---|
1639 | LPWSTR lpName,
|
---|
1640 | LPDWORD cbName)
|
---|
1641 | {
|
---|
1642 | dprintf(("ADVAPI32: LookupPrivilegeNameW(%s,%08xh,%s,%08xh) not implemented.\n",
|
---|
1643 | lpSystemName,
|
---|
1644 | lpLuid,
|
---|
1645 | lpName,
|
---|
1646 | cbName));
|
---|
1647 |
|
---|
1648 | return (FALSE); /* signal failure */
|
---|
1649 | }
|
---|
1650 |
|
---|
1651 |
|
---|
1652 | /*****************************************************************************
|
---|
1653 | * Name : MakeAbsoluteSD
|
---|
1654 | * Purpose : The MakeAbsoluteSD function creates a security descriptor in
|
---|
1655 | * absolute format by using a security descriptor in self-relative
|
---|
1656 | * format as a template.
|
---|
1657 | * Parameters: PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor address self-relative SD
|
---|
1658 | * PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor address of absolute SD
|
---|
1659 | * LPDWORD lpdwAbsoluteSecurityDescriptorSize address of size of absolute SD
|
---|
1660 | * PACL pDacl address of discretionary ACL
|
---|
1661 | * LPDWORD lpdwDaclSize address of size of discretionary ACL
|
---|
1662 | * PACL pSacl address of system ACL
|
---|
1663 | * LPDWORD lpdwSaclSize address of size of system ACL
|
---|
1664 | * PSID pOwner address of owner SID
|
---|
1665 | * LPDWORD lpdwOwnerSize address of size of owner SID
|
---|
1666 | * PSID pPrimaryGroup address of primary-group SID
|
---|
1667 | * LPDWORD lpdwPrimaryGroupSize address of size of group SID
|
---|
1668 | * Variables :
|
---|
1669 | * Result :
|
---|
1670 | * Remark :
|
---|
1671 | * Status : UNTESTED STUB
|
---|
1672 | *
|
---|
1673 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1674 | *****************************************************************************/
|
---|
1675 |
|
---|
1676 | BOOL WIN32API MakeAbsoluteSD(PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
|
---|
1677 | PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
|
---|
1678 | LPDWORD lpdwAbsoluteSecurityDescriptorSize,
|
---|
1679 | PACL pDacl,
|
---|
1680 | LPDWORD lpdwDaclSize,
|
---|
1681 | PACL pSacl,
|
---|
1682 | LPDWORD lpdwSaclSize,
|
---|
1683 | PSID pOwner,
|
---|
1684 | LPDWORD lpdwOwnerSize,
|
---|
1685 | PSID pPrimaryGroup,
|
---|
1686 | LPDWORD lpdwPrimaryGroupSize)
|
---|
1687 | {
|
---|
1688 | dprintf(("ADVAPI32: MakeAbsoluteSD(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1689 | pSelfRelativeSecurityDescriptor,
|
---|
1690 | pAbsoluteSecurityDescriptor,
|
---|
1691 | lpdwAbsoluteSecurityDescriptorSize,
|
---|
1692 | pDacl,
|
---|
1693 | lpdwDaclSize,
|
---|
1694 | pSacl,
|
---|
1695 | lpdwSaclSize,
|
---|
1696 | pOwner,
|
---|
1697 | lpdwOwnerSize,
|
---|
1698 | pPrimaryGroup,
|
---|
1699 | lpdwPrimaryGroupSize));
|
---|
1700 |
|
---|
1701 | return (FALSE); /* signal failure */
|
---|
1702 | }
|
---|
1703 |
|
---|
1704 |
|
---|
1705 |
|
---|
1706 |
|
---|
1707 | /*****************************************************************************
|
---|
1708 | * Name : MapGenericMask
|
---|
1709 | * Purpose : The MapGenericMask function maps the generic access rights in
|
---|
1710 | * an access mask to specific and standard access rights. The function
|
---|
1711 | * applies a mapping supplied in a GENERIC_MAPPING structure.
|
---|
1712 | * Parameters: LPDWORD AccessMask address of access mask
|
---|
1713 | * PGENERIC_MAPPING GenericMapping address of GENERIC_MAPPING structure
|
---|
1714 | * Variables :
|
---|
1715 | * Result :
|
---|
1716 | * Remark :
|
---|
1717 | * Status : UNTESTED STUB
|
---|
1718 | *
|
---|
1719 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1720 | *****************************************************************************/
|
---|
1721 |
|
---|
1722 | VOID WIN32API MapGenericMask(LPDWORD AccessMask,
|
---|
1723 | PGENERIC_MAPPING GenericMapping)
|
---|
1724 | {
|
---|
1725 | dprintf(("ADVAPI32: MapGenericMask(%08xh,%08xh) not implemented.\n",
|
---|
1726 | AccessMask,
|
---|
1727 | GenericMapping));
|
---|
1728 | }
|
---|
1729 |
|
---|
1730 |
|
---|
1731 |
|
---|
1732 |
|
---|
1733 |
|
---|
1734 | /*****************************************************************************
|
---|
1735 | * Name : ObjectCloseAuditAlarmA
|
---|
1736 | * Purpose : The ObjectCloseAuditAlarm function generates audit messages when
|
---|
1737 | * a handle of an object is deleted. Alarms are not supported in the
|
---|
1738 | * current version of Windows NT.
|
---|
1739 | * Parameters: LPCSTR SubsystemName address of string for subsystem name
|
---|
1740 | * LPVOID HandleId address of handle identifier
|
---|
1741 | * BOOL GenerateOnClose flag for audit generation
|
---|
1742 | * Variables :
|
---|
1743 | * Result :
|
---|
1744 | * Remark :
|
---|
1745 | * Status : UNTESTED STUB
|
---|
1746 | *
|
---|
1747 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1748 | *****************************************************************************/
|
---|
1749 |
|
---|
1750 | BOOL WIN32API ObjectCloseAuditAlarmA(LPCSTR SubsystemName,
|
---|
1751 | LPVOID HandleId,
|
---|
1752 | BOOL GenerateOnClose)
|
---|
1753 | {
|
---|
1754 | dprintf(("ADVAPI32: ObjectCloseAuditAlarmA(%s,%08xh,%08xh) not implemented.\n",
|
---|
1755 | SubsystemName,
|
---|
1756 | HandleId,
|
---|
1757 | GenerateOnClose));
|
---|
1758 |
|
---|
1759 | return (FALSE); /* signal failure */
|
---|
1760 | }
|
---|
1761 |
|
---|
1762 |
|
---|
1763 | /*****************************************************************************
|
---|
1764 | * Name : ObjectCloseAuditAlarmW
|
---|
1765 | * Purpose : The ObjectCloseAuditAlarm function generates audit messages when
|
---|
1766 | * a handle of an object is deleted. Alarms are not supported in the
|
---|
1767 | * current version of Windows NT.
|
---|
1768 | * Parameters: LPCWSTR SubsystemName address of string for subsystem name
|
---|
1769 | * LPVOID HandleId address of handle identifier
|
---|
1770 | * BOOL GenerateOnClose flag for audit generation
|
---|
1771 | * Variables :
|
---|
1772 | * Result :
|
---|
1773 | * Remark :
|
---|
1774 | * Status : UNTESTED STUB
|
---|
1775 | *
|
---|
1776 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1777 | *****************************************************************************/
|
---|
1778 |
|
---|
1779 | BOOL WIN32API ObjectCloseAuditAlarmW(LPCWSTR SubsystemName,
|
---|
1780 | LPVOID HandleId,
|
---|
1781 | BOOL GenerateOnClose)
|
---|
1782 | {
|
---|
1783 | dprintf(("ADVAPI32: ObjectCloseAuditAlarmW(%s,%08xh,%08xh) not implemented.\n",
|
---|
1784 | SubsystemName,
|
---|
1785 | HandleId,
|
---|
1786 | GenerateOnClose));
|
---|
1787 |
|
---|
1788 | return (FALSE); /* signal failure */
|
---|
1789 | }
|
---|
1790 |
|
---|
1791 |
|
---|
1792 |
|
---|
1793 | /*****************************************************************************
|
---|
1794 | * Name : ObjectOpenAuditAlarmA
|
---|
1795 | * Purpose : The ObjectOpenAuditAlarm function generates audit messages when
|
---|
1796 | * a client application attempts to gain access to an object or to
|
---|
1797 | * create a new one. Alarms are not supported in the current version
|
---|
1798 | * of Windows NT.
|
---|
1799 | * Parameters: LPCSTR SubsystemName address of string for subsystem name
|
---|
1800 | * LPVOID HandleId address of handle identifier
|
---|
1801 | * LPTSTR ObjectTypeName address of string for object type
|
---|
1802 | * LPTSTR ObjectName address of string for object name
|
---|
1803 | * PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor
|
---|
1804 | * HANDLE ClientToken handle of client's access token
|
---|
1805 | * DWORD DesiredAccess mask for desired access rights
|
---|
1806 | * DWORD GrantedAccess mask for granted access rights
|
---|
1807 | * PPRIVILEGE_SET Privileges address of privileges
|
---|
1808 | * BOOL ObjectCreation flag for object creation
|
---|
1809 | * BOOL AccessGranted flag for results
|
---|
1810 | * LPBOOL GenerateOnClose address of flag for audit generation
|
---|
1811 | * Variables :
|
---|
1812 | * Result :
|
---|
1813 | * Remark :
|
---|
1814 | * Status : UNTESTED STUB
|
---|
1815 | *
|
---|
1816 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1817 | *****************************************************************************/
|
---|
1818 |
|
---|
1819 | BOOL WIN32API ObjectOpenAuditAlarmA(LPCSTR SubsystemName,
|
---|
1820 | LPVOID HandleId,
|
---|
1821 | LPTSTR ObjectTypeName,
|
---|
1822 | LPTSTR ObjectName,
|
---|
1823 | PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
---|
1824 | HANDLE ClientToken,
|
---|
1825 | DWORD DesiredAccess,
|
---|
1826 | DWORD GrantedAccess,
|
---|
1827 | PPRIVILEGE_SET Privileges,
|
---|
1828 | BOOL ObjectCreation,
|
---|
1829 | BOOL AccessGranted,
|
---|
1830 | LPBOOL GenerateOnClose)
|
---|
1831 | {
|
---|
1832 | dprintf(("ADVAPI32: ObjectOpenAuditAlarmA(%s,%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1833 | SubsystemName,
|
---|
1834 | HandleId,
|
---|
1835 | ObjectTypeName,
|
---|
1836 | ObjectName,
|
---|
1837 | pSecurityDescriptor,
|
---|
1838 | ClientToken,
|
---|
1839 | DesiredAccess,
|
---|
1840 | GrantedAccess,
|
---|
1841 | Privileges,
|
---|
1842 | ObjectCreation,
|
---|
1843 | AccessGranted,
|
---|
1844 | GenerateOnClose));
|
---|
1845 |
|
---|
1846 | return (FALSE); /* signal failure */
|
---|
1847 | }
|
---|
1848 |
|
---|
1849 |
|
---|
1850 | /*****************************************************************************
|
---|
1851 | * Name : ObjectOpenAuditAlarmW
|
---|
1852 | * Purpose : The ObjectOpenAuditAlarm function generates audit messages when
|
---|
1853 | * a client application attempts to gain access to an object or to
|
---|
1854 | * create a new one. Alarms are not supported in the current version
|
---|
1855 | * of Windows NT.
|
---|
1856 | * Parameters: LPCWSTR SubsystemName address of string for subsystem name
|
---|
1857 | * LPVOID HandleId address of handle identifier
|
---|
1858 | * LPWSTR ObjectTypeName address of string for object type
|
---|
1859 | * LPWSTR ObjectName address of string for object name
|
---|
1860 | * PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor
|
---|
1861 | * HANDLE ClientToken handle of client's access token
|
---|
1862 | * DWORD DesiredAccess mask for desired access rights
|
---|
1863 | * DWORD GrantedAccess mask for granted access rights
|
---|
1864 | * PPRIVILEGE_SET Privileges address of privileges
|
---|
1865 | * BOOL ObjectCreation flag for object creation
|
---|
1866 | * BOOL AccessGranted flag for results
|
---|
1867 | * LPBOOL GenerateOnClose address of flag for audit generation
|
---|
1868 | * Variables :
|
---|
1869 | * Result :
|
---|
1870 | * Remark :
|
---|
1871 | * Status : UNTESTED STUB
|
---|
1872 | *
|
---|
1873 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1874 | *****************************************************************************/
|
---|
1875 |
|
---|
1876 | BOOL WIN32API ObjectOpenAuditAlarmW(LPCWSTR SubsystemName,
|
---|
1877 | LPVOID HandleId,
|
---|
1878 | LPWSTR ObjectTypeName,
|
---|
1879 | LPWSTR ObjectName,
|
---|
1880 | PSECURITY_DESCRIPTOR pSecurityDescriptor,
|
---|
1881 | HANDLE ClientToken,
|
---|
1882 | DWORD DesiredAccess,
|
---|
1883 | DWORD GrantedAccess,
|
---|
1884 | PPRIVILEGE_SET Privileges,
|
---|
1885 | BOOL ObjectCreation,
|
---|
1886 | BOOL AccessGranted,
|
---|
1887 | LPBOOL GenerateOnClose)
|
---|
1888 | {
|
---|
1889 | dprintf(("ADVAPI32: ObjectOpenAuditAlarmW(%s,%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1890 | SubsystemName,
|
---|
1891 | HandleId,
|
---|
1892 | ObjectTypeName,
|
---|
1893 | ObjectName,
|
---|
1894 | pSecurityDescriptor,
|
---|
1895 | ClientToken,
|
---|
1896 | DesiredAccess,
|
---|
1897 | GrantedAccess,
|
---|
1898 | Privileges,
|
---|
1899 | ObjectCreation,
|
---|
1900 | AccessGranted,
|
---|
1901 | GenerateOnClose));
|
---|
1902 |
|
---|
1903 | return (FALSE); /* signal failure */
|
---|
1904 | }
|
---|
1905 |
|
---|
1906 |
|
---|
1907 | /*****************************************************************************
|
---|
1908 | * Name : ObjectPrivilegeAuditAlarmA
|
---|
1909 | * Purpose : The ObjectPrivilegeAuditAlarm function generates audit messages
|
---|
1910 | * as a result of a client's attempt to perform a privileged operation
|
---|
1911 | * on a server application object using an already opened handle of
|
---|
1912 | * that object. Alarms are not supported in the current version of Windows NT.
|
---|
1913 | * Parameters: LPCSTR lpszSubsystem address of string for subsystem name
|
---|
1914 | * LPVOID lpvHandleId address of handle identifier
|
---|
1915 | * HANDLE hClientToken handle of client's access token
|
---|
1916 | * DWORD dwDesiredAccess mask for desired access rights
|
---|
1917 | * PPRIVILEGE_SET pps address of privileges
|
---|
1918 | * BOOL fAccessGranted flag for results
|
---|
1919 | * Variables :
|
---|
1920 | * Result :
|
---|
1921 | * Remark :
|
---|
1922 | * Status : UNTESTED STUB
|
---|
1923 | *
|
---|
1924 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1925 | *****************************************************************************/
|
---|
1926 |
|
---|
1927 | BOOL WIN32API ObjectPrivilegeAuditAlarmA(LPCSTR lpszSubsystem,
|
---|
1928 | LPVOID lpvHandleId,
|
---|
1929 | HANDLE hClientToken,
|
---|
1930 | DWORD dwDesiredAccess,
|
---|
1931 | PPRIVILEGE_SET pps,
|
---|
1932 | BOOL fAccessGranted)
|
---|
1933 | {
|
---|
1934 | dprintf(("ADVAPI32: ObjectPrivilegeAuditAlarmA(%s,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1935 | lpszSubsystem,
|
---|
1936 | lpvHandleId,
|
---|
1937 | hClientToken,
|
---|
1938 | dwDesiredAccess,
|
---|
1939 | pps,
|
---|
1940 | fAccessGranted));
|
---|
1941 |
|
---|
1942 | return (FALSE); /* signal failure */
|
---|
1943 | }
|
---|
1944 |
|
---|
1945 |
|
---|
1946 | /*****************************************************************************
|
---|
1947 | * Name : ObjectPrivilegeAuditAlarmW
|
---|
1948 | * Purpose : The ObjectPrivilegeAuditAlarm function generates audit messages
|
---|
1949 | * as a result of a client's attempt to perform a privileged operation
|
---|
1950 | * on a server application object using an already opened handle of
|
---|
1951 | * that object. Alarms are not supported in the current version of Windows NT.
|
---|
1952 | * Parameters: LPCWSTR lpszSubsystem address of string for subsystem name
|
---|
1953 | * LPVOID lpvHandleId address of handle identifier
|
---|
1954 | * HANDLE hClientToken handle of client's access token
|
---|
1955 | * DWORD dwDesiredAccess mask for desired access rights
|
---|
1956 | * PPRIVILEGE_SET pps address of privileges
|
---|
1957 | * BOOL fAccessGranted flag for results
|
---|
1958 | * Variables :
|
---|
1959 | * Result :
|
---|
1960 | * Remark :
|
---|
1961 | * Status : UNTESTED STUB
|
---|
1962 | *
|
---|
1963 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1964 | *****************************************************************************/
|
---|
1965 |
|
---|
1966 | BOOL WIN32API ObjectPrivilegeAuditAlarmW(LPCWSTR lpszSubsystem,
|
---|
1967 | LPVOID lpvHandleId,
|
---|
1968 | HANDLE hClientToken,
|
---|
1969 | DWORD dwDesiredAccess,
|
---|
1970 | PPRIVILEGE_SET pps,
|
---|
1971 | BOOL fAccessGranted)
|
---|
1972 | {
|
---|
1973 | dprintf(("ADVAPI32: ObjectPrivilegeAuditAlarmW(%s,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1974 | lpszSubsystem,
|
---|
1975 | lpvHandleId,
|
---|
1976 | hClientToken,
|
---|
1977 | dwDesiredAccess,
|
---|
1978 | pps,
|
---|
1979 | fAccessGranted));
|
---|
1980 |
|
---|
1981 | return (FALSE); /* signal failure */
|
---|
1982 | }
|
---|
1983 |
|
---|
1984 | /*****************************************************************************
|
---|
1985 | * Name : PrivilegeCheck
|
---|
1986 | * Purpose : The PrivilegeCheck function tests the security context represented
|
---|
1987 | * by a specific access token to discover whether it contains the
|
---|
1988 | * specified privileges. This function is typically called by a server
|
---|
1989 | * application to check the privileges of a client's access token.
|
---|
1990 | * Parameters: HANDLE hClientToken handle of client's access token
|
---|
1991 | * PPRIVILEGE_SET pps address of privileges
|
---|
1992 | * LPBOOL lpfResult address of flag for result
|
---|
1993 | * Variables :
|
---|
1994 | * Result :
|
---|
1995 | * Remark :
|
---|
1996 | * Status : UNTESTED STUB
|
---|
1997 | *
|
---|
1998 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
1999 | *****************************************************************************/
|
---|
2000 |
|
---|
2001 | BOOL WIN32API PrivilegeCheck(HANDLE hClientToken,
|
---|
2002 | PPRIVILEGE_SET pps,
|
---|
2003 | LPBOOL lpfResult)
|
---|
2004 | {
|
---|
2005 | dprintf(("ADVAPI32: PrivilegeCheck(%08xh,%08xh,%08xh) not implemented.\n",
|
---|
2006 | hClientToken,
|
---|
2007 | pps,
|
---|
2008 | lpfResult));
|
---|
2009 |
|
---|
2010 | return (FALSE); /* signal failure */
|
---|
2011 | }
|
---|
2012 |
|
---|
2013 |
|
---|
2014 | /*****************************************************************************
|
---|
2015 | * Name : PrivilegedServiceAuditAlarmA
|
---|
2016 | * Purpose : The PrivilegedServiceAuditAlarm function generates audit messages
|
---|
2017 | * when an attempt is made to perform privileged system service
|
---|
2018 | * operations. Alarms are not supported in the current version of Windows NT.
|
---|
2019 | * Parameters: LPCSTR lpszSubsystem address of string for subsystem name
|
---|
2020 | * LPCSTR lpszService address of string for service name
|
---|
2021 | * HANDLE hClientToken handle of access token
|
---|
2022 | * PPRIVILEGE_SET pps address of privileges
|
---|
2023 | * BOOL fAccessGranted flag for granted access rights
|
---|
2024 | * Variables :
|
---|
2025 | * Result :
|
---|
2026 | * Remark :
|
---|
2027 | * Status : UNTESTED STUB
|
---|
2028 | *
|
---|
2029 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
2030 | *****************************************************************************/
|
---|
2031 |
|
---|
2032 | BOOL WIN32API PrivilegedServiceAuditAlarmA(LPCSTR lpszSubsystem,
|
---|
2033 | LPCSTR lpszService,
|
---|
2034 | HANDLE hClientToken,
|
---|
2035 | PPRIVILEGE_SET pps,
|
---|
2036 | BOOL fAccessGranted)
|
---|
2037 | {
|
---|
2038 | dprintf(("ADVAPI32: PrivilegedServiceAuditAlarmA(%s,%s,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
2039 | lpszSubsystem,
|
---|
2040 | lpszService,
|
---|
2041 | hClientToken,
|
---|
2042 | pps,
|
---|
2043 | fAccessGranted));
|
---|
2044 |
|
---|
2045 | return (FALSE); /* signal failure */
|
---|
2046 | }
|
---|
2047 |
|
---|
2048 |
|
---|
2049 | /*****************************************************************************
|
---|
2050 | * Name : PrivilegedServiceAuditAlarmW
|
---|
2051 | * Purpose : The PrivilegedServiceAuditAlarm function generates audit messages
|
---|
2052 | * when an attempt is made to perform privileged system service
|
---|
2053 | * operations. Alarms are not supported in the current version of Windows NT.
|
---|
2054 | * Parameters: LPCWSTR lpszSubsystem address of string for subsystem name
|
---|
2055 | * LPCWSTR lpszService address of string for service name
|
---|
2056 | * HANDLE hClientToken handle of access token
|
---|
2057 | * PPRIVILEGE_SET pps address of privileges
|
---|
2058 | * BOOL fAccessGranted flag for granted access rights
|
---|
2059 | * Variables :
|
---|
2060 | * Result :
|
---|
2061 | * Remark :
|
---|
2062 | * Status : UNTESTED STUB
|
---|
2063 | *
|
---|
2064 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
2065 | *****************************************************************************/
|
---|
2066 |
|
---|
2067 | BOOL WIN32API PrivilegedServiceAuditAlarmW(LPCWSTR lpszSubsystem,
|
---|
2068 | LPCWSTR lpszService,
|
---|
2069 | HANDLE hClientToken,
|
---|
2070 | PPRIVILEGE_SET pps,
|
---|
2071 | BOOL fAccessGranted)
|
---|
2072 | {
|
---|
2073 | dprintf(("ADVAPI32: PrivilegedServiceAuditAlarmW(%s,%s,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
2074 | lpszSubsystem,
|
---|
2075 | lpszService,
|
---|
2076 | hClientToken,
|
---|
2077 | pps,
|
---|
2078 | fAccessGranted));
|
---|
2079 |
|
---|
2080 | return (FALSE); /* signal failure */
|
---|
2081 | }
|
---|
2082 |
|
---|
2083 | /*****************************************************************************
|
---|
2084 | * Name : SetAclInformation
|
---|
2085 | * Purpose : The SetAclInformation function sets information about an access-control list (ACL).
|
---|
2086 | * Parameters: PACL pAcl address of access-control list
|
---|
2087 | * LPVOID lpvAclInfo address of ACL information
|
---|
2088 | * DWORD cbAclInfo size of ACL information
|
---|
2089 | * ACL_INFORMATION_CLASS aclic specifies class of requested info
|
---|
2090 | * Variables :
|
---|
2091 | * Result :
|
---|
2092 | * Remark :
|
---|
2093 | * Status : UNTESTED STUB
|
---|
2094 | *
|
---|
2095 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
2096 | *****************************************************************************/
|
---|
2097 |
|
---|
2098 | #define ACL_INFORMATION_CLASS DWORD
|
---|
2099 | BOOL WIN32API SetAclInformation(PACL pAcl,
|
---|
2100 | LPVOID lpvAclInfo,
|
---|
2101 | DWORD cbAclInfo,
|
---|
2102 | ACL_INFORMATION_CLASS aclic)
|
---|
2103 | {
|
---|
2104 | dprintf(("ADVAPI32: SetAclInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
2105 | pAcl,
|
---|
2106 | lpvAclInfo,
|
---|
2107 | cbAclInfo,
|
---|
2108 | aclic));
|
---|
2109 |
|
---|
2110 | return (FALSE); /* signal failure */
|
---|
2111 | }
|
---|
2112 |
|
---|
2113 |
|
---|
2114 | /*****************************************************************************
|
---|
2115 | * Name : SetKernelObjectSecurity
|
---|
2116 | * Purpose : The SetKernelObjectSecurity function sets the security of a kernel
|
---|
2117 | * object. For example, this can be a process, thread, or event.
|
---|
2118 | * Parameters: HANDLE hObject handle of object
|
---|
2119 | * SECURITY_INFORMATION si type of information to set
|
---|
2120 | * PSECURITY_DESCRIPTOR psd address of security descriptor
|
---|
2121 | * Variables :
|
---|
2122 | * Result :
|
---|
2123 | * Remark :
|
---|
2124 | * Status : UNTESTED STUB
|
---|
2125 | *
|
---|
2126 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
2127 | *****************************************************************************/
|
---|
2128 |
|
---|
2129 | BOOL WIN32API SetKernelObjectSecurity(HANDLE hObject,
|
---|
2130 | SECURITY_INFORMATION si,
|
---|
2131 | PSECURITY_DESCRIPTOR psd)
|
---|
2132 | {
|
---|
2133 | dprintf(("ADVAPI32: SetKernelObjectSecurity(%08xh,%08xh,%08xh) not implemented.\n",
|
---|
2134 | hObject,
|
---|
2135 | si,
|
---|
2136 | psd));
|
---|
2137 |
|
---|
2138 | return (FALSE); /* signal failure */
|
---|
2139 | }
|
---|
2140 |
|
---|
2141 |
|
---|
2142 | /*****************************************************************************
|
---|
2143 | * Name : SetPrivateObjectSecurity
|
---|
2144 | * Purpose : The SetPrivateObjectSecurity function modifies a private
|
---|
2145 | * object's security descriptor.
|
---|
2146 | * Parameters: SECURITY_INFORMATION si type of security information
|
---|
2147 | * PSECURITY_DESCRIPTOR psdSource address of SD to apply to object
|
---|
2148 | * PSECURITY_DESCRIPTOR *lppsdTarget address of object's SD
|
---|
2149 | * PGENERIC_MAPPING pgm address of access-mapping structure
|
---|
2150 | * HANDLE hClientToken handle of client access token
|
---|
2151 | * Variables :
|
---|
2152 | * Result :
|
---|
2153 | * Remark :
|
---|
2154 | * Status : UNTESTED STUB
|
---|
2155 | *
|
---|
2156 | * Author : Patrick Haller [Tue, 1998/06/16 23:00]
|
---|
2157 | *****************************************************************************/
|
---|
2158 |
|
---|
2159 |
|
---|
2160 | BOOL WIN32API SetPrivateObjectSecurity(SECURITY_INFORMATION si,
|
---|
2161 | PSECURITY_DESCRIPTOR psdSource,
|
---|
2162 | PSECURITY_DESCRIPTOR *lppsdTarget,
|
---|
2163 | PGENERIC_MAPPING pgm,
|
---|
2164 | HANDLE hClientToken)
|
---|
2165 | {
|
---|
2166 | dprintf(("ADVAPI32: SetPrivateObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
2167 | si,
|
---|
2168 | psdSource,
|
---|
2169 | lppsdTarget,
|
---|
2170 | pgm,
|
---|
2171 | hClientToken));
|
---|
2172 |
|
---|
2173 | return (FALSE); /* signal failure */
|
---|
2174 | }
|
---|
2175 |
|
---|
2176 |
|
---|
2177 |
|
---|
2178 |
|
---|
2179 |
|
---|
2180 |
|
---|