Subversion Repositories Aucun

Rev

Rev 83 | 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,
22
                      SECURITY_LOGON_TYPE logonType,
23
                      LUID* pLogonSessionId,
24
                      HANDLE* phToken,
25
                      MSV1_0_INTERACTIVE_PROFILE** ppProfile,
26
                      DWORD* pWin32Error);
76 ixe013 27
EXTERN BOOL IsSameUser(HANDLE hToken1, HANDLE hToken2, BOOL* pbIsSameUser);
83 ixe013 28
EXTERN int GetUsernameAndDomainFromToken(HANDLE token, wchar_t *domain, DWORD domain_len, wchar_t *username, DWORD username_len);
70 ixe013 29
 
30
#endif