[PATCH 0/1] MR3494: include: Update SECURITY_LOGON_TYPE and SECURITY_LOGON_SESSION_DATA in ntsecapi.h.
From: Vitaly Lipatov <lav(a)etersoft.ru> Signed-off-by: Vitaly Lipatov <lav(a)etersoft.ru> --- include/ntsecapi.h | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/include/ntsecapi.h b/include/ntsecapi.h index 992aebf66d2..0820cc47266 100644 --- a/include/ntsecapi.h +++ b/include/ntsecapi.h @@ -121,11 +121,21 @@ typedef NTSTATUS *PNTSTATUS; typedef enum _SECURITY_LOGON_TYPE { + UndefinedLogonType = 0, Interactive = 2, Network, Batch, Service, - Proxy + Proxy, + Unlock, + NetworkCleartext, + NewCredentials, + /* _WIN32_WINNT >= 0x0501 */ + RemoteInteractive, + CachedInteractive, + /* _WIN32_WINNT >= 0x0502 */ + CachedRemoteInteractive, + CachedUnlock } SECURITY_LOGON_TYPE, *PSECURITY_LOGON_TYPE; typedef enum _POLICY_AUDIT_EVENT_TYPE @@ -249,6 +259,13 @@ typedef struct _POLICY_MODIFICATION_INFO LARGE_INTEGER DatabaseCreationTime; } POLICY_MODIFICATION_INFO, *PPOLICY_MODIFICATION_INFO; +/* (_WIN32_WINNT >= 0x0600) */ +typedef struct _LSA_LAST_INTER_LOGON_INFO { + LARGE_INTEGER LastSuccessfulLogon; + LARGE_INTEGER LastFailedLogon; + ULONG FailedAttemptCountSinceLastSuccessfulLogon; +} LSA_LAST_INTER_LOGON_INFO, *PLSA_LAST_INTER_LOGON_INFO; + typedef struct _SECURITY_LOGON_SESSION_DATA { ULONG Size; LUID LogonId; @@ -262,6 +279,18 @@ typedef struct _SECURITY_LOGON_SESSION_DATA { LSA_UNICODE_STRING LogonServer; LSA_UNICODE_STRING DnsDomainName; LSA_UNICODE_STRING Upn; + /* (_WIN32_WINNT >= 0x0600) */ + ULONG UserFlags; + LSA_LAST_INTER_LOGON_INFO LastLogonInfo; + LSA_UNICODE_STRING LogonScript; + LSA_UNICODE_STRING ProfilePath; + LSA_UNICODE_STRING HomeDirectory; + LSA_UNICODE_STRING HomeDirectoryDrive; + LARGE_INTEGER LogoffTime; + LARGE_INTEGER KickOffTime; + LARGE_INTEGER PasswordLastSet; + LARGE_INTEGER PasswordCanChange; + LARGE_INTEGER PasswordMustChange; } SECURITY_LOGON_SESSION_DATA, *PSECURITY_LOGON_SESSION_DATA; typedef struct @@ -615,6 +644,8 @@ typedef struct _KERB_PURGE_TKT_CACHE_REQUEST #define RtlEncryptMemory SystemFunction040 #define RtlDecryptMemory SystemFunction041 +#define LSA_SUCCESS(Error) ((LONG)(Error) >= 0) + WINADVAPI BOOLEAN WINAPI AuditQuerySystemPolicy(const GUID*,ULONG,AUDIT_POLICY_INFORMATION**); WINADVAPI BOOLEAN WINAPI RtlGenRandom(PVOID,ULONG); WINADVAPI NTSTATUS WINAPI RtlEncryptMemory(PVOID,ULONG,ULONG); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3494
Hans Leidekker (@hans) commented about include/ntsecapi.h:
typedef enum _SECURITY_LOGON_TYPE { + UndefinedLogonType = 0, Interactive = 2, Network, Batch, Service, - Proxy + Proxy, + Unlock, + NetworkCleartext, + NewCredentials, + /* _WIN32_WINNT >= 0x0501 */ + RemoteInteractive,
I don't think we need these comments in Wine. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3494#note_41159
On Thu Aug 3 08:24:22 2023 +0000, Hans Leidekker wrote:
I don't think we need these comments in Wine. I have checked there are many comments like this in other wine's structs. Need we remove it too?
``` git grep "_WIN32_WINNT >" dlls/shlwapi/assoc.c:#if _WIN32_WINNT > 0x602 dlls/shlwapi/assoc.c:#if _WIN32_WINNT >= 0x600 include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h:/* Button control styles for _WIN32_WINNT >= 0x600 */ include/commctrl.h: /* _WIN32_WINNT >= 0x0600 */ include/commctrl.h: /* _WIN32_WINNT >= 0x0600 */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/wia.h:#if (_WIN32_WINNT >= 0x0600) include/wia.h:#elif (_WIN32_WINNT >= 0x0501) include/winioctl.h:/* Start: _WIN32_WINNT >= 0x0400 */ include/winioctl.h:/* End: _WIN32_WINNT >= 0x0400 */ include/winuser.h:#if (_WIN32_WINNT >= 0x0601) include/winuser.h:#elif (_WIN32_WINNT >= 0x0501) ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3494#note_41168
On Thu Aug 3 10:48:14 2023 +0000, Vitaly Lipatov wrote:
I have checked there are many comments like this in other wine's structs. Need we remove it too? ``` git grep "_WIN32_WINNT >" dlls/shlwapi/assoc.c:#if _WIN32_WINNT > 0x602 dlls/shlwapi/assoc.c:#if _WIN32_WINNT >= 0x600 include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h:/* Button control styles for _WIN32_WINNT >= 0x600 */ include/commctrl.h: /* _WIN32_WINNT >= 0x0600 */ include/commctrl.h: /* _WIN32_WINNT >= 0x0600 */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/commctrl.h: /* (_WIN32_WINNT >= 0x0600) */ include/wia.h:#if (_WIN32_WINNT >= 0x0600) include/wia.h:#elif (_WIN32_WINNT >= 0x0501) include/winioctl.h:/* Start: _WIN32_WINNT >= 0x0400 */ include/winioctl.h:/* End: _WIN32_WINNT >= 0x0400 */ include/winuser.h:#if (_WIN32_WINNT >= 0x0601) include/winuser.h:#elif (_WIN32_WINNT >= 0x0501) ``` If you count the comments (not the preprocessor conditions) it's only 14 occurrences in two headers. I don't think that's many. More importantly I don't think we need to document this in Wine.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3494#note_41170
participants (3)
-
Hans Leidekker (@hans) -
Vitaly Lipatov -
Vitaly Lipatov (@lav)