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

Last change on this file since 5569 was 5569, checked in by sandervl, 24 years ago

forward Ace functions to ntdll

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