Switch the elevator methods to DuplicateHandleEx to get a primary token
git-svn-id: file:///home/svn/framework3/trunk@9755 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
29f9f6671e
commit
ec9156827e
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -37,8 +37,8 @@ BOOL elevator_tokendup( DWORD dwThreadId, DWORD dwSecurityRID )
|
|||
if( !AllocateAndInitializeSid( &NtAuthority, 1, dwSecurityRID, 0, 0, 0, 0, 0, 0, 0, &lpSystemSID ) )
|
||||
BREAK_ON_ERROR( "[ELEVATOR-TOKENDUP] elevator_thread. AllocateAndInitializeSid failed" );
|
||||
|
||||
if( !DuplicateToken( hProcessToken, SecurityImpersonation, &hToken ) )
|
||||
BREAK_ON_ERROR( "[ELEVATOR-TOKENDUP] elevator_thread. DuplicateToken failed" );
|
||||
if( !DuplicateTokenEx( hProcessToken, MAXIMUM_ALLOWED, NULL, SecurityImpersonation, TokenPrimary, &hToken ) )
|
||||
BREAK_ON_ERROR( "[ELEVATOR-TOKENDUP] elevator_thread. DuplicateTokenEx failed" );
|
||||
|
||||
if( !pCheckTokenMembership( hToken, lpSystemSID, &bIsSystem ) )
|
||||
BREAK_ON_ERROR( "[ELEVATOR-TOKENDUP] elevator_thread. CheckTokenMembership failed" );
|
||||
|
|
Loading…
Reference in New Issue