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