mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 12:32:47 +00:00
pass LUIDs to RosEnableThreadPrivileges()
svn path=/trunk/; revision=10496
This commit is contained in:
parent
2f6a9da97d
commit
86f612b5f1
2 changed files with 5 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: priv.h,v 1.1 2004/08/11 08:28:13 weiden Exp $
|
||||
/* $Id: priv.h,v 1.2 2004/08/11 08:48:20 weiden Exp $
|
||||
*/
|
||||
|
||||
#ifndef ROSRTL_SEC_H__
|
||||
|
@ -10,7 +10,7 @@ extern "C"
|
|||
#endif
|
||||
|
||||
BOOL
|
||||
RosEnableThreadPrivileges(HANDLE *hToken, DWORD *Privileges, DWORD PrivilegeCount);
|
||||
RosEnableThreadPrivileges(HANDLE *hToken, LUID *Privileges, DWORD PrivilegeCount);
|
||||
BOOL
|
||||
RosResetThreadPrivileges(HANDLE hToken);
|
||||
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
* Utility to copy and enable thread privileges
|
||||
*
|
||||
* OUT HANDLE *hPreviousToken -> Pointer to a variable that receives the previous token handle
|
||||
* IN DWORD *Privileges -> Points to an array of privileges to be enabled
|
||||
* IN LUID *Privileges -> Points to an array of privileges to be enabled
|
||||
* IN DWORD PrivilegeCount -> Number of the privileges in the array
|
||||
*
|
||||
* Returns TRUE on success and copies the thread token (if any) handle that was active before impersonation.
|
||||
*/
|
||||
BOOL
|
||||
RosEnableThreadPrivileges(HANDLE *hPreviousToken,
|
||||
DWORD *Privileges,
|
||||
LUID *Privileges,
|
||||
DWORD PrivilegeCount)
|
||||
{
|
||||
HANDLE hToken;
|
||||
|
@ -55,8 +55,7 @@ RosEnableThreadPrivileges(HANDLE *hPreviousToken,
|
|||
privs->PrivilegeCount = PrivilegeCount;
|
||||
for(la = privs->Privileges; PrivilegeCount-- > 0; la++)
|
||||
{
|
||||
la->Luid.LowPart = *(Privileges++);
|
||||
la->Luid.HighPart = 0;
|
||||
la->Luid = *(Privileges++);
|
||||
la->Attributes = SE_PRIVILEGE_ENABLED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue