Subversion Repositories Aucun


Rev 161 | Rev 213 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

// SecurityHelper.h
// Routines that interface with Win32 and LSA security APIs


#include <windows.h>
#include <ntsecapi.h>
#include <winwlx.h>
#include "extern.h"


EXTERN BOOL RegisterLogonProcess(const char* logonProcessName, HANDLE* phLsa);
                      const wchar_t* domain,
                      const wchar_t* user,
                      const wchar_t* pass,
                      const wchar_t* authenticationPackageName,
                      SECURITY_LOGON_TYPE logonType,
                      LUID* pLogonSessionId,
                      HANDLE* phToken,
                      MSV1_0_INTERACTIVE_PROFILE** ppProfile,
                      DWORD* pWin32Error);
EXTERN BOOL IsSameUser(HANDLE hToken1, HANDLE hToken2, BOOL* pbIsSameUser);
EXTERN BOOL CreateProcessAsUserOnDesktop(HANDLE hToken, wchar_t* programImage, wchar_t* desktop, void* env);
EXTERN BOOL ImpersonateAndGetUserName(HANDLE hToken, wchar_t* name, int cch);
EXTERN int GetUsernameAndDomainFromToken(HANDLE token, wchar_t *domain, DWORD domain_len, wchar_t *username, DWORD username_len);
EXTERN BOOL GetSIDFromToken(HANDLE token, PSID *ppsid);
EXTERN BOOL GetSIDFromUsername(LPTSTR username, PSID *sid);
EXTERN const wchar_t *FindUserNameInString(const wchar_t *rawusername);
EXTERN int SetSelfservePassword(const wchar_t *username);