The information in this article applies to:
SYMPTOMS
Calling the OpenThreadToken()/OpenProcessToken() Win32 API to obtain an access token associated with a thread or a process respectively with the TOKEN_ALL_ACCESS request can fail with the following error message:
CAUSE
TOKEN_ALL_ACCESS can include TOKEN_ADJUST_SESSIONID in Winnt.h as in the following example:
TOKEN_ADJUST_SESSIONID is a new access mask that has been added for Windows 2000. In Windows NT 4.0, the access token's discretionary access-control list (DACL) does not have TOKEN_ADJUST_SESSIONID access mask set. If an application is built using the latest Winnt.h in the Platform SDK and run on Windows NT 4.0, then specifying TOKEN_ALL_ACCESS in an OpenThreadToken()/OpenProcessToken() call can fail with a GetLastError() of ERROR_ACCESS_DENIED.
RESOLUTIONAn application can work around this behavior by specifying only the required access rights to an access token. For more information on specific access rights for access tokens please refer to the Platform SDK documentation. Additional query words:
Keywords : kbAPI kbKernBase kbNTOS400 kbSDKPlatform kbSDKWin32 kbSecurity kbfaq kbDSupport kbGrpKernBase |
Last Reviewed: December 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |