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