Subversion Repositories Aucun

Rev

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

Rev Author Line No. Line
70 ixe013 1
// SecurityHelper.h
2
//
3
// Routines that interface with Win32 and LSA security APIs
4
//
5
 
6
#ifndef __SECURITY_HELPER_H__
7
#define __SECURITY_HELPER_H__
8
 
9
#include <windows.h>
10
#include <ntsecapi.h>
11
#include <winwlx.h>
12
#include "extern.h"
13
 
14
#define LOGON_PROCESS_NAME "AUCUN-http://paralint.com"
15
 
16
 
17
EXTERN BOOL RegisterLogonProcess(const char* logonProcessName, HANDLE* phLsa);
18
EXTERN BOOL CallLsaLogonUser(HANDLE hLsa,
19
                      const wchar_t* domain,
20
                      const wchar_t* user,
21
                      const wchar_t* pass,
207 ixe013 22
                      const wchar_t* authenticationPackageName,
70 ixe013 23
                      SECURITY_LOGON_TYPE logonType,
24
                      LUID* pLogonSessionId,
25
                      HANDLE* phToken,
26
                      MSV1_0_INTERACTIVE_PROFILE** ppProfile,
27
                      DWORD* pWin32Error);
76 ixe013 28
EXTERN BOOL IsSameUser(HANDLE hToken1, HANDLE hToken2, BOOL* pbIsSameUser);
109 ixe013 29
EXTERN BOOL CreateProcessAsUserOnDesktop(HANDLE hToken, wchar_t* programImage, wchar_t* desktop, void* env);
30
EXTERN BOOL ImpersonateAndGetUserName(HANDLE hToken, wchar_t* name, int cch);
83 ixe013 31
EXTERN int GetUsernameAndDomainFromToken(HANDLE token, wchar_t *domain, DWORD domain_len, wchar_t *username, DWORD username_len);
134 ixe013 32
EXTERN BOOL GetSIDFromToken(HANDLE token, PSID *ppsid);
33
EXTERN BOOL GetSIDFromUsername(LPTSTR username, PSID *sid);
161 ixe013 34
EXTERN const wchar_t *FindUserNameInString(const wchar_t *rawusername);
137 ixe013 35
EXTERN int SetSelfservePassword(const wchar_t *username);
70 ixe013 36
 
37
#endif