uLib  User mode C/C++ extended API library for Win32 programmers.
SecUtil.cpp File Reference
#include <uLib/Common.h>
#include <uLib/UtilFunc.h>
#include <uLib/Debug.h>
#include <uLib/StrFunc.h>

Go to the source code of this file.

Classes

struct  TOKENEX_ITEM
 

Functions

bool InitializeSecDesc (PSECURITY_DESCRIPTOR pSecDesc, PACL AccsList)
 
bool EnableProcessPrivilege (CSTR prvName, bool Enable)
 
bool EnableProcessPrivileges (bool Enable, CSTR szPriv,...)
 
PTOKEN_PRIVILEGES AllocPrivileges (UINT Count, PDWORD pSize)
 
PTOKEN_PRIVILEGES FreePrivileges (PTOKEN_PRIVILEGES pPrv)
 
bool EnablePrivilege (HANDLE hToken, CSTR Privilege, bool Enable, PLUID_AND_ATTRIBUTES pSave)
 
bool RestorePrivilege (HANDLE hToken, PTOKEN_PRIVILEGES pSaved)
 See EnablePrivilege(() More...
 
bool EnablePrivileges (HANDLE hToken, bool Enable, PTOKEN_PRIVILEGES *ppSave,...)
 
bool RestorePrivileges (HANDLE hTok, PTOKEN_PRIVILEGES pSaved, bool Dispose)
 
HANDLE GetThreadExToken (HTOKENEX hToken)
 
HTOKENEX OpenThreadTokenEx (HANDLE hThread, ACCESS_MASK tokenAccess)
 
HTOKENEX CloseThreadTokenEx (HTOKENEX hToken)
 

Class Documentation

◆ TOKENEX_ITEM

struct TOKENEX_ITEM

Definition at line 232 of file SecUtil.cpp.

Class Members
HANDLE hToken
bool imperSelf

Function Documentation

◆ AllocPrivileges()

PTOKEN_PRIVILEGES AllocPrivileges ( UINT  Count,
PDWORD  pSize 
)

Definition at line 85 of file SecUtil.cpp.

◆ EnablePrivilege()

bool EnablePrivilege ( HANDLE  hToken,
CSTR  Privilege,
bool  Enable,
PLUID_AND_ATTRIBUTES  pSave 
)

Definition at line 138 of file SecUtil.cpp.

◆ EnablePrivileges()

bool EnablePrivileges ( HANDLE  hToken,
bool  Enable,
PTOKEN_PRIVILEGES *  ppSave,
  ... 
)

Definition at line 174 of file SecUtil.cpp.