| 1 | /* $Id: ADVAPI32.CPP,v 1.20 2002-02-21 22:51:58 sandervl Exp $ */ | 
|---|
| 2 |  | 
|---|
| 3 | /* | 
|---|
| 4 | * Win32 advanced API functions for OS/2 | 
|---|
| 5 | * | 
|---|
| 6 | * 1998/06/12 | 
|---|
| 7 | * | 
|---|
| 8 | * Copyright 1998 Sander van Leeuwen | 
|---|
| 9 | * Copyright 1998 Patrick Haller | 
|---|
| 10 | * | 
|---|
| 11 | * @(#) ADVAPI32.C            1.0.1 1998/06/14 PH added stubs | 
|---|
| 12 | * | 
|---|
| 13 | * | 
|---|
| 14 | * Project Odin Software License can be found in LICENSE.TXT | 
|---|
| 15 | * | 
|---|
| 16 | */ | 
|---|
| 17 |  | 
|---|
| 18 |  | 
|---|
| 19 | /***************************************************************************** | 
|---|
| 20 | * Includes                                                                  * | 
|---|
| 21 | *****************************************************************************/ | 
|---|
| 22 |  | 
|---|
| 23 | #include <os2win.h> | 
|---|
| 24 | #include <stdlib.h> | 
|---|
| 25 | #include <stdarg.h> | 
|---|
| 26 | #include <string.h> | 
|---|
| 27 | #include <odinwrap.h> | 
|---|
| 28 | #include "misc.h" | 
|---|
| 29 | #include "advapi32.h" | 
|---|
| 30 | #include "unicode.h" | 
|---|
| 31 | #include "winreg.h" | 
|---|
| 32 | #include <heapstring.h> | 
|---|
| 33 |  | 
|---|
| 34 | ODINDEBUGCHANNEL(ADVAPI32-ADVAPI32) | 
|---|
| 35 |  | 
|---|
| 36 |  | 
|---|
| 37 | /***************************************************************************** | 
|---|
| 38 | * Defines                                                                   * | 
|---|
| 39 | *****************************************************************************/ | 
|---|
| 40 |  | 
|---|
| 41 | /* this define enables certain less important debug messages */ | 
|---|
| 42 | //#define DEBUG_LOCAL 1 | 
|---|
| 43 |  | 
|---|
| 44 |  | 
|---|
| 45 | /***************************************************************************** | 
|---|
| 46 | * Name      : SetTokenInformation | 
|---|
| 47 | * Purpose   : The SetTokenInformation function sets various types of | 
|---|
| 48 | *             information for a specified access token. The information it | 
|---|
| 49 | *             sets replaces existing information. The calling process must | 
|---|
| 50 | *             have appropriate access rights to set the information. | 
|---|
| 51 | * Parameters: HANDLE                  hToken         handle of access token | 
|---|
| 52 | *             TOKEN_INFORMATION_CLASS tic            type of information to set | 
|---|
| 53 | *             LPVOID                  lpvInformation address of information to set | 
|---|
| 54 | *             DWORD                   cbInformation  size of information buffer | 
|---|
| 55 | * Variables : | 
|---|
| 56 | * Result    : | 
|---|
| 57 | * Remark    : | 
|---|
| 58 | * Status    : UNTESTED STUB | 
|---|
| 59 | * | 
|---|
| 60 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 61 | *****************************************************************************/ | 
|---|
| 62 |  | 
|---|
| 63 | BOOL WIN32API SetTokenInformation(HANDLE                  hToken, | 
|---|
| 64 | TOKEN_INFORMATION_CLASS tic, | 
|---|
| 65 | LPVOID                  lpvInformation, | 
|---|
| 66 | DWORD                   cbInformation) | 
|---|
| 67 | { | 
|---|
| 68 | dprintf(("ADVAPI32: SetTokenInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 69 | hToken, | 
|---|
| 70 | tic, | 
|---|
| 71 | lpvInformation, | 
|---|
| 72 | cbInformation)); | 
|---|
| 73 |  | 
|---|
| 74 | return (FALSE); /* signal failure */ | 
|---|
| 75 | } | 
|---|
| 76 |  | 
|---|
| 77 | //****************************************************************************** | 
|---|
| 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 | /***************************************************************************** | 
|---|
| 1009 | * Name      : LookupAccountNameW | 
|---|
| 1010 | * Purpose   : The LookupAccountName function accepts the name of a system and | 
|---|
| 1011 | *             an account as input. It retrieves a security identifier (SID) | 
|---|
| 1012 | *             for the account and the name of the domain on which the account was found. | 
|---|
| 1013 | * Parameters: LPCWSTR       lpSystemName           address of string for system name | 
|---|
| 1014 | *             LPCWSTR       lpAccountName          address of string for account name | 
|---|
| 1015 | *             PSID          Sid                    address of security identifier | 
|---|
| 1016 | *             LPDWORD       cbSid                  address of size of security identifier | 
|---|
| 1017 | *             LPWSTR        ReferencedDomainName   address of string for referenced domain | 
|---|
| 1018 | *             LPDWORD       cbReferencedDomainName address of size of domain string | 
|---|
| 1019 | *             PSID_NAME_USE peUse                  address of SID-type indicator | 
|---|
| 1020 | * Variables : | 
|---|
| 1021 | * Result    : | 
|---|
| 1022 | * Remark    : | 
|---|
| 1023 | * Status    : UNTESTED STUB | 
|---|
| 1024 | * | 
|---|
| 1025 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1026 | *****************************************************************************/ | 
|---|
| 1027 |  | 
|---|
| 1028 | BOOL WIN32API LookupAccountNameW(LPCWSTR       lpSystemName, | 
|---|
| 1029 | LPCWSTR       lpAccountName, | 
|---|
| 1030 | PSID          Sid, | 
|---|
| 1031 | LPDWORD       cbSid, | 
|---|
| 1032 | LPWSTR        ReferencedDomainName, | 
|---|
| 1033 | LPDWORD       cbReferencedDomainName, | 
|---|
| 1034 | PSID_NAME_USE peUse) | 
|---|
| 1035 | { | 
|---|
| 1036 | dprintf(("ADVAPI32: LookupAccountNameW(%s,%s,%08xh,%08xh,%s,%08xh,%08xh) not implemented.\n", | 
|---|
| 1037 | lpSystemName, | 
|---|
| 1038 | lpAccountName, | 
|---|
| 1039 | Sid, | 
|---|
| 1040 | cbSid, | 
|---|
| 1041 | ReferencedDomainName, | 
|---|
| 1042 | cbReferencedDomainName, | 
|---|
| 1043 | peUse)); | 
|---|
| 1044 |  | 
|---|
| 1045 | return (FALSE); /* signal failure */ | 
|---|
| 1046 | } | 
|---|
| 1047 |  | 
|---|
| 1048 |  | 
|---|
| 1049 |  | 
|---|
| 1050 | /***************************************************************************** | 
|---|
| 1051 | * Name      : LookupPrivilegeDisplayNameA | 
|---|
| 1052 | * Purpose   : The LookupPrivilegeDisplayName function retrieves a displayable | 
|---|
| 1053 | *             name representing a specified privilege. | 
|---|
| 1054 | * Parameters: LPCSTR lpSystemName   address of string specifying the system | 
|---|
| 1055 | *             LPCSTR lpName         address of string specifying the privilege | 
|---|
| 1056 | *             LPTSTR  lpDisplayName  address of string receiving the displayable name | 
|---|
| 1057 | *             LPDWORD cbDisplayName  address of size of string for displayable name | 
|---|
| 1058 | *             LPDWORD lpLanguageId   address of language identifier | 
|---|
| 1059 | * Variables : | 
|---|
| 1060 | * Result    : | 
|---|
| 1061 | * Remark    : | 
|---|
| 1062 | * Status    : UNTESTED STUB | 
|---|
| 1063 | * | 
|---|
| 1064 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1065 | *****************************************************************************/ | 
|---|
| 1066 |  | 
|---|
| 1067 | BOOL WIN32API LookupPrivilegeDisplayNameA(LPCSTR lpSystemName, | 
|---|
| 1068 | LPCSTR lpName, | 
|---|
| 1069 | LPTSTR  lpDisplayName, | 
|---|
| 1070 | LPDWORD cbDisplayName, | 
|---|
| 1071 | LPDWORD lpLanguageId) | 
|---|
| 1072 | { | 
|---|
| 1073 | dprintf(("ADVAPI32: LookupPrivilegeDisplayNameA(%s,%s,%s,%08xh,%08xh) not implemented.\n", | 
|---|
| 1074 | lpSystemName, | 
|---|
| 1075 | lpName, | 
|---|
| 1076 | lpDisplayName, | 
|---|
| 1077 | cbDisplayName, | 
|---|
| 1078 | lpLanguageId)); | 
|---|
| 1079 |  | 
|---|
| 1080 | return (FALSE); /* signal failure */ | 
|---|
| 1081 | } | 
|---|
| 1082 |  | 
|---|
| 1083 |  | 
|---|
| 1084 | /***************************************************************************** | 
|---|
| 1085 | * Name      : LookupPrivilegeDisplayNameW | 
|---|
| 1086 | * Purpose   : The LookupPrivilegeDisplayName function retrieves a displayable | 
|---|
| 1087 | *             name representing a specified privilege. | 
|---|
| 1088 | * Parameters: LPCWSTR lpSystemName   address of string specifying the system | 
|---|
| 1089 | *             LPCWSTR lpName         address of string specifying the privilege | 
|---|
| 1090 | *             LPWSTR  lpDisplayName  address of string receiving the displayable name | 
|---|
| 1091 | *             LPDWORD cbDisplayName  address of size of string for displayable name | 
|---|
| 1092 | *             LPDWORD lpLanguageId   address of language identifier | 
|---|
| 1093 | * Variables : | 
|---|
| 1094 | * Result    : | 
|---|
| 1095 | * Remark    : | 
|---|
| 1096 | * Status    : UNTESTED STUB | 
|---|
| 1097 | * | 
|---|
| 1098 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1099 | *****************************************************************************/ | 
|---|
| 1100 |  | 
|---|
| 1101 | BOOL WIN32API LookupPrivilegeDisplayNameW(LPCWSTR lpSystemName, | 
|---|
| 1102 | LPCWSTR lpName, | 
|---|
| 1103 | LPWSTR  lpDisplayName, | 
|---|
| 1104 | LPDWORD cbDisplayName, | 
|---|
| 1105 | LPDWORD lpLanguageId) | 
|---|
| 1106 | { | 
|---|
| 1107 | dprintf(("ADVAPI32: LookupPrivilegeDisplayNameW(%s,%s,%s,%08xh,%08xh) not implemented.\n", | 
|---|
| 1108 | lpSystemName, | 
|---|
| 1109 | lpName, | 
|---|
| 1110 | lpDisplayName, | 
|---|
| 1111 | cbDisplayName, | 
|---|
| 1112 | lpLanguageId)); | 
|---|
| 1113 |  | 
|---|
| 1114 | return (FALSE); /* signal failure */ | 
|---|
| 1115 | } | 
|---|
| 1116 |  | 
|---|
| 1117 |  | 
|---|
| 1118 | /***************************************************************************** | 
|---|
| 1119 | * Name      : LookupPrivilegeNameA | 
|---|
| 1120 | * Purpose   : The LookupPrivilegeName function retrieves the name corresponding | 
|---|
| 1121 | *             to the privilege represented on a specific system by a specified | 
|---|
| 1122 | *             locally unique identifier (LUID). | 
|---|
| 1123 | * Parameters: LPCSTR lpSystemName address of string specifying the system | 
|---|
| 1124 | *             PLUID   lpLuid       address of locally unique identifier | 
|---|
| 1125 | *             LPTSTR  lpName       address of string specifying the privilege | 
|---|
| 1126 | *             LPDWORD cbName       address of size of string for displayable name | 
|---|
| 1127 | * Variables : | 
|---|
| 1128 | * Result    : | 
|---|
| 1129 | * Remark    : | 
|---|
| 1130 | * Status    : UNTESTED STUB | 
|---|
| 1131 | * | 
|---|
| 1132 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1133 | *****************************************************************************/ | 
|---|
| 1134 |  | 
|---|
| 1135 | BOOL WIN32API LookupPrivilegeNameA(LPCSTR lpSystemName, | 
|---|
| 1136 | PLUID   lpLuid, | 
|---|
| 1137 | LPTSTR  lpName, | 
|---|
| 1138 | LPDWORD cbName) | 
|---|
| 1139 | { | 
|---|
| 1140 | dprintf(("ADVAPI32: LookupPrivilegeNameA(%s,%08xh,%s,%08xh) not implemented.\n", | 
|---|
| 1141 | lpSystemName, | 
|---|
| 1142 | lpLuid, | 
|---|
| 1143 | lpName, | 
|---|
| 1144 | cbName)); | 
|---|
| 1145 |  | 
|---|
| 1146 | return (FALSE); /* signal failure */ | 
|---|
| 1147 | } | 
|---|
| 1148 |  | 
|---|
| 1149 |  | 
|---|
| 1150 | /***************************************************************************** | 
|---|
| 1151 | * Name      : LookupPrivilegeNameW | 
|---|
| 1152 | * Purpose   : The LookupPrivilegeName function retrieves the name corresponding | 
|---|
| 1153 | *             to the privilege represented on a specific system by a specified | 
|---|
| 1154 | *             locally unique identifier (LUID). | 
|---|
| 1155 | * Parameters: LPCWSTR lpSystemName address of string specifying the system | 
|---|
| 1156 | *             PLUID   lpLuid       address of locally unique identifier | 
|---|
| 1157 | *             LPWSTR  lpName       address of string specifying the privilege | 
|---|
| 1158 | *             LPDWORD cbName       address of size of string for displayable name | 
|---|
| 1159 | * Variables : | 
|---|
| 1160 | * Result    : | 
|---|
| 1161 | * Remark    : | 
|---|
| 1162 | * Status    : UNTESTED STUB | 
|---|
| 1163 | * | 
|---|
| 1164 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1165 | *****************************************************************************/ | 
|---|
| 1166 |  | 
|---|
| 1167 | BOOL WIN32API LookupPrivilegeNameW(LPCWSTR lpSystemName, | 
|---|
| 1168 | PLUID   lpLuid, | 
|---|
| 1169 | LPWSTR  lpName, | 
|---|
| 1170 | LPDWORD cbName) | 
|---|
| 1171 | { | 
|---|
| 1172 | dprintf(("ADVAPI32: LookupPrivilegeNameW(%s,%08xh,%s,%08xh) not implemented.\n", | 
|---|
| 1173 | lpSystemName, | 
|---|
| 1174 | lpLuid, | 
|---|
| 1175 | lpName, | 
|---|
| 1176 | cbName)); | 
|---|
| 1177 |  | 
|---|
| 1178 | return (FALSE); /* signal failure */ | 
|---|
| 1179 | } | 
|---|
| 1180 |  | 
|---|
| 1181 |  | 
|---|
| 1182 | /***************************************************************************** | 
|---|
| 1183 | * Name      : MakeAbsoluteSD | 
|---|
| 1184 | * Purpose   : The MakeAbsoluteSD function creates a security descriptor in | 
|---|
| 1185 | *             absolute format by using a security descriptor in self-relative | 
|---|
| 1186 | *             format as a template. | 
|---|
| 1187 | * Parameters: PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor    address self-relative SD | 
|---|
| 1188 | *             PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor        address of absolute SD | 
|---|
| 1189 | *             LPDWORD              lpdwAbsoluteSecurityDescriptorSize address of size of absolute SD | 
|---|
| 1190 | *             PACL                 pDacl                              address of discretionary ACL | 
|---|
| 1191 | *             LPDWORD              lpdwDaclSize                       address of size of discretionary ACL | 
|---|
| 1192 | *             PACL                 pSacl                              address of system ACL | 
|---|
| 1193 | *             LPDWORD              lpdwSaclSize                       address of size of system ACL | 
|---|
| 1194 | *             PSID                 pOwner                             address of owner SID | 
|---|
| 1195 | *             LPDWORD              lpdwOwnerSize                      address of size of owner SID | 
|---|
| 1196 | *             PSID                 pPrimaryGroup                      address of primary-group SID | 
|---|
| 1197 | *             LPDWORD              lpdwPrimaryGroupSize               address of size of group SID | 
|---|
| 1198 | * Variables : | 
|---|
| 1199 | * Result    : | 
|---|
| 1200 | * Remark    : | 
|---|
| 1201 | * Status    : UNTESTED STUB | 
|---|
| 1202 | * | 
|---|
| 1203 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1204 | *****************************************************************************/ | 
|---|
| 1205 |  | 
|---|
| 1206 | BOOL WIN32API MakeAbsoluteSD(PSECURITY_DESCRIPTOR  pSelfRelativeSecurityDescriptor, | 
|---|
| 1207 | PSECURITY_DESCRIPTOR  pAbsoluteSecurityDescriptor, | 
|---|
| 1208 | LPDWORD               lpdwAbsoluteSecurityDescriptorSize, | 
|---|
| 1209 | PACL                  pDacl, | 
|---|
| 1210 | LPDWORD               lpdwDaclSize, | 
|---|
| 1211 | PACL                  pSacl, | 
|---|
| 1212 | LPDWORD               lpdwSaclSize, | 
|---|
| 1213 | PSID                  pOwner, | 
|---|
| 1214 | LPDWORD               lpdwOwnerSize, | 
|---|
| 1215 | PSID                  pPrimaryGroup, | 
|---|
| 1216 | LPDWORD               lpdwPrimaryGroupSize) | 
|---|
| 1217 | { | 
|---|
| 1218 | dprintf(("ADVAPI32: MakeAbsoluteSD(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1219 | pSelfRelativeSecurityDescriptor, | 
|---|
| 1220 | pAbsoluteSecurityDescriptor, | 
|---|
| 1221 | lpdwAbsoluteSecurityDescriptorSize, | 
|---|
| 1222 | pDacl, | 
|---|
| 1223 | lpdwDaclSize, | 
|---|
| 1224 | pSacl, | 
|---|
| 1225 | lpdwSaclSize, | 
|---|
| 1226 | pOwner, | 
|---|
| 1227 | lpdwOwnerSize, | 
|---|
| 1228 | pPrimaryGroup, | 
|---|
| 1229 | lpdwPrimaryGroupSize)); | 
|---|
| 1230 |  | 
|---|
| 1231 | return (FALSE); /* signal failure */ | 
|---|
| 1232 | } | 
|---|
| 1233 |  | 
|---|
| 1234 |  | 
|---|
| 1235 |  | 
|---|
| 1236 |  | 
|---|
| 1237 | /***************************************************************************** | 
|---|
| 1238 | * Name      : MapGenericMask | 
|---|
| 1239 | * Purpose   : The MapGenericMask function maps the generic access rights in | 
|---|
| 1240 | *             an access mask to specific and standard access rights. The function | 
|---|
| 1241 | *             applies a mapping supplied in a GENERIC_MAPPING structure. | 
|---|
| 1242 | * Parameters: LPDWORD            AccessMask     address of access mask | 
|---|
| 1243 | *             PGENERIC_MAPPING  GenericMapping address of GENERIC_MAPPING structure | 
|---|
| 1244 | * Variables : | 
|---|
| 1245 | * Result    : | 
|---|
| 1246 | * Remark    : | 
|---|
| 1247 | * Status    : UNTESTED STUB | 
|---|
| 1248 | * | 
|---|
| 1249 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1250 | *****************************************************************************/ | 
|---|
| 1251 |  | 
|---|
| 1252 | VOID WIN32API MapGenericMask(LPDWORD           AccessMask, | 
|---|
| 1253 | PGENERIC_MAPPING GenericMapping) | 
|---|
| 1254 | { | 
|---|
| 1255 | dprintf(("ADVAPI32: MapGenericMask(%08xh,%08xh) not implemented.\n", | 
|---|
| 1256 | AccessMask, | 
|---|
| 1257 | GenericMapping)); | 
|---|
| 1258 | } | 
|---|
| 1259 |  | 
|---|
| 1260 |  | 
|---|
| 1261 |  | 
|---|
| 1262 |  | 
|---|
| 1263 |  | 
|---|
| 1264 | /***************************************************************************** | 
|---|
| 1265 | * Name      : ObjectCloseAuditAlarmA | 
|---|
| 1266 | * Purpose   : The ObjectCloseAuditAlarm function generates audit messages when | 
|---|
| 1267 | *             a handle of an object is deleted. Alarms are not supported in the | 
|---|
| 1268 | *             current version of Windows NT. | 
|---|
| 1269 | * Parameters: LPCSTR SubsystemName   address of string for subsystem name | 
|---|
| 1270 | *             LPVOID  HandleId        address of handle identifier | 
|---|
| 1271 | *             BOOL    GenerateOnClose flag for audit generation | 
|---|
| 1272 | * Variables : | 
|---|
| 1273 | * Result    : | 
|---|
| 1274 | * Remark    : | 
|---|
| 1275 | * Status    : UNTESTED STUB | 
|---|
| 1276 | * | 
|---|
| 1277 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1278 | *****************************************************************************/ | 
|---|
| 1279 |  | 
|---|
| 1280 | BOOL WIN32API ObjectCloseAuditAlarmA(LPCSTR SubsystemName, | 
|---|
| 1281 | LPVOID  HandleId, | 
|---|
| 1282 | BOOL    GenerateOnClose) | 
|---|
| 1283 | { | 
|---|
| 1284 | dprintf(("ADVAPI32: ObjectCloseAuditAlarmA(%s,%08xh,%08xh) not implemented.\n", | 
|---|
| 1285 | SubsystemName, | 
|---|
| 1286 | HandleId, | 
|---|
| 1287 | GenerateOnClose)); | 
|---|
| 1288 |  | 
|---|
| 1289 | return (FALSE); /* signal failure */ | 
|---|
| 1290 | } | 
|---|
| 1291 |  | 
|---|
| 1292 |  | 
|---|
| 1293 | /***************************************************************************** | 
|---|
| 1294 | * Name      : ObjectCloseAuditAlarmW | 
|---|
| 1295 | * Purpose   : The ObjectCloseAuditAlarm function generates audit messages when | 
|---|
| 1296 | *             a handle of an object is deleted. Alarms are not supported in the | 
|---|
| 1297 | *             current version of Windows NT. | 
|---|
| 1298 | * Parameters: LPCWSTR SubsystemName   address of string for subsystem name | 
|---|
| 1299 | *             LPVOID  HandleId        address of handle identifier | 
|---|
| 1300 | *             BOOL    GenerateOnClose flag for audit generation | 
|---|
| 1301 | * Variables : | 
|---|
| 1302 | * Result    : | 
|---|
| 1303 | * Remark    : | 
|---|
| 1304 | * Status    : UNTESTED STUB | 
|---|
| 1305 | * | 
|---|
| 1306 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1307 | *****************************************************************************/ | 
|---|
| 1308 |  | 
|---|
| 1309 | BOOL WIN32API ObjectCloseAuditAlarmW(LPCWSTR SubsystemName, | 
|---|
| 1310 | LPVOID  HandleId, | 
|---|
| 1311 | BOOL    GenerateOnClose) | 
|---|
| 1312 | { | 
|---|
| 1313 | dprintf(("ADVAPI32: ObjectCloseAuditAlarmW(%s,%08xh,%08xh) not implemented.\n", | 
|---|
| 1314 | SubsystemName, | 
|---|
| 1315 | HandleId, | 
|---|
| 1316 | GenerateOnClose)); | 
|---|
| 1317 |  | 
|---|
| 1318 | return (FALSE); /* signal failure */ | 
|---|
| 1319 | } | 
|---|
| 1320 |  | 
|---|
| 1321 |  | 
|---|
| 1322 |  | 
|---|
| 1323 | /***************************************************************************** | 
|---|
| 1324 | * Name      : ObjectOpenAuditAlarmA | 
|---|
| 1325 | * Purpose   : The ObjectOpenAuditAlarm function generates audit messages when | 
|---|
| 1326 | *             a client application attempts to gain access to an object or to | 
|---|
| 1327 | *             create a new one. Alarms are not supported in the current version | 
|---|
| 1328 | *             of Windows NT. | 
|---|
| 1329 | * Parameters: LPCSTR              SubsystemName       address of string for subsystem name | 
|---|
| 1330 | *             LPVOID               HandleId            address of handle identifier | 
|---|
| 1331 | *             LPTSTR               ObjectTypeName      address of string for object type | 
|---|
| 1332 | *             LPTSTR               ObjectName          address of string for object name | 
|---|
| 1333 | *             PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor | 
|---|
| 1334 | *             HANDLE               ClientToken         handle of client's access token | 
|---|
| 1335 | *             DWORD                DesiredAccess       mask for desired access rights | 
|---|
| 1336 | *             DWORD                GrantedAccess       mask for granted access rights | 
|---|
| 1337 | *             PPRIVILEGE_SET       Privileges          address of privileges | 
|---|
| 1338 | *             BOOL                 ObjectCreation      flag for object creation | 
|---|
| 1339 | *             BOOL                 AccessGranted       flag for results | 
|---|
| 1340 | *             LPBOOL               GenerateOnClose     address of 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 ObjectOpenAuditAlarmA(LPCSTR              SubsystemName, | 
|---|
| 1350 | LPVOID               HandleId, | 
|---|
| 1351 | LPTSTR               ObjectTypeName, | 
|---|
| 1352 | LPTSTR               ObjectName, | 
|---|
| 1353 | PSECURITY_DESCRIPTOR pSecurityDescriptor, | 
|---|
| 1354 | HANDLE               ClientToken, | 
|---|
| 1355 | DWORD                DesiredAccess, | 
|---|
| 1356 | DWORD                GrantedAccess, | 
|---|
| 1357 | PPRIVILEGE_SET       Privileges, | 
|---|
| 1358 | BOOL                 ObjectCreation, | 
|---|
| 1359 | BOOL                 AccessGranted, | 
|---|
| 1360 | LPBOOL               GenerateOnClose) | 
|---|
| 1361 | { | 
|---|
| 1362 | dprintf(("ADVAPI32: ObjectOpenAuditAlarmA(%s,%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1363 | SubsystemName, | 
|---|
| 1364 | HandleId, | 
|---|
| 1365 | ObjectTypeName, | 
|---|
| 1366 | ObjectName, | 
|---|
| 1367 | pSecurityDescriptor, | 
|---|
| 1368 | ClientToken, | 
|---|
| 1369 | DesiredAccess, | 
|---|
| 1370 | GrantedAccess, | 
|---|
| 1371 | Privileges, | 
|---|
| 1372 | ObjectCreation, | 
|---|
| 1373 | AccessGranted, | 
|---|
| 1374 | GenerateOnClose)); | 
|---|
| 1375 |  | 
|---|
| 1376 | return (FALSE); /* signal failure */ | 
|---|
| 1377 | } | 
|---|
| 1378 |  | 
|---|
| 1379 |  | 
|---|
| 1380 | /***************************************************************************** | 
|---|
| 1381 | * Name      : ObjectOpenAuditAlarmW | 
|---|
| 1382 | * Purpose   : The ObjectOpenAuditAlarm function generates audit messages when | 
|---|
| 1383 | *             a client application attempts to gain access to an object or to | 
|---|
| 1384 | *             create a new one. Alarms are not supported in the current version | 
|---|
| 1385 | *             of Windows NT. | 
|---|
| 1386 | * Parameters: LPCWSTR              SubsystemName       address of string for subsystem name | 
|---|
| 1387 | *             LPVOID               HandleId            address of handle identifier | 
|---|
| 1388 | *             LPWSTR               ObjectTypeName      address of string for object type | 
|---|
| 1389 | *             LPWSTR               ObjectName          address of string for object name | 
|---|
| 1390 | *             PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor | 
|---|
| 1391 | *             HANDLE               ClientToken         handle of client's access token | 
|---|
| 1392 | *             DWORD                DesiredAccess       mask for desired access rights | 
|---|
| 1393 | *             DWORD                GrantedAccess       mask for granted access rights | 
|---|
| 1394 | *             PPRIVILEGE_SET       Privileges          address of privileges | 
|---|
| 1395 | *             BOOL                 ObjectCreation      flag for object creation | 
|---|
| 1396 | *             BOOL                 AccessGranted       flag for results | 
|---|
| 1397 | *             LPBOOL               GenerateOnClose     address of flag for audit generation | 
|---|
| 1398 | * Variables : | 
|---|
| 1399 | * Result    : | 
|---|
| 1400 | * Remark    : | 
|---|
| 1401 | * Status    : UNTESTED STUB | 
|---|
| 1402 | * | 
|---|
| 1403 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1404 | *****************************************************************************/ | 
|---|
| 1405 |  | 
|---|
| 1406 | BOOL WIN32API ObjectOpenAuditAlarmW(LPCWSTR              SubsystemName, | 
|---|
| 1407 | LPVOID               HandleId, | 
|---|
| 1408 | LPWSTR               ObjectTypeName, | 
|---|
| 1409 | LPWSTR               ObjectName, | 
|---|
| 1410 | PSECURITY_DESCRIPTOR pSecurityDescriptor, | 
|---|
| 1411 | HANDLE               ClientToken, | 
|---|
| 1412 | DWORD                DesiredAccess, | 
|---|
| 1413 | DWORD                GrantedAccess, | 
|---|
| 1414 | PPRIVILEGE_SET       Privileges, | 
|---|
| 1415 | BOOL                 ObjectCreation, | 
|---|
| 1416 | BOOL                 AccessGranted, | 
|---|
| 1417 | LPBOOL               GenerateOnClose) | 
|---|
| 1418 | { | 
|---|
| 1419 | dprintf(("ADVAPI32: ObjectOpenAuditAlarmW(%s,%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1420 | SubsystemName, | 
|---|
| 1421 | HandleId, | 
|---|
| 1422 | ObjectTypeName, | 
|---|
| 1423 | ObjectName, | 
|---|
| 1424 | pSecurityDescriptor, | 
|---|
| 1425 | ClientToken, | 
|---|
| 1426 | DesiredAccess, | 
|---|
| 1427 | GrantedAccess, | 
|---|
| 1428 | Privileges, | 
|---|
| 1429 | ObjectCreation, | 
|---|
| 1430 | AccessGranted, | 
|---|
| 1431 | GenerateOnClose)); | 
|---|
| 1432 |  | 
|---|
| 1433 | return (FALSE); /* signal failure */ | 
|---|
| 1434 | } | 
|---|
| 1435 |  | 
|---|
| 1436 |  | 
|---|
| 1437 | /***************************************************************************** | 
|---|
| 1438 | * Name      : ObjectPrivilegeAuditAlarmA | 
|---|
| 1439 | * Purpose   : The ObjectPrivilegeAuditAlarm function generates audit messages | 
|---|
| 1440 | *             as a result of a client's attempt to perform a privileged operation | 
|---|
| 1441 | *             on a server application object using an already opened handle of | 
|---|
| 1442 | *             that object. Alarms are not supported in the current version of Windows NT. | 
|---|
| 1443 | * Parameters: LPCSTR        lpszSubsystem   address of string for subsystem name | 
|---|
| 1444 | *             LPVOID         lpvHandleId     address of handle identifier | 
|---|
| 1445 | *             HANDLE         hClientToken    handle of client's access token | 
|---|
| 1446 | *             DWORD          dwDesiredAccess mask for desired access rights | 
|---|
| 1447 | *             PPRIVILEGE_SET pps             address of privileges | 
|---|
| 1448 | *             BOOL           fAccessGranted  flag for results | 
|---|
| 1449 | * Variables : | 
|---|
| 1450 | * Result    : | 
|---|
| 1451 | * Remark    : | 
|---|
| 1452 | * Status    : UNTESTED STUB | 
|---|
| 1453 | * | 
|---|
| 1454 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1455 | *****************************************************************************/ | 
|---|
| 1456 |  | 
|---|
| 1457 | BOOL WIN32API ObjectPrivilegeAuditAlarmA(LPCSTR        lpszSubsystem, | 
|---|
| 1458 | LPVOID         lpvHandleId, | 
|---|
| 1459 | HANDLE         hClientToken, | 
|---|
| 1460 | DWORD          dwDesiredAccess, | 
|---|
| 1461 | PPRIVILEGE_SET pps, | 
|---|
| 1462 | BOOL           fAccessGranted) | 
|---|
| 1463 | { | 
|---|
| 1464 | dprintf(("ADVAPI32: ObjectPrivilegeAuditAlarmA(%s,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1465 | lpszSubsystem, | 
|---|
| 1466 | lpvHandleId, | 
|---|
| 1467 | hClientToken, | 
|---|
| 1468 | dwDesiredAccess, | 
|---|
| 1469 | pps, | 
|---|
| 1470 | fAccessGranted)); | 
|---|
| 1471 |  | 
|---|
| 1472 | return (FALSE); /* signal failure */ | 
|---|
| 1473 | } | 
|---|
| 1474 |  | 
|---|
| 1475 |  | 
|---|
| 1476 | /***************************************************************************** | 
|---|
| 1477 | * Name      : ObjectPrivilegeAuditAlarmW | 
|---|
| 1478 | * Purpose   : The ObjectPrivilegeAuditAlarm function generates audit messages | 
|---|
| 1479 | *             as a result of a client's attempt to perform a privileged operation | 
|---|
| 1480 | *             on a server application object using an already opened handle of | 
|---|
| 1481 | *             that object. Alarms are not supported in the current version of Windows NT. | 
|---|
| 1482 | * Parameters: LPCWSTR        lpszSubsystem   address of string for subsystem name | 
|---|
| 1483 | *             LPVOID         lpvHandleId     address of handle identifier | 
|---|
| 1484 | *             HANDLE         hClientToken    handle of client's access token | 
|---|
| 1485 | *             DWORD          dwDesiredAccess mask for desired access rights | 
|---|
| 1486 | *             PPRIVILEGE_SET pps             address of privileges | 
|---|
| 1487 | *             BOOL           fAccessGranted  flag for results | 
|---|
| 1488 | * Variables : | 
|---|
| 1489 | * Result    : | 
|---|
| 1490 | * Remark    : | 
|---|
| 1491 | * Status    : UNTESTED STUB | 
|---|
| 1492 | * | 
|---|
| 1493 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1494 | *****************************************************************************/ | 
|---|
| 1495 |  | 
|---|
| 1496 | BOOL WIN32API ObjectPrivilegeAuditAlarmW(LPCWSTR        lpszSubsystem, | 
|---|
| 1497 | LPVOID         lpvHandleId, | 
|---|
| 1498 | HANDLE         hClientToken, | 
|---|
| 1499 | DWORD          dwDesiredAccess, | 
|---|
| 1500 | PPRIVILEGE_SET pps, | 
|---|
| 1501 | BOOL           fAccessGranted) | 
|---|
| 1502 | { | 
|---|
| 1503 | dprintf(("ADVAPI32: ObjectPrivilegeAuditAlarmW(%s,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1504 | lpszSubsystem, | 
|---|
| 1505 | lpvHandleId, | 
|---|
| 1506 | hClientToken, | 
|---|
| 1507 | dwDesiredAccess, | 
|---|
| 1508 | pps, | 
|---|
| 1509 | fAccessGranted)); | 
|---|
| 1510 |  | 
|---|
| 1511 | return (FALSE); /* signal failure */ | 
|---|
| 1512 | } | 
|---|
| 1513 |  | 
|---|
| 1514 | /***************************************************************************** | 
|---|
| 1515 | * Name      : PrivilegeCheck | 
|---|
| 1516 | * Purpose   : The PrivilegeCheck function tests the security context represented | 
|---|
| 1517 | *             by a specific access token to discover whether it contains the | 
|---|
| 1518 | *             specified privileges. This function is typically called by a server | 
|---|
| 1519 | *             application to check the privileges of a client's access token. | 
|---|
| 1520 | * Parameters: HANDLE          hClientToken handle of client's access token | 
|---|
| 1521 | *             PPRIVILEGE_SET  pps          address of privileges | 
|---|
| 1522 | *             LPBOOL          lpfResult    address of flag for result | 
|---|
| 1523 | * Variables : | 
|---|
| 1524 | * Result    : | 
|---|
| 1525 | * Remark    : | 
|---|
| 1526 | * Status    : UNTESTED STUB | 
|---|
| 1527 | * | 
|---|
| 1528 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1529 | *****************************************************************************/ | 
|---|
| 1530 |  | 
|---|
| 1531 | BOOL WIN32API PrivilegeCheck(HANDLE         hClientToken, | 
|---|
| 1532 | PPRIVILEGE_SET pps, | 
|---|
| 1533 | LPBOOL         lpfResult) | 
|---|
| 1534 | { | 
|---|
| 1535 | dprintf(("ADVAPI32: PrivilegeCheck(%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1536 | hClientToken, | 
|---|
| 1537 | pps, | 
|---|
| 1538 | lpfResult)); | 
|---|
| 1539 |  | 
|---|
| 1540 | return (FALSE); /* signal failure */ | 
|---|
| 1541 | } | 
|---|
| 1542 |  | 
|---|
| 1543 |  | 
|---|
| 1544 | /***************************************************************************** | 
|---|
| 1545 | * Name      : PrivilegedServiceAuditAlarmA | 
|---|
| 1546 | * Purpose   : The PrivilegedServiceAuditAlarm function generates audit messages | 
|---|
| 1547 | *             when an attempt is made to perform privileged system service | 
|---|
| 1548 | *             operations. Alarms are not supported in the current version of Windows NT. | 
|---|
| 1549 | * Parameters: LPCSTR        lpszSubsystem  address of string for subsystem name | 
|---|
| 1550 | *             LPCSTR        lpszService    address of string for service name | 
|---|
| 1551 | *             HANDLE         hClientToken   handle of access token | 
|---|
| 1552 | *             PPRIVILEGE_SET pps            address of privileges | 
|---|
| 1553 | *             BOOL           fAccessGranted flag for granted access rights | 
|---|
| 1554 | * Variables : | 
|---|
| 1555 | * Result    : | 
|---|
| 1556 | * Remark    : | 
|---|
| 1557 | * Status    : UNTESTED STUB | 
|---|
| 1558 | * | 
|---|
| 1559 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1560 | *****************************************************************************/ | 
|---|
| 1561 |  | 
|---|
| 1562 | BOOL WIN32API PrivilegedServiceAuditAlarmA(LPCSTR        lpszSubsystem, | 
|---|
| 1563 | LPCSTR        lpszService, | 
|---|
| 1564 | HANDLE         hClientToken, | 
|---|
| 1565 | PPRIVILEGE_SET pps, | 
|---|
| 1566 | BOOL           fAccessGranted) | 
|---|
| 1567 | { | 
|---|
| 1568 | dprintf(("ADVAPI32: PrivilegedServiceAuditAlarmA(%s,%s,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1569 | lpszSubsystem, | 
|---|
| 1570 | lpszService, | 
|---|
| 1571 | hClientToken, | 
|---|
| 1572 | pps, | 
|---|
| 1573 | fAccessGranted)); | 
|---|
| 1574 |  | 
|---|
| 1575 | return (FALSE); /* signal failure */ | 
|---|
| 1576 | } | 
|---|
| 1577 |  | 
|---|
| 1578 |  | 
|---|
| 1579 | /***************************************************************************** | 
|---|
| 1580 | * Name      : PrivilegedServiceAuditAlarmW | 
|---|
| 1581 | * Purpose   : The PrivilegedServiceAuditAlarm function generates audit messages | 
|---|
| 1582 | *             when an attempt is made to perform privileged system service | 
|---|
| 1583 | *             operations. Alarms are not supported in the current version of Windows NT. | 
|---|
| 1584 | * Parameters: LPCWSTR        lpszSubsystem  address of string for subsystem name | 
|---|
| 1585 | *             LPCWSTR        lpszService    address of string for service name | 
|---|
| 1586 | *             HANDLE         hClientToken   handle of access token | 
|---|
| 1587 | *             PPRIVILEGE_SET pps            address of privileges | 
|---|
| 1588 | *             BOOL           fAccessGranted flag for granted access rights | 
|---|
| 1589 | * Variables : | 
|---|
| 1590 | * Result    : | 
|---|
| 1591 | * Remark    : | 
|---|
| 1592 | * Status    : UNTESTED STUB | 
|---|
| 1593 | * | 
|---|
| 1594 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1595 | *****************************************************************************/ | 
|---|
| 1596 |  | 
|---|
| 1597 | BOOL WIN32API PrivilegedServiceAuditAlarmW(LPCWSTR        lpszSubsystem, | 
|---|
| 1598 | LPCWSTR        lpszService, | 
|---|
| 1599 | HANDLE         hClientToken, | 
|---|
| 1600 | PPRIVILEGE_SET pps, | 
|---|
| 1601 | BOOL           fAccessGranted) | 
|---|
| 1602 | { | 
|---|
| 1603 | dprintf(("ADVAPI32: PrivilegedServiceAuditAlarmW(%s,%s,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1604 | lpszSubsystem, | 
|---|
| 1605 | lpszService, | 
|---|
| 1606 | hClientToken, | 
|---|
| 1607 | pps, | 
|---|
| 1608 | fAccessGranted)); | 
|---|
| 1609 |  | 
|---|
| 1610 | return (FALSE); /* signal failure */ | 
|---|
| 1611 | } | 
|---|
| 1612 |  | 
|---|
| 1613 | /***************************************************************************** | 
|---|
| 1614 | * Name      : SetAclInformation | 
|---|
| 1615 | * Purpose   : The SetAclInformation function sets information about an access-control list (ACL). | 
|---|
| 1616 | * Parameters: PACL                  pAcl       address of access-control list | 
|---|
| 1617 | *             LPVOID                lpvAclInfo address of ACL information | 
|---|
| 1618 | *             DWORD                 cbAclInfo  size of ACL information | 
|---|
| 1619 | *             ACL_INFORMATION_CLASS aclic      specifies class of requested info | 
|---|
| 1620 | * Variables : | 
|---|
| 1621 | * Result    : | 
|---|
| 1622 | * Remark    : | 
|---|
| 1623 | * Status    : UNTESTED STUB | 
|---|
| 1624 | * | 
|---|
| 1625 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1626 | *****************************************************************************/ | 
|---|
| 1627 |  | 
|---|
| 1628 | BOOL WIN32API SetAclInformation(PACL                  pAcl, | 
|---|
| 1629 | LPVOID                lpvAclInfo, | 
|---|
| 1630 | DWORD                 cbAclInfo, | 
|---|
| 1631 | ACL_INFORMATION_CLASS aclic) | 
|---|
| 1632 | { | 
|---|
| 1633 | dprintf(("ADVAPI32: SetAclInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1634 | pAcl, | 
|---|
| 1635 | lpvAclInfo, | 
|---|
| 1636 | cbAclInfo, | 
|---|
| 1637 | aclic)); | 
|---|
| 1638 |  | 
|---|
| 1639 | return (FALSE); /* signal failure */ | 
|---|
| 1640 | } | 
|---|
| 1641 |  | 
|---|
| 1642 |  | 
|---|
| 1643 |  | 
|---|
| 1644 | /***************************************************************************** | 
|---|
| 1645 | * Name      : SetPrivateObjectSecurity | 
|---|
| 1646 | * Purpose   : The SetPrivateObjectSecurity function modifies a private | 
|---|
| 1647 | *             object's security descriptor. | 
|---|
| 1648 | * Parameters: SECURITY_INFORMATION  si           type of security information | 
|---|
| 1649 | *             PSECURITY_DESCRIPTOR  psdSource    address of SD to apply to object | 
|---|
| 1650 | *             PSECURITY_DESCRIPTOR  *lppsdTarget address of object's SD | 
|---|
| 1651 | *             PGENERIC_MAPPING      pgm          address of access-mapping structure | 
|---|
| 1652 | *             HANDLE                hClientToken handle of client access token | 
|---|
| 1653 | * Variables : | 
|---|
| 1654 | * Result    : | 
|---|
| 1655 | * Remark    : | 
|---|
| 1656 | * Status    : UNTESTED STUB | 
|---|
| 1657 | * | 
|---|
| 1658 | * Author    : Patrick Haller [Tue, 1998/06/16 23:00] | 
|---|
| 1659 | *****************************************************************************/ | 
|---|
| 1660 |  | 
|---|
| 1661 |  | 
|---|
| 1662 | BOOL WIN32API    SetPrivateObjectSecurity(SECURITY_INFORMATION  si, | 
|---|
| 1663 | PSECURITY_DESCRIPTOR  psdSource, | 
|---|
| 1664 | PSECURITY_DESCRIPTOR  *lppsdTarget, | 
|---|
| 1665 | PGENERIC_MAPPING      pgm, | 
|---|
| 1666 | HANDLE                hClientToken) | 
|---|
| 1667 | { | 
|---|
| 1668 | dprintf(("ADVAPI32: SetPrivateObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1669 | si, | 
|---|
| 1670 | psdSource, | 
|---|
| 1671 | lppsdTarget, | 
|---|
| 1672 | pgm, | 
|---|
| 1673 | hClientToken)); | 
|---|
| 1674 |  | 
|---|
| 1675 | return (FALSE); /* signal failure */ | 
|---|
| 1676 | } | 
|---|
| 1677 |  | 
|---|
| 1678 |  | 
|---|
| 1679 |  | 
|---|
| 1680 |  | 
|---|
| 1681 |  | 
|---|
| 1682 |  | 
|---|