Rebase against 4981785f0fbcafbdc6a9dc4f71d06b137d558597.

This rebase is affected by the same upstream bug.
https://bugs.winehq.org/show_bug.cgi?id=50713
This commit is contained in:
Alistair Leslie-Hughes
2021-02-23 12:57:13 +11:00
parent 0d3a7a3596
commit 43a3110e95
4 changed files with 74 additions and 53 deletions

View File

@@ -1,21 +1,21 @@
From 51438c7eb7bf3b04dd70c50ea860a3ce8b1628d0 Mon Sep 17 00:00:00 2001
From f28a857b189d801435e899ed039611cc6fb116f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 8 May 2017 23:01:28 +0200
Subject: [PATCH] aclui: Add basic ACE viewer.
---
dlls/aclui/Makefile.in | 3 +
dlls/aclui/aclui.rc | 58 ++++++
dlls/aclui/aclui_main.c | 513 +++++++++++++++++++++++++++++++++++++++++++++-
dlls/aclui/resource.h | 38 ++++
dlls/aclui/aclui.rc | 58 +++++
dlls/aclui/aclui_main.c | 531 +++++++++++++++++++++++++++++++++++++-
dlls/aclui/resource.h | 38 +++
dlls/aclui/user_icons.bmp | Bin 0 -> 2730 bytes
5 files changed, 608 insertions(+), 4 deletions(-)
5 files changed, 626 insertions(+), 4 deletions(-)
create mode 100644 dlls/aclui/aclui.rc
create mode 100644 dlls/aclui/resource.h
create mode 100644 dlls/aclui/user_icons.bmp
diff --git a/dlls/aclui/Makefile.in b/dlls/aclui/Makefile.in
index 83bd379..dc6a5e0 100644
index e79b3fe9e33..1eac32f0700 100644
--- a/dlls/aclui/Makefile.in
+++ b/dlls/aclui/Makefile.in
@@ -1,6 +1,9 @@
@@ -23,14 +23,14 @@ index 83bd379..dc6a5e0 100644
IMPORTLIB = aclui
+IMPORTS = comctl32 user32 advapi32 gdi32
EXTRADLLFLAGS = -mno-cygwin
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
C_SRCS = aclui_main.c
+
+RC_SRCS = aclui.rc
diff --git a/dlls/aclui/aclui.rc b/dlls/aclui/aclui.rc
new file mode 100644
index 0000000..08f8b56
index 00000000000..08f8b567314
--- /dev/null
+++ b/dlls/aclui/aclui.rc
@@ -0,0 +1,58 @@
@@ -93,10 +93,10 @@ index 0000000..08f8b56
+/* @makedep: user_icons.bmp */
+IDB_USER_ICONS BITMAP user_icons.bmp
diff --git a/dlls/aclui/aclui_main.c b/dlls/aclui/aclui_main.c
index 033a471..ea35bba 100644
index 1a03f30df24..a3a789e2daa 100644
--- a/dlls/aclui/aclui_main.c
+++ b/dlls/aclui/aclui_main.c
@@ -20,17 +20,53 @@
@@ -20,25 +20,548 @@
#include <stdarg.h>
@@ -116,6 +116,10 @@ index 033a471..ea35bba 100644
WINE_DEFAULT_DEBUG_CHANNEL(aclui);
-HPROPSHEETPAGE WINAPI CreateSecurityPage(LPSECURITYINFO psi)
+
+HPROPSHEETPAGE WINAPI CreateSecurityPage(LPSECURITYINFO psi);
+
+/* the aclui.h files does not contain the necessary COBJMACROS */
+#define ISecurityInformation_AddRef(This) (This)->lpVtbl->AddRef(This)
+#define ISecurityInformation_Release(This) (This)->lpVtbl->Release(This)
@@ -147,21 +151,22 @@ index 033a471..ea35bba 100644
+
+static HINSTANCE aclui_instance;
+
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
@@ -40,20 +76,489 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+ TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
+
+ switch (fdwReason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ aclui_instance = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
break;
}
return TRUE;
}
-HPROPSHEETPAGE WINAPI CreateSecurityPage(LPSECURITYINFO psi)
+ DisableThreadLibraryCalls(hinstDLL);
+ break;
+ }
+ return TRUE;
+}
+
+static WCHAR* WINAPIV load_formatstr(UINT resource, ...)
+{
+ __ms_va_list valist;
@@ -195,7 +200,8 @@ index 033a471..ea35bba 100644
+}
+
+static void users_clear(struct security_page *page)
+{
{
- FIXME("(%p): stub\n", psi);
+ struct user *user, *user2;
+
+ LIST_FOR_EACH_ENTRY_SAFE(user, user2, &page->users, struct user, entry)
@@ -209,8 +215,7 @@ index 033a471..ea35bba 100644
+}
+
+static WCHAR *get_sid_name(PSID sid, SID_NAME_USE *sid_type)
{
- FIXME("(%p): stub\n", psi);
+{
+ WCHAR *name, *domain;
+ DWORD domain_len = 0;
+ DWORD name_len = 0;
@@ -235,8 +240,7 @@ index 033a471..ea35bba 100644
-BOOL WINAPI EditSecurity(HWND owner, LPSECURITYINFO psi)
+static BOOL users_add(struct security_page *page, PSID sid)
{
- FIXME("(%p, %p): stub\n", owner, psi);
+{
+ SID_NAME_USE sid_type;
+ struct user *user;
+ DWORD sid_len;
@@ -518,7 +522,8 @@ index 033a471..ea35bba 100644
+}
+
+static INT_PTR CALLBACK security_page_proc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
{
- FIXME("(%p, %p): stub\n", owner, psi);
+ switch (msg)
+ {
+ case WM_INITDIALOG:
@@ -646,7 +651,7 @@ index 033a471..ea35bba 100644
+}
diff --git a/dlls/aclui/resource.h b/dlls/aclui/resource.h
new file mode 100644
index 0000000..ba3eb81
index 00000000000..ba3eb8160ab
--- /dev/null
+++ b/dlls/aclui/resource.h
@@ -0,0 +1,38 @@
@@ -724,5 +729,5 @@ literal 0
HcmV?d00001
--
1.9.1
2.30.0