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