File tree Expand file tree Collapse file tree 4 files changed +19
-80
lines changed
contrib/win32/win32compat/lsa Expand file tree Collapse file tree 4 files changed +19
-80
lines changed Original file line number Diff line number Diff line change 29
29
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
30
*/
31
31
32
- #ifdef __VS_BUILD__
33
- #define UMDF_USING_NTSTATUS
34
-
35
- #include < Windows.h>
36
- #include < LsaLookup.h>
37
- #include < Ntsecapi.h>
38
- #endif
39
-
40
- #include " LsaString.h"
32
+ #include " ssh-lsa.h"
41
33
42
34
#ifdef __VS_BUILD__
43
35
#ifdef __cplusplus
Original file line number Diff line number Diff line change 34
34
35
35
#undef STRING
36
36
37
-
38
-
39
- #include "Win64Fix.h"
40
-
41
- #include <stdio.h>
42
- #include <wchar.h>
43
-
44
37
#include <windows.h>
38
+ #define SECURITY_WIN32
39
+ #include <security.h>
45
40
#include <Ntsecapi.h>
46
41
#include <NTSecPkg.h>
47
-
48
- #ifndef __VS_BUILD__
49
- #ifdef _WIN64
50
42
#include <ntstatus.h>
51
- #else
52
- #include <ddk/ntstatus.h>
53
- #endif
54
- #else
55
- #include <ntstatus.h>
56
- #endif
43
+ #include "Types.h"
44
+
45
+ #define FAIL (CONDITION ) if(CONDITION) goto fail
57
46
58
- #include "Debug.h"
47
+ #define NTFAIL ( NTFUNC ) if((ntStat = (NTFUNC))) goto fail
59
48
60
49
NTSTATUS LsaAllocUnicodeString (UNICODE_STRING * * lsaStr , DWORD maxLen );
61
50
Original file line number Diff line number Diff line change 31
31
32
32
#define WINVER 0x501
33
33
34
- #ifdef __VS_BUILD__
35
- #define UMDF_USING_NTSTATUS
36
-
37
- #include < Windows.h>
38
- #endif
39
-
40
34
#include " Ssh-lsa.h"
41
35
42
36
#ifdef __cplusplus
Original file line number Diff line number Diff line change 34
34
35
35
#undef STRING
36
36
#undef TEST_APP
37
-
38
- #include "Win64Fix.h"
39
-
40
-
37
+ #define UMDF_USING_NTSTATUS
41
38
#include <windows.h>
42
-
39
+ #define SECURITY_WIN32
40
+ #include <security.h>
41
+ #include <Ntsecapi.h>
43
42
#include <NTSecPkg.h>
44
-
45
- #ifndef __VS_BUILD__
46
- #ifdef _WIN64
47
43
#include <ntstatus.h>
48
- #else
49
- #include <ddk/ntstatus.h>
50
- #endif
51
- #else
52
- #include <ntstatus.h>
53
- #endif
54
-
55
- #include <Userenv.h>
56
- #include <Shlwapi.h>
57
- #include <sddl.h>
58
-
59
- #include <openssl/rsa.h>
60
- #include <openssl/dsa.h>
61
- #include <openssl/ssl.h>
62
-
63
- #include "Debug.h"
64
- #include "KeyAuth.h"
65
- #include "LsaString.h"
66
- #include "SSLFix.h"
67
- #include "DeskRight.h"
44
+ #include "Types.h"
68
45
69
46
#define PKG_NAME "SSH-LSA"
70
47
@@ -97,27 +74,14 @@ typedef VOID (WINAPI *RtlInitUnicodeStringPtr)
97
74
(PUNICODE_STRING , PCWSTR SourceString );
98
75
#endif
99
76
77
+ #define FAIL (CONDITION ) if(CONDITION) goto fail
100
78
101
- #ifndef __VS_BUILD__
102
- #ifndef _WIN64
103
- typedef struct _LSA_TOKEN_INFORMATION_V1
104
- {
105
- LARGE_INTEGER ExpirationTime ;
106
-
107
- TOKEN_USER User ;
108
-
109
- PTOKEN_GROUPS Groups ;
110
-
111
- TOKEN_PRIMARY_GROUP PrimaryGroup ;
112
-
113
- PTOKEN_PRIVILEGES Privileges ;
114
-
115
- TOKEN_OWNER Owner ;
79
+ #define NTFAIL (NTFUNC ) if((ntStat = (NTFUNC))) goto fail
116
80
117
- TOKEN_DEFAULT_DACL DefaultDacl ;
118
- }
119
- LSA_TOKEN_INFORMATION_V1 , * PLSA_TOKEN_INFORMATION_V1 ;
120
- #endif
121
- #endif
81
+ NTSTATUS LsaAllocUnicodeString ( UNICODE_STRING * * lsaStr , DWORD maxLen ) ;
82
+
83
+ NTSTATUS FillUnicodeString ( UNICODE_STRING * lsaStr , const Char * str ) ;
84
+
85
+ void LsaFreeUnicodeString ( UNICODE_STRING * lsaStr );
122
86
123
87
#endif
You can’t perform that action at this time.
0 commit comments