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