]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/blob - windows/winsecur.h
Move the dynamic loading of advapi into its own module.
[PuTTY_svn.git] / windows / winsecur.h
1 /*
2  * winsecur.h: some miscellaneous security-related helper functions,
3  * defined in winsecur.c, that use the advapi32 library. Also
4  * centralises the machinery for dynamically loading that library.
5  */
6
7 #if !defined NO_SECURITY
8
9 #include <aclapi.h>
10
11 #ifndef WINSECUR_GLOBAL
12 #define WINSECUR_GLOBAL extern
13 #endif
14
15 DECL_WINDOWS_FUNCTION(WINSECUR_GLOBAL, BOOL, OpenProcessToken,
16                       (HANDLE, DWORD, PHANDLE));
17 DECL_WINDOWS_FUNCTION(WINSECUR_GLOBAL, BOOL, GetTokenInformation,
18                       (HANDLE, TOKEN_INFORMATION_CLASS,
19                        LPVOID, DWORD, PDWORD));
20 DECL_WINDOWS_FUNCTION(WINSECUR_GLOBAL, BOOL, InitializeSecurityDescriptor,
21                       (PSECURITY_DESCRIPTOR, DWORD));
22 DECL_WINDOWS_FUNCTION(WINSECUR_GLOBAL, BOOL, SetSecurityDescriptorOwner,
23                       (PSECURITY_DESCRIPTOR, PSID, BOOL));
24 DECL_WINDOWS_FUNCTION(WINSECUR_GLOBAL, DWORD, GetSecurityInfo,
25                       (HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION,
26                        PSID *, PSID *, PACL *, PACL *,
27                        PSECURITY_DESCRIPTOR *));
28
29 int got_advapi(void);
30 PSID get_user_sid(void);
31
32 #endif