source: trunk/src/advapi32/ADVAPI32.CPP@ 4400

Last change on this file since 4400 was 4400, checked in by bird, 25 years ago

Did some attempt to make Watcom compile these files...
Had to wrap function declarations into extern "C" { } or else Watcom
generated mangled names.

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