Rebase against 9b6d198a3c7c8a02aa69c0d3d11829712e9778a6.

This commit is contained in:
Zebediah Figura 2019-04-24 23:17:29 -05:00
parent 4969e2759b
commit f61fe9f16b
14 changed files with 211 additions and 632 deletions

View File

@ -1 +0,0 @@
Depends: server-Misc_ACL

View File

@ -1,5 +1,4 @@
Fixes: [40613] Basic implementation for token integrity levels and UAC handling
Fixes: [39262] Run explorer.exe as unevaluated process
Depends: advapi32-CreateRestrictedToken
Depends: server-Misc_ACL
Depends: Staging

View File

@ -7,6 +7,5 @@ Depends: ws2_32-WSACleanup
Depends: ntdll-RtlCreateUserThread
Depends: server-Realtime_Priority
Depends: ntdll-User_Shared_Data
Depends: server-Misc_ACL
Depends: advapi32-Token_Integrity_Level
Depends: ntdll-Junction_Points

View File

@ -1,25 +1,27 @@
From e78ec7f2036c1bdf46d4ecc7db1574847ca7f54f Mon Sep 17 00:00:00 2001
From 7edfe7dd563c746ab2eb896b36dc9f6cafb13a91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 1 Apr 2016 01:29:51 +0200
Subject: [PATCH] fsutil: Add fsutil program with support for creating hard
links.
---
programs/fsutil/Makefile.in | 3 +
programs/fsutil/fsutil.rc | 34 ++++++++++++
programs/fsutil/main.c | 131 ++++++++++++++++++++++++++++++++++++++++++--
programs/fsutil/resources.h | 25 +++++++++
4 files changed, 187 insertions(+), 6 deletions(-)
programs/fsutil/Makefile.in | 5 +-
programs/fsutil/fsutil.rc | 34 ++++++++++
programs/fsutil/main.c | 131 ++++++++++++++++++++++++++++++++++--
programs/fsutil/resources.h | 25 +++++++
4 files changed, 188 insertions(+), 7 deletions(-)
create mode 100644 programs/fsutil/fsutil.rc
create mode 100644 programs/fsutil/resources.h
diff --git a/programs/fsutil/Makefile.in b/programs/fsutil/Makefile.in
index f339c4c..7433695 100644
index 64307e83a..1cc7f87e2 100644
--- a/programs/fsutil/Makefile.in
+++ b/programs/fsutil/Makefile.in
@@ -1,5 +1,8 @@
@@ -1,6 +1,9 @@
MODULE = fsutil.exe
APPMODE = -mconsole -municode
-EXTRADLLFLAGS = -mconsole -municode -mno-cygwin
+EXTRADLLFLAGS = -mconsole -municode
+IMPORTS = user32
C_SRCS = \
@ -28,7 +30,7 @@ index f339c4c..7433695 100644
+RC_SRCS = fsutil.rc
diff --git a/programs/fsutil/fsutil.rc b/programs/fsutil/fsutil.rc
new file mode 100644
index 0000000..593f817
index 000000000..593f8175a
--- /dev/null
+++ b/programs/fsutil/fsutil.rc
@@ -0,0 +1,34 @@
@ -67,7 +69,7 @@ index 0000000..593f817
+ STRING_HARDLINK_CREATE_USAGE, "Syntax: fsutil hardlink create old new\n\n"
+}
diff --git a/programs/fsutil/main.c b/programs/fsutil/main.c
index 2bce87e..5084196 100644
index 2bce87edc..508419682 100644
--- a/programs/fsutil/main.c
+++ b/programs/fsutil/main.c
@@ -1,5 +1,6 @@
@ -222,7 +224,7 @@ index 2bce87e..5084196 100644
}
diff --git a/programs/fsutil/resources.h b/programs/fsutil/resources.h
new file mode 100644
index 0000000..b85826a
index 000000000..b85826ac4
--- /dev/null
+++ b/programs/fsutil/resources.h
@@ -0,0 +1,25 @@
@ -252,5 +254,5 @@ index 0000000..b85826a
+#define STRING_HARDLINK_USAGE 104
+#define STRING_HARDLINK_CREATE_USAGE 105
--
2.7.4
2.21.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "75aa4ab16b03a11464ab0d3e4c4cfbff0180c269"
echo "9b6d198a3c7c8a02aa69c0d3d11829712e9778a6"
}
# Show version information
@ -252,7 +252,6 @@ patch_enable_all ()
enable_server_File_Permissions="$1"
enable_server_Inherited_ACLs="$1"
enable_server_Key_State="$1"
enable_server_Misc_ACL="$1"
enable_server_Object_Types="$1"
enable_server_PeekMessage="$1"
enable_server_Realtime_Priority="$1"
@ -894,9 +893,6 @@ patch_enable ()
server-Key_State)
enable_server_Key_State="$2"
;;
server-Misc_ACL)
enable_server_Misc_ACL="$2"
;;
server-Object_Types)
enable_server_Object_Types="$2"
;;
@ -1740,13 +1736,9 @@ if test "$enable_shell32_Progress_Dialog" -eq 1; then
fi
if test "$enable_server_Object_Types" -eq 1; then
if test "$enable_server_Misc_ACL" -gt 1; then
abort "Patchset server-Misc_ACL disabled, but server-Object_Types depends on that."
fi
if test "$enable_server_Shared_Memory" -gt 1; then
abort "Patchset server-Shared_Memory disabled, but server-Object_Types depends on that."
fi
enable_server_Misc_ACL=1
enable_server_Shared_Memory=1
fi
@ -1768,6 +1760,13 @@ if test "$enable_server_Stored_ACLs" -eq 1; then
enable_server_File_Permissions=1
fi
if test "$enable_server_Desktop_Refcount" -eq 1; then
if test "$enable_eventfd_synchronization" -gt 1; then
abort "Patchset eventfd_synchronization disabled, but server-Desktop_Refcount depends on that."
fi
enable_eventfd_synchronization=1
fi
if test "$enable_oleaut32_OLEPictureImpl_SaveAsFile" -eq 1; then
if test "$enable_oleaut32_Load_Save_EMF" -gt 1; then
abort "Patchset oleaut32-Load_Save_EMF disabled, but oleaut32-OLEPictureImpl_SaveAsFile depends on that."
@ -1887,6 +1886,13 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
enable_server_File_Permissions=1
fi
if test "$enable_server_File_Permissions" -eq 1; then
if test "$enable_ntdll_Junction_Points" -gt 1; then
abort "Patchset ntdll-Junction_Points disabled, but server-File_Permissions depends on that."
fi
enable_ntdll_Junction_Points=1
fi
if test "$enable_eventfd_synchronization" -eq 1; then
if test "$enable_advapi32_Token_Integrity_Level" -gt 1; then
abort "Patchset advapi32-Token_Integrity_Level disabled, but eventfd_synchronization depends on that."
@ -1903,9 +1909,6 @@ if test "$enable_eventfd_synchronization" -eq 1; then
if test "$enable_ntdll_User_Shared_Data" -gt 1; then
abort "Patchset ntdll-User_Shared_Data disabled, but eventfd_synchronization depends on that."
fi
if test "$enable_server_Misc_ACL" -gt 1; then
abort "Patchset server-Misc_ACL disabled, but eventfd_synchronization depends on that."
fi
if test "$enable_server_Realtime_Priority" -gt 1; then
abort "Patchset server-Realtime_Priority disabled, but eventfd_synchronization depends on that."
fi
@ -1920,7 +1923,6 @@ if test "$enable_eventfd_synchronization" -eq 1; then
enable_ntdll_RtlCreateUserThread=1
enable_ntdll_SystemRoot_Symlink=1
enable_ntdll_User_Shared_Data=1
enable_server_Misc_ACL=1
enable_server_Realtime_Priority=1
enable_server_Shared_Memory=1
enable_ws2_32_WSACleanup=1
@ -2040,19 +2042,8 @@ if test "$enable_advapi32_Token_Integrity_Level" -eq 1; then
if test "$enable_advapi32_CreateRestrictedToken" -gt 1; then
abort "Patchset advapi32-CreateRestrictedToken disabled, but advapi32-Token_Integrity_Level depends on that."
fi
if test "$enable_server_Misc_ACL" -gt 1; then
abort "Patchset server-Misc_ACL disabled, but advapi32-Token_Integrity_Level depends on that."
fi
enable_Staging=1
enable_advapi32_CreateRestrictedToken=1
enable_server_Misc_ACL=1
fi
if test "$enable_advapi32_LsaLookupSids" -eq 1; then
if test "$enable_server_Misc_ACL" -gt 1; then
abort "Patchset server-Misc_ACL disabled, but advapi32-LsaLookupSids depends on that."
fi
enable_server_Misc_ACL=1
fi
@ -2185,28 +2176,8 @@ if test "$enable_advapi32_LsaLookupPrivilegeName" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-Misc_ACL
# |
# | This patchset fixes the following Wine bugs:
# | * [#15980] GetSecurityInfo returns NULL DACL for process object
# |
# | Modified files:
# | * dlls/advapi32/tests/security.c, server/process.c, server/security.h, server/token.c
# |
if test "$enable_server_Misc_ACL" -eq 1; then
patch_apply server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch
patch_apply server-Misc_ACL/0002-server-Add-default-security-descriptor-DACL-for-proc.patch
(
printf '%s\n' '+ { "Erich E. Hoover", "server: Add default security descriptor ownership for processes.", 1 },';
printf '%s\n' '+ { "Erich E. Hoover", "server: Add default security descriptor DACL for processes.", 1 },';
) >> "$patchlist"
fi
# Patchset advapi32-LsaLookupSids
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * server-Misc_ACL
# |
# | Modified files:
# | * dlls/advapi32/lsa.c, dlls/advapi32/security.c, dlls/advapi32/tests/security.c, server/token.c
# |
@ -2249,7 +2220,7 @@ fi
# Patchset advapi32-Token_Integrity_Level
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, server-Misc_ACL
# | * Staging, advapi32-CreateRestrictedToken
# |
# | This patchset fixes the following Wine bugs:
# | * [#40613] Basic implementation for token integrity levels and UAC handling
@ -3708,7 +3679,7 @@ fi
# Patchset eventfd_synchronization
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, server-Misc_ACL, advapi32-Token_Integrity_Level, ntdll-Junction_Points, ntdll-
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-Junction_Points, ntdll-
# | RtlCreateUserThread, ntdll-Exception, ntdll-SystemRoot_Symlink, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-
# | User_Shared_Data, server-Realtime_Priority, ntdll-Threading, ntdll-Wait_User_APC, server-Key_State, server-PeekMessage,
# | server-Signal_Thread, server-Shared_Memory, ws2_32-WSACleanup
@ -4158,6 +4129,9 @@ fi
# Patchset server-File_Permissions
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-Junction_Points
# |
# | This patchset fixes the following Wine bugs:
# | * [#38970] Improve mapping of DACL to file permissions
# |
@ -4188,7 +4162,7 @@ fi
# Patchset ntdll-FileDispositionInformation
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * server-File_Permissions
# | * ntdll-Junction_Points, server-File_Permissions
# |
# | Modified files:
# | * dlls/ntdll/tests/file.c, server/fd.c
@ -4207,7 +4181,7 @@ fi
# Patchset kernel32-CopyFileEx
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * server-File_Permissions, ntdll-FileDispositionInformation
# | * ntdll-Junction_Points, server-File_Permissions, ntdll-FileDispositionInformation
# |
# | This patchset fixes the following Wine bugs:
# | * [#22692] Add support for CopyFileEx progress callback
@ -5488,6 +5462,12 @@ fi
# Patchset server-Desktop_Refcount
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-Junction_Points, ntdll-
# | RtlCreateUserThread, ntdll-Exception, ntdll-SystemRoot_Symlink, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-
# | User_Shared_Data, server-Realtime_Priority, ntdll-Threading, ntdll-Wait_User_APC, server-Key_State, server-PeekMessage,
# | server-Signal_Thread, server-Shared_Memory, ws2_32-WSACleanup, eventfd_synchronization
# |
# | This patchset fixes the following Wine bugs:
# | * [#46967] GOG Galaxy doesn't run in virtual desktop.
# |
@ -5528,7 +5508,7 @@ fi
# Patchset server-Stored_ACLs
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-DOS_Attributes, server-File_Permissions
# | * ntdll-DOS_Attributes, ntdll-Junction_Points, server-File_Permissions
# |
# | This patchset fixes the following Wine bugs:
# | * [#33576] Support for stored file ACLs
@ -5559,7 +5539,7 @@ fi
# Patchset server-Inherited_ACLs
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-DOS_Attributes, server-File_Permissions, server-Stored_ACLs
# | * ntdll-DOS_Attributes, ntdll-Junction_Points, server-File_Permissions, server-Stored_ACLs
# |
# | Modified files:
# | * dlls/advapi32/tests/security.c, server/file.c
@ -5574,8 +5554,7 @@ fi
# Patchset server-Object_Types
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * server-Misc_ACL, ntdll-Threading, ntdll-Wait_User_APC, server-Key_State, server-PeekMessage, server-Signal_Thread,
# | server-Shared_Memory
# | * ntdll-Threading, ntdll-Wait_User_APC, server-Key_State, server-PeekMessage, server-Signal_Thread, server-Shared_Memory
# |
# | This patchset fixes the following Wine bugs:
# | * [#44629] Process Hacker can't enumerate handles
@ -5787,7 +5766,8 @@ fi
# Patchset shell32-Progress_Dialog
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * server-File_Permissions, ntdll-FileDispositionInformation, kernel32-CopyFileEx, shell32-SHFileOperation_Move
# | * ntdll-Junction_Points, server-File_Permissions, ntdll-FileDispositionInformation, kernel32-CopyFileEx,
# | shell32-SHFileOperation_Move
# |
# | Modified files:
# | * dlls/shell32/shell32.rc, dlls/shell32/shlfileop.c, dlls/shell32/shresdef.h
@ -5808,8 +5788,8 @@ fi
# Patchset shell32-ACE_Viewer
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * server-File_Permissions, ntdll-FileDispositionInformation, kernel32-CopyFileEx, shell32-SHFileOperation_Move,
# | shell32-Progress_Dialog
# | * ntdll-Junction_Points, server-File_Permissions, ntdll-FileDispositionInformation, kernel32-CopyFileEx,
# | shell32-SHFileOperation_Move, shell32-Progress_Dialog
# |
# | Modified files:
# | * dlls/aclui/Makefile.in, dlls/aclui/aclui.rc, dlls/aclui/aclui_main.c, dlls/aclui/resource.h, dlls/aclui/user_icons.bmp,
@ -7433,7 +7413,10 @@ fi
# Patchset ws2_32-TransmitFile
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * server-Desktop_Refcount
# | * Staging, advapi32-CreateRestrictedToken, advapi32-Token_Integrity_Level, ntdll-Junction_Points, ntdll-
# | RtlCreateUserThread, ntdll-Exception, ntdll-SystemRoot_Symlink, ntdll-ThreadTime, ntdll-Hide_Wine_Exports, ntdll-
# | User_Shared_Data, server-Realtime_Priority, ntdll-Threading, ntdll-Wait_User_APC, server-Key_State, server-PeekMessage,
# | server-Signal_Thread, server-Shared_Memory, ws2_32-WSACleanup, eventfd_synchronization, server-Desktop_Refcount
# |
# | Modified files:
# | * dlls/ws2_32/socket.c, dlls/ws2_32/tests/sock.c, include/winsock.h, server/protocol.def, server/sock.c

View File

@ -1,4 +1,4 @@
From a0cf4045fe4ac3e3d561824da30fc7998097f97b Mon Sep 17 00:00:00 2001
From 45aa42a648dce6c80d269ff51e7350782fd50ae0 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 4 Dec 2015 10:36:47 +0100
Subject: [PATCH] server: Introduce a new alloc_handle object callback. (v2)
@ -15,6 +15,7 @@ Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
server/debugger.c | 2 ++
server/device.c | 4 ++++
server/directory.c | 2 ++
server/esync.c | 1 +
server/event.c | 2 ++
server/fd.c | 4 ++++
server/file.c | 1 +
@ -40,10 +41,10 @@ Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
server/timer.c | 1 +
server/token.c | 1 +
server/winstation.c | 2 ++
35 files changed, 78 insertions(+), 5 deletions(-)
36 files changed, 79 insertions(+), 5 deletions(-)
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 9e26aa4..973f6df 100644
index 9e26aa4fb..973f6dfe1 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -6677,6 +6677,6 @@ union generic_reply
@ -55,7 +56,7 @@ index 9e26aa4..973f6df 100644
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/async.c b/server/async.c
index 75989e5..b5aff66 100644
index 75989e5d3..b5aff667e 100644
--- a/server/async.c
+++ b/server/async.c
@@ -81,6 +81,7 @@ static const struct object_ops async_ops =
@ -75,7 +76,7 @@ index 75989e5..b5aff66 100644
iosb_destroy /* destroy */
};
diff --git a/server/atom.c b/server/atom.c
index 11b7ac5..e27b6f4 100644
index 11b7ac532..e27b6f460 100644
--- a/server/atom.c
+++ b/server/atom.c
@@ -92,6 +92,7 @@ static const struct object_ops atom_table_ops =
@ -87,7 +88,7 @@ index 11b7ac5..e27b6f4 100644
atom_table_destroy /* destroy */
};
diff --git a/server/change.c b/server/change.c
index 2be6a83..dee48ce 100644
index 2be6a8360..dee48ce9f 100644
--- a/server/change.c
+++ b/server/change.c
@@ -127,6 +127,7 @@ static const struct object_ops dir_ops =
@ -99,7 +100,7 @@ index 2be6a83..dee48ce 100644
dir_destroy /* destroy */
};
diff --git a/server/clipboard.c b/server/clipboard.c
index 673aabb..5888754 100644
index 673aabbd0..588875439 100644
--- a/server/clipboard.c
+++ b/server/clipboard.c
@@ -89,6 +89,7 @@ static const struct object_ops clipboard_ops =
@ -111,7 +112,7 @@ index 673aabb..5888754 100644
clipboard_destroy /* destroy */
};
diff --git a/server/completion.c b/server/completion.c
index 1a074c8..c0d2ccf 100644
index 1a074c801..c0d2ccfcb 100644
--- a/server/completion.c
+++ b/server/completion.c
@@ -77,6 +77,7 @@ static const struct object_ops completion_ops =
@ -123,7 +124,7 @@ index 1a074c8..c0d2ccf 100644
completion_destroy /* destroy */
};
diff --git a/server/console.c b/server/console.c
index c322708..f437e74 100644
index c32270855..f437e7475 100644
--- a/server/console.c
+++ b/server/console.c
@@ -90,6 +90,7 @@ static const struct object_ops console_input_ops =
@ -151,7 +152,7 @@ index c322708..f437e74 100644
screen_buffer_destroy /* destroy */
};
diff --git a/server/debugger.c b/server/debugger.c
index 9a29ef4..1c68ee0 100644
index 9a29ef41f..1c68ee03e 100644
--- a/server/debugger.c
+++ b/server/debugger.c
@@ -86,6 +86,7 @@ static const struct object_ops debug_event_ops =
@ -171,7 +172,7 @@ index 9a29ef4..1c68ee0 100644
debug_ctx_destroy /* destroy */
};
diff --git a/server/device.c b/server/device.c
index 8340cb1..6573bd4 100644
index 8340cb103..6573bd44c 100644
--- a/server/device.c
+++ b/server/device.c
@@ -79,6 +79,7 @@ static const struct object_ops irp_call_ops =
@ -207,7 +208,7 @@ index 8340cb1..6573bd4 100644
device_file_destroy /* destroy */
};
diff --git a/server/directory.c b/server/directory.c
index 55cbad3..1ab0c73 100644
index 55cbad328..1ab0c7335 100644
--- a/server/directory.c
+++ b/server/directory.c
@@ -69,6 +69,7 @@ static const struct object_ops object_type_ops =
@ -226,8 +227,20 @@ index 55cbad3..1ab0c73 100644
no_close_handle, /* close_handle */
directory_destroy /* destroy */
};
diff --git a/server/esync.c b/server/esync.c
index 4521993d4..dfdf6a7ed 100644
--- a/server/esync.c
+++ b/server/esync.c
@@ -138,6 +138,7 @@ const struct object_ops esync_ops =
default_unlink_name, /* unlink_name */
no_open_file, /* open_file */
no_kernel_obj_list, /* get_kernel_obj_list */
+ no_alloc_handle, /* alloc_handle */
no_close_handle, /* close_handle */
esync_destroy /* destroy */
};
diff --git a/server/event.c b/server/event.c
index 79287e7..ad8fddb 100644
index 79287e7ed..ad8fddbfa 100644
--- a/server/event.c
+++ b/server/event.c
@@ -76,6 +76,7 @@ static const struct object_ops event_ops =
@ -247,7 +260,7 @@ index 79287e7..ad8fddb 100644
no_destroy /* destroy */
};
diff --git a/server/fd.c b/server/fd.c
index 2a38780..e628cdb 100644
index 95f289718..c158fefb8 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -222,6 +222,7 @@ static const struct object_ops fd_ops =
@ -283,7 +296,7 @@ index 2a38780..e628cdb 100644
no_destroy /* destroy */
};
diff --git a/server/file.c b/server/file.c
index 3ce7307..fa96ca7 100644
index 25aa6bcbc..b6c7b95d2 100644
--- a/server/file.c
+++ b/server/file.c
@@ -98,6 +98,7 @@ static const struct object_ops file_ops =
@ -295,7 +308,7 @@ index 3ce7307..fa96ca7 100644
file_destroy /* destroy */
};
diff --git a/server/handle.c b/server/handle.c
index 6ca4489..879098a 100644
index 6ca4489a8..879098aee 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -135,6 +135,7 @@ static const struct object_ops handle_table_ops =
@ -340,7 +353,7 @@ index 6ca4489..879098a 100644
}
}
diff --git a/server/hook.c b/server/hook.c
index f5d7639..22b1482 100644
index f5d7639fd..22b148289 100644
--- a/server/hook.c
+++ b/server/hook.c
@@ -93,6 +93,7 @@ static const struct object_ops hook_table_ops =
@ -352,7 +365,7 @@ index f5d7639..22b1482 100644
hook_table_destroy /* destroy */
};
diff --git a/server/mailslot.c b/server/mailslot.c
index fc1caa9..57d0775 100644
index fc1caa9e0..57d07751d 100644
--- a/server/mailslot.c
+++ b/server/mailslot.c
@@ -91,6 +91,7 @@ static const struct object_ops mailslot_ops =
@ -380,7 +393,7 @@ index fc1caa9..57d0775 100644
mailslot_device_destroy /* destroy */
};
diff --git a/server/mapping.c b/server/mapping.c
index 1b3df08..819181a 100644
index aab89ee43..0bc6a555b 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -103,6 +103,7 @@ static const struct object_ops ranges_ops =
@ -408,7 +421,7 @@ index 1b3df08..819181a 100644
mapping_destroy /* destroy */
};
diff --git a/server/mutex.c b/server/mutex.c
index f5f969b..a4ab6bd 100644
index f5f969b3d..a4ab6bdb3 100644
--- a/server/mutex.c
+++ b/server/mutex.c
@@ -73,6 +73,7 @@ static const struct object_ops mutex_ops =
@ -420,7 +433,7 @@ index f5f969b..a4ab6bd 100644
mutex_destroy /* destroy */
};
diff --git a/server/named_pipe.c b/server/named_pipe.c
index ceb9894..6892081 100644
index ceb9894ba..6892081d3 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -130,6 +130,7 @@ static const struct object_ops named_pipe_ops =
@ -466,7 +479,7 @@ index ceb9894..6892081 100644
named_pipe_device_file_destroy /* destroy */
};
diff --git a/server/object.c b/server/object.c
index 048da50..fbac8f7 100644
index 048da504a..fbac8f75a 100644
--- a/server/object.c
+++ b/server/object.c
@@ -693,6 +693,10 @@ struct object *no_open_file( struct object *obj, unsigned int access, unsigned i
@ -481,7 +494,7 @@ index 048da50..fbac8f7 100644
{
return 1; /* ok to close */
diff --git a/server/object.h b/server/object.h
index ca5a191..d913e65 100644
index ca5a191f9..d913e6553 100644
--- a/server/object.h
+++ b/server/object.h
@@ -93,8 +93,10 @@ struct object_ops
@ -505,7 +518,7 @@ index ca5a191..d913e65 100644
extern void no_destroy( struct object *obj );
#ifdef DEBUG_OBJECTS
diff --git a/server/process.c b/server/process.c
index f0b44a8..c059d19 100644
index 15c99cd53..e6568eceb 100644
--- a/server/process.c
+++ b/server/process.c
@@ -91,6 +91,7 @@ static const struct object_ops process_ops =
@ -533,7 +546,7 @@ index f0b44a8..c059d19 100644
job_destroy /* destroy */
};
diff --git a/server/queue.c b/server/queue.c
index 56fa4d9..b5d0677 100644
index 56fa4d98c..b5d0677fd 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -194,6 +194,7 @@ static const struct object_ops msg_queue_ops =
@ -553,7 +566,7 @@ index 56fa4d9..b5d0677 100644
thread_input_destroy /* destroy */
};
diff --git a/server/registry.c b/server/registry.c
index 1757fd3..e56134e 100644
index 1757fd3b3..e56134e16 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -172,6 +172,7 @@ static const struct object_ops key_ops =
@ -565,7 +578,7 @@ index 1757fd3..e56134e 100644
key_destroy /* destroy */
};
diff --git a/server/request.c b/server/request.c
index 73878cf..f089ccc 100644
index 73878cf23..f089ccc2d 100644
--- a/server/request.c
+++ b/server/request.c
@@ -109,6 +109,7 @@ static const struct object_ops master_socket_ops =
@ -577,7 +590,7 @@ index 73878cf..f089ccc 100644
master_socket_destroy /* destroy */
};
diff --git a/server/semaphore.c b/server/semaphore.c
index 36e3e79..1913871 100644
index 36e3e79e5..191387185 100644
--- a/server/semaphore.c
+++ b/server/semaphore.c
@@ -70,6 +70,7 @@ static const struct object_ops semaphore_ops =
@ -589,7 +602,7 @@ index 36e3e79..1913871 100644
no_destroy /* destroy */
};
diff --git a/server/serial.c b/server/serial.c
index 2848e1d..966b8bc 100644
index 2848e1dc7..966b8bc6b 100644
--- a/server/serial.c
+++ b/server/serial.c
@@ -104,6 +104,7 @@ static const struct object_ops serial_ops =
@ -601,7 +614,7 @@ index 2848e1d..966b8bc 100644
serial_destroy /* destroy */
};
diff --git a/server/signal.c b/server/signal.c
index ca20039..a2e0efe 100644
index ca200394f..a2e0efef1 100644
--- a/server/signal.c
+++ b/server/signal.c
@@ -79,6 +79,7 @@ static const struct object_ops handler_ops =
@ -613,7 +626,7 @@ index ca20039..a2e0efe 100644
handler_destroy /* destroy */
};
diff --git a/server/snapshot.c b/server/snapshot.c
index 7d0d742..2ad9d5d 100644
index 7d0d742ee..2ad9d5d78 100644
--- a/server/snapshot.c
+++ b/server/snapshot.c
@@ -73,6 +73,7 @@ static const struct object_ops snapshot_ops =
@ -625,7 +638,7 @@ index 7d0d742..2ad9d5d 100644
snapshot_destroy /* destroy */
};
diff --git a/server/sock.c b/server/sock.c
index ac83081..d373768 100644
index ac830812d..d373768c9 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -156,6 +156,7 @@ static const struct object_ops sock_ops =
@ -645,7 +658,7 @@ index ac83081..d373768 100644
ifchange_destroy /* destroy */
};
diff --git a/server/symlink.c b/server/symlink.c
index 6b66b23..52387be 100644
index 6b66b23dd..52387be1e 100644
--- a/server/symlink.c
+++ b/server/symlink.c
@@ -72,6 +72,7 @@ static const struct object_ops symlink_ops =
@ -657,7 +670,7 @@ index 6b66b23..52387be 100644
symlink_destroy /* destroy */
};
diff --git a/server/thread.c b/server/thread.c
index 8c45419..bcb8526 100644
index 8c4541993..bcb852666 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -123,6 +123,7 @@ static const struct object_ops thread_apc_ops =
@ -677,7 +690,7 @@ index 8c45419..bcb8526 100644
destroy_thread /* destroy */
};
diff --git a/server/timer.c b/server/timer.c
index f2403fc..75d289c 100644
index f2403fc9b..75d289cac 100644
--- a/server/timer.c
+++ b/server/timer.c
@@ -80,6 +80,7 @@ static const struct object_ops timer_ops =
@ -689,7 +702,7 @@ index f2403fc..75d289c 100644
timer_destroy /* destroy */
};
diff --git a/server/token.c b/server/token.c
index 1a41ad0..71f8552 100644
index 139161f9d..62e3f8d15 100644
--- a/server/token.c
+++ b/server/token.c
@@ -164,6 +164,7 @@ static const struct object_ops token_ops =
@ -701,7 +714,7 @@ index 1a41ad0..71f8552 100644
token_destroy /* destroy */
};
diff --git a/server/winstation.c b/server/winstation.c
index 845043b..d7e8a5c 100644
index 845043b20..d7e8a5c80 100644
--- a/server/winstation.c
+++ b/server/winstation.c
@@ -77,6 +77,7 @@ static const struct object_ops winstation_ops =
@ -721,5 +734,5 @@ index 845043b..d7e8a5c 100644
desktop_destroy /* destroy */
};
--
1.9.1
2.21.0

View File

@ -1,3 +1,4 @@
Fixes: Fix possible leak of explorer.exe processes and implement proper desktop refcounting
Fixes: Assign random name when trying to create Window Station without name
Fixes: [46967] GOG Galaxy doesn't run in virtual desktop.
Depends: eventfd_synchronization

View File

@ -1,2 +1,3 @@
Fixes: Allow to open files/directories without any access rights in order to query attributes
Fixes: [38970] Improve mapping of DACL to file permissions
Depends: ntdll-Junction_Points

View File

@ -1,164 +0,0 @@
From 0672c3d257e7e70d48edafde6e8a286b8e7c2c85 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 25 Jun 2014 11:49:12 -0600
Subject: [PATCH] server: Add default security descriptor ownership for
processes.
---
dlls/advapi32/tests/security.c | 35 ++++++++++++++++++++++++++++++++++
server/process.c | 27 +++++++++++++++++++++++++-
server/security.h | 1 +
server/token.c | 2 ++
4 files changed, 64 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 62aa556846a..eb106daab1d 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -4682,11 +4682,15 @@ static void test_acls(void)
static void test_GetSecurityInfo(void)
{
+ char domain_users_ptr[sizeof(TOKEN_USER) + sizeof(SID) + sizeof(DWORD)*SID_MAX_SUB_AUTHORITIES];
char b[sizeof(TOKEN_USER) + sizeof(SID) + sizeof(DWORD)*SID_MAX_SUB_AUTHORITIES];
char admin_ptr[sizeof(SID)+sizeof(ULONG)*SID_MAX_SUB_AUTHORITIES], dacl[100];
+ PSID domain_users_sid = (PSID) domain_users_ptr, domain_sid;
+ SID_IDENTIFIER_AUTHORITY sia = { SECURITY_NT_AUTHORITY };
DWORD sid_size = sizeof(admin_ptr), l = sizeof(b);
PSID admin_sid = (PSID) admin_ptr, user_sid;
char sd[SECURITY_DESCRIPTOR_MIN_LENGTH];
+ BOOL owner_defaulted, group_defaulted;
ACL_SIZE_INFORMATION acl_size;
PSECURITY_DESCRIPTOR pSD;
ACCESS_ALLOWED_ACE *ace;
@@ -4813,6 +4817,37 @@ static void test_GetSecurityInfo(void)
}
LocalFree(pSD);
CloseHandle(obj);
+
+ /* Obtain the "domain users" SID from the user SID */
+ if (!AllocateAndInitializeSid(&sia, 4, *GetSidSubAuthority(user_sid, 0),
+ *GetSidSubAuthority(user_sid, 1),
+ *GetSidSubAuthority(user_sid, 2),
+ *GetSidSubAuthority(user_sid, 3), 0, 0, 0, 0, &domain_sid))
+ {
+ win_skip("Failed to get current domain SID\n");
+ return;
+ }
+ sid_size = sizeof(domain_users_ptr);
+ pCreateWellKnownSid(WinAccountDomainUsersSid, domain_sid, domain_users_sid, &sid_size);
+ FreeSid(domain_sid);
+
+ /* Test querying the ownership of a process */
+ ret = pGetSecurityInfo(GetCurrentProcess(), SE_KERNEL_OBJECT,
+ OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION,
+ NULL, NULL, NULL, NULL, &pSD);
+ ok(!ret, "GetNamedSecurityInfo failed with error %d\n", ret);
+
+ bret = GetSecurityDescriptorOwner(pSD, &owner, &owner_defaulted);
+ ok(bret, "GetSecurityDescriptorOwner failed with error %d\n", GetLastError());
+ ok(owner != NULL, "owner should not be NULL\n");
+ ok(EqualSid(owner, admin_sid) || EqualSid(owner, user_sid),
+ "Process owner SID != Administrators SID.\n");
+
+ bret = GetSecurityDescriptorGroup(pSD, &group, &group_defaulted);
+ ok(bret, "GetSecurityDescriptorGroup failed with error %d\n", GetLastError());
+ ok(group != NULL, "group should not be NULL\n");
+ ok(EqualSid(group, domain_users_sid), "Process group SID != Domain Users SID.\n");
+ LocalFree(pSD);
}
static void test_GetSidSubAuthority(void)
diff --git a/server/process.c b/server/process.c
index 2d6394a9183..0a77130b613 100644
--- a/server/process.c
+++ b/server/process.c
@@ -63,6 +63,7 @@ static void process_dump( struct object *obj, int verbose );
static struct object_type *process_get_type( struct object *obj );
static int process_signaled( struct object *obj, struct wait_queue_entry *entry );
static unsigned int process_map_access( struct object *obj, unsigned int access );
+static struct security_descriptor *process_get_sd( struct object *obj );
static void process_poll_event( struct fd *fd, int event );
static struct list *process_get_kernel_obj_list( struct object *obj );
static void process_destroy( struct object *obj );
@@ -80,7 +81,7 @@ static const struct object_ops process_ops =
no_signal, /* signal */
no_get_fd, /* get_fd */
process_map_access, /* map_access */
- default_get_sd, /* get_sd */
+ process_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
no_link_name, /* link_name */
@@ -663,12 +664,36 @@ static unsigned int process_map_access( struct object *obj, unsigned int access
return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
}
+
static struct list *process_get_kernel_obj_list( struct object *obj )
{
struct process *process = (struct process *)obj;
return &process->kernel_object;
}
+static struct security_descriptor *process_get_sd( struct object *obj )
+{
+ static struct security_descriptor *key_default_sd;
+
+ if (obj->sd) return obj->sd;
+
+ if (!key_default_sd)
+ {
+ size_t users_sid_len = security_sid_len( security_domain_users_sid );
+ size_t admins_sid_len = security_sid_len( security_builtin_admins_sid );
+
+ key_default_sd = mem_alloc( sizeof(*key_default_sd) + admins_sid_len + users_sid_len );
+ key_default_sd->control = SE_DACL_PRESENT;
+ key_default_sd->owner_len = admins_sid_len;
+ key_default_sd->group_len = users_sid_len;
+ key_default_sd->sacl_len = 0;
+ key_default_sd->dacl_len = 0;
+ memcpy( key_default_sd + 1, security_builtin_admins_sid, admins_sid_len );
+ memcpy( (char *)(key_default_sd + 1) + admins_sid_len, security_domain_users_sid, users_sid_len );
+ }
+ return key_default_sd;
+}
+
static void process_poll_event( struct fd *fd, int event )
{
struct process *process = get_fd_user( fd );
diff --git a/server/security.h b/server/security.h
index bc4a8f64daa..6c337143c3d 100644
--- a/server/security.h
+++ b/server/security.h
@@ -47,6 +47,7 @@ extern const PSID security_local_user_sid;
extern const PSID security_local_system_sid;
extern const PSID security_builtin_users_sid;
extern const PSID security_builtin_admins_sid;
+extern const PSID security_domain_users_sid;
extern const PSID security_high_label_sid;
diff --git a/server/token.c b/server/token.c
index de76939831e..0e124e8fe0c 100644
--- a/server/token.c
+++ b/server/token.c
@@ -83,6 +83,7 @@ static const SID_N(5) local_user_sid = { SID_REVISION, 5, { SECURITY_NT_AUTHORIT
static const SID_N(2) builtin_admins_sid = { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS } };
static const SID_N(2) builtin_users_sid = { SID_REVISION, 2, { SECURITY_NT_AUTHORITY }, { SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_USERS } };
static const SID_N(3) builtin_logon_sid = { SID_REVISION, 3, { SECURITY_NT_AUTHORITY }, { SECURITY_LOGON_IDS_RID, 0, 0 } };
+static const SID_N(5) domain_users_sid = { SID_REVISION, 5, { SECURITY_NT_AUTHORITY }, { SECURITY_NT_NON_UNIQUE, 0, 0, 0, DOMAIN_GROUP_RID_USERS } };
const PSID security_world_sid = (PSID)&world_sid;
static const PSID security_local_sid = (PSID)&local_sid;
@@ -92,6 +93,7 @@ const PSID security_local_system_sid = (PSID)&local_system_sid;
const PSID security_local_user_sid = (PSID)&local_user_sid;
const PSID security_builtin_admins_sid = (PSID)&builtin_admins_sid;
const PSID security_builtin_users_sid = (PSID)&builtin_users_sid;
+const PSID security_domain_users_sid = (PSID)&domain_users_sid;
const PSID security_high_label_sid = (PSID)&high_label_sid;
static luid_t prev_luid_value = { 1000, 0 };
--
2.20.1

View File

@ -1,138 +0,0 @@
From 7e00c939d05fbb097fa22a60fed2e920587f8de6 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 25 Jun 2014 11:51:05 -0600
Subject: server: Add default security descriptor DACL for processes.
---
dlls/advapi32/tests/security.c | 50 ++++++++++++++++++++++++++++++++++++++++
server/process.c | 28 ++++++++++++++++++++--
2 files changed, 76 insertions(+), 2 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 2fb57c4..900c3ff 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3858,10 +3858,12 @@ static void test_GetSecurityInfo(void)
char admin_ptr[sizeof(SID)+sizeof(ULONG)*SID_MAX_SUB_AUTHORITIES], dacl[100];
PSID domain_users_sid = (PSID) domain_users_ptr, domain_sid;
SID_IDENTIFIER_AUTHORITY sia = { SECURITY_NT_AUTHORITY };
+ int domain_users_ace_id = -1, admins_ace_id = -1, i;
DWORD sid_size = sizeof(admin_ptr), l = sizeof(b);
PSID admin_sid = (PSID) admin_ptr, user_sid;
char sd[SECURITY_DESCRIPTOR_MIN_LENGTH];
BOOL owner_defaulted, group_defaulted;
+ BOOL dacl_defaulted, dacl_present;
ACL_SIZE_INFORMATION acl_size;
PSECURITY_DESCRIPTOR pSD;
ACCESS_ALLOWED_ACE *ace;
@@ -3869,6 +3871,7 @@ static void test_GetSecurityInfo(void)
PSID owner, group;
BOOL bret = TRUE;
PACL pDacl;
+ BYTE flags;
DWORD ret;
if (!pGetSecurityInfo || !pSetSecurityInfo)
@@ -4017,6 +4020,53 @@ static void test_GetSecurityInfo(void)
ok(group != NULL, "group should not be NULL\n");
ok(EqualSid(group, domain_users_sid), "Process group SID != Domain Users SID.\n");
LocalFree(pSD);
+
+ /* Test querying the DACL of a process */
+ ret = pGetSecurityInfo(GetCurrentProcess(), SE_KERNEL_OBJECT, DACL_SECURITY_INFORMATION,
+ NULL, NULL, NULL, NULL, &pSD);
+ ok(!ret, "GetSecurityInfo failed with error %d\n", ret);
+
+ bret = GetSecurityDescriptorDacl(pSD, &dacl_present, &pDacl, &dacl_defaulted);
+ ok(bret, "GetSecurityDescriptorDacl failed with error %d\n", GetLastError());
+ ok(dacl_present, "DACL should be present\n");
+ ok(pDacl && IsValidAcl(pDacl), "GetSecurityDescriptorDacl returned invalid DACL.\n");
+ bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ ok(bret, "GetAclInformation failed\n");
+ ok(acl_size.AceCount != 0, "GetAclInformation returned no ACLs\n");
+ for (i=0; i<acl_size.AceCount; i++)
+ {
+ bret = pGetAce(pDacl, i, (VOID **)&ace);
+ ok(bret, "Failed to get ACE %d.\n", i);
+ bret = EqualSid(&ace->SidStart, domain_users_sid);
+ if (bret) domain_users_ace_id = i;
+ bret = EqualSid(&ace->SidStart, admin_sid);
+ if (bret) admins_ace_id = i;
+ }
+ ok(domain_users_ace_id != -1 || broken(domain_users_ace_id == -1) /* win2k */,
+ "Domain Users ACE not found.\n");
+ if (domain_users_ace_id != -1)
+ {
+ bret = pGetAce(pDacl, domain_users_ace_id, (VOID **)&ace);
+ ok(bret, "Failed to get Domain Users ACE.\n");
+ flags = ((ACE_HEADER *)ace)->AceFlags;
+ ok(flags == (INHERIT_ONLY_ACE|CONTAINER_INHERIT_ACE),
+ "Domain Users ACE has unexpected flags (0x%x != 0x%x)\n", flags,
+ INHERIT_ONLY_ACE|CONTAINER_INHERIT_ACE);
+ ok(ace->Mask == GENERIC_READ, "Domain Users ACE has unexpected mask (0x%x != 0x%x)\n",
+ ace->Mask, GENERIC_READ);
+ }
+ ok(admins_ace_id != -1 || broken(admins_ace_id == -1) /* xp */,
+ "Builtin Admins ACE not found.\n");
+ if (admins_ace_id != -1)
+ {
+ bret = pGetAce(pDacl, admins_ace_id, (VOID **)&ace);
+ ok(bret, "Failed to get Builtin Admins ACE.\n");
+ flags = ((ACE_HEADER *)ace)->AceFlags;
+ ok(flags == 0x0, "Builtin Admins ACE has unexpected flags (0x%x != 0x0)\n", flags);
+ ok(ace->Mask == PROCESS_ALL_ACCESS || broken(ace->Mask == 0x1f0fff) /* win2k */,
+ "Builtin Admins ACE has unexpected mask (0x%x != 0x%x)\n", ace->Mask, PROCESS_ALL_ACCESS);
+ }
+ LocalFree(pSD);
}
static void test_GetSidSubAuthority(void)
diff --git a/server/process.c b/server/process.c
index 01016d2..9f4586a 100644
--- a/server/process.c
+++ b/server/process.c
@@ -467,15 +467,39 @@ static struct security_descriptor *process_get_sd( struct object *obj )
{
size_t users_sid_len = security_sid_len( security_domain_users_sid );
size_t admins_sid_len = security_sid_len( security_builtin_admins_sid );
+ size_t dacl_len = sizeof(ACL) + 2 * offsetof( ACCESS_ALLOWED_ACE, SidStart )
+ + users_sid_len + admins_sid_len;
+ ACCESS_ALLOWED_ACE *aaa;
+ ACL *dacl;
- key_default_sd = mem_alloc( sizeof(*key_default_sd) + admins_sid_len + users_sid_len );
+ key_default_sd = mem_alloc( sizeof(*key_default_sd) + admins_sid_len + users_sid_len
+ + dacl_len );
key_default_sd->control = SE_DACL_PRESENT;
key_default_sd->owner_len = admins_sid_len;
key_default_sd->group_len = users_sid_len;
key_default_sd->sacl_len = 0;
- key_default_sd->dacl_len = 0;
+ key_default_sd->dacl_len = dacl_len;
memcpy( key_default_sd + 1, security_builtin_admins_sid, admins_sid_len );
memcpy( (char *)(key_default_sd + 1) + admins_sid_len, security_domain_users_sid, users_sid_len );
+
+ dacl = (ACL *)((char *)(key_default_sd + 1) + admins_sid_len + users_sid_len);
+ dacl->AclRevision = ACL_REVISION;
+ dacl->Sbz1 = 0;
+ dacl->AclSize = dacl_len;
+ dacl->AceCount = 2;
+ dacl->Sbz2 = 0;
+ aaa = (ACCESS_ALLOWED_ACE *)(dacl + 1);
+ aaa->Header.AceType = ACCESS_ALLOWED_ACE_TYPE;
+ aaa->Header.AceFlags = INHERIT_ONLY_ACE | CONTAINER_INHERIT_ACE;
+ aaa->Header.AceSize = offsetof( ACCESS_ALLOWED_ACE, SidStart ) + users_sid_len;
+ aaa->Mask = GENERIC_READ;
+ memcpy( &aaa->SidStart, security_domain_users_sid, users_sid_len );
+ aaa = (ACCESS_ALLOWED_ACE *)((char *)aaa + aaa->Header.AceSize);
+ aaa->Header.AceType = ACCESS_ALLOWED_ACE_TYPE;
+ aaa->Header.AceFlags = 0;
+ aaa->Header.AceSize = offsetof( ACCESS_ALLOWED_ACE, SidStart ) + admins_sid_len;
+ aaa->Mask = PROCESS_ALL_ACCESS;
+ memcpy( &aaa->SidStart, security_builtin_admins_sid, admins_sid_len );
}
return key_default_sd;
}
--
1.7.9.5

View File

@ -1 +0,0 @@
Fixes: [15980] GetSecurityInfo returns NULL DACL for process object

View File

@ -1,4 +1,3 @@
Fixes: [44629] Process Hacker can't enumerate handles
Fixes: [45374] Yet Another Process Monitor (.NET 2.0 app) reports System.AccessViolationException
Depends: server-Shared_Memory
Depends: server-Misc_ACL

View File

@ -1,14 +1,14 @@
From 23e9d4f9e18d24215fbed8e595757163370fa073 Mon Sep 17 00:00:00 2001
From c88ebdd4735d3aece4b3d30e7863f69180f431ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 24 Feb 2015 04:25:29 +0100
Subject: [PATCH] shell32: Correct indentation in shfileop.c.
---
dlls/shell32/shlfileop.c | 794 +++++++++++++++++++++++------------------------
1 file changed, 396 insertions(+), 398 deletions(-)
dlls/shell32/shlfileop.c | 662 +++++++++++++++++++--------------------
1 file changed, 330 insertions(+), 332 deletions(-)
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index 9358980..260b4c2 100644
index 78ee2d1c0..180302db2 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -207,108 +207,107 @@ static int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, H
@ -213,10 +213,13 @@ index 9358980..260b4c2 100644
static DWORD SHELL32_AnsiToUnicodeBuf(LPCSTR aPath, LPWSTR *wPath, DWORD minChars)
{
- DWORD len = MultiByteToWideChar(CP_ACP, 0, aPath, -1, NULL, 0);
-
+ DWORD len = MultiByteToWideChar(CP_ACP, 0, aPath, -1, NULL, 0);
- if (len < minChars)
- len = minChars;
-
+ if (len < minChars)
+ len = minChars;
- *wPath = heap_alloc(len * sizeof(WCHAR));
- if (*wPath)
- {
@ -224,11 +227,6 @@ index 9358980..260b4c2 100644
- return NO_ERROR;
- }
- return E_OUTOFMEMORY;
+ DWORD len = MultiByteToWideChar(CP_ACP, 0, aPath, -1, NULL, 0);
+
+ if (len < minChars)
+ len = minChars;
+
+ *wPath = heap_alloc(len * sizeof(WCHAR));
+ if (*wPath)
+ {
@ -256,9 +254,12 @@ index 9358980..260b4c2 100644
{
- LPWSTR wPath;
- DWORD retCode;
-
+ LPWSTR wPath;
+ DWORD retCode;
- TRACE("(%s, %p)\n", debugstr_a(path), sec);
-
+ TRACE("(%s, %p)\n", debugstr_a(path), sec);
- retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
- if (!retCode)
- {
@ -266,11 +267,6 @@ index 9358980..260b4c2 100644
- heap_free(wPath);
- }
- return retCode;
+ LPWSTR wPath;
+ DWORD retCode;
+
+ TRACE("(%s, %p)\n", debugstr_a(path), sec);
+
+ retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
+ if (!retCode)
+ {
@ -285,15 +281,14 @@ index 9358980..260b4c2 100644
static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
{
- TRACE("(%s, %p)\n", debugstr_w(path), sec);
-
+ TRACE("(%s, %p)\n", debugstr_w(path), sec);
- if (CreateDirectoryW(path, sec))
- {
- SHChangeNotify(SHCNE_MKDIR, SHCNF_PATHW, path, NULL);
- return ERROR_SUCCESS;
- }
- return GetLastError();
+ TRACE("(%s, %p)\n", debugstr_w(path), sec);
+
+ if (CreateDirectoryW(path, sec))
+ {
+ SHChangeNotify(SHCNE_MKDIR, SHCNF_PATHW, path, NULL);
@ -321,9 +316,12 @@ index 9358980..260b4c2 100644
{
- LPWSTR wPath;
- DWORD retCode;
-
+ LPWSTR wPath;
+ DWORD retCode;
- TRACE("(%s)\n", debugstr_a(path));
-
+ TRACE("(%s)\n", debugstr_a(path));
- retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
- if (!retCode)
- {
@ -331,11 +329,6 @@ index 9358980..260b4c2 100644
- heap_free(wPath);
- }
- return retCode;
+ LPWSTR wPath;
+ DWORD retCode;
+
+ TRACE("(%s)\n", debugstr_a(path));
+
+ retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
+ if (!retCode)
+ {
@ -351,7 +344,9 @@ index 9358980..260b4c2 100644
{
- BOOL ret;
- TRACE("(%s)\n", debugstr_w(path));
-
+ BOOL ret;
+ TRACE("(%s)\n", debugstr_w(path));
- ret = RemoveDirectoryW(path);
- if (!ret)
- {
@ -367,9 +362,6 @@ index 9358980..260b4c2 100644
- return ERROR_SUCCESS;
- }
- return GetLastError();
+ BOOL ret;
+ TRACE("(%s)\n", debugstr_w(path));
+
+ ret = RemoveDirectoryW(path);
+ if (!ret)
+ {
@ -406,9 +398,12 @@ index 9358980..260b4c2 100644
{
- LPWSTR wPath;
- DWORD retCode;
-
+ LPWSTR wPath;
+ DWORD retCode;
- TRACE("(%s)\n", debugstr_a(path));
-
+ TRACE("(%s)\n", debugstr_a(path));
- retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
- if (!retCode)
- {
@ -416,11 +411,6 @@ index 9358980..260b4c2 100644
- heap_free(wPath);
- }
- return retCode;
+ LPWSTR wPath;
+ DWORD retCode;
+
+ TRACE("(%s)\n", debugstr_a(path));
+
+ retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
+ if (!retCode)
+ {
@ -435,9 +425,11 @@ index 9358980..260b4c2 100644
static DWORD SHNotifyDeleteFileW(LPCWSTR path)
{
- BOOL ret;
-
+ BOOL ret;
- TRACE("(%s)\n", debugstr_w(path));
-
+ TRACE("(%s)\n", debugstr_w(path));
- ret = DeleteFileW(path);
- if (!ret)
- {
@ -453,10 +445,6 @@ index 9358980..260b4c2 100644
- return ERROR_SUCCESS;
- }
- return GetLastError();
+ BOOL ret;
+
+ TRACE("(%s)\n", debugstr_w(path));
+
+ ret = DeleteFileW(path);
+ if (!ret)
+ {
@ -492,19 +480,28 @@ index 9358980..260b4c2 100644
static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
{
- BOOL ret;
-
+ BOOL ret;
- TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest));
-
+ TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest));
- ret = MoveFileExW(src, dest, MOVEFILE_REPLACE_EXISTING);
-
+ ret = MoveFileExW(src, dest, MOVEFILE_REPLACE_EXISTING);
- /* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
- if (!ret)
- ret = MoveFileW(src, dest);
-
+ /* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
+ if (!ret)
+ ret = MoveFileW(src, dest);
- if (!ret)
- {
- DWORD dwAttr;
-
+ if (!ret)
+ {
+ DWORD dwAttr;
- dwAttr = SHFindAttrW(dest, FALSE);
- if (INVALID_FILE_ATTRIBUTES == dwAttr)
- {
@ -521,20 +518,6 @@ index 9358980..260b4c2 100644
- return ERROR_SUCCESS;
- }
- return GetLastError();
+ BOOL ret;
+
+ TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest));
+
+ ret = MoveFileExW(src, dest, MOVEFILE_REPLACE_EXISTING);
+
+ /* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
+ if (!ret)
+ ret = MoveFileW(src, dest);
+
+ if (!ret)
+ {
+ DWORD dwAttr;
+
+ dwAttr = SHFindAttrW(dest, FALSE);
+ if (INVALID_FILE_ATTRIBUTES == dwAttr)
+ {
@ -612,9 +595,12 @@ index 9358980..260b4c2 100644
{
- LPWSTR wPath;
- DWORD retCode;
-
+ LPWSTR wPath;
+ DWORD retCode;
- TRACE("(%s, %p)\n", debugstr_a(path), sec);
-
+ TRACE("(%s, %p)\n", debugstr_a(path), sec);
- retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
- if (!retCode)
- {
@ -622,11 +608,6 @@ index 9358980..260b4c2 100644
- heap_free(wPath);
- }
- return retCode;
+ LPWSTR wPath;
+ DWORD retCode;
+
+ TRACE("(%s, %p)\n", debugstr_a(path), sec);
+
+ retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
+ if (!retCode)
+ {
@ -637,100 +618,7 @@ index 9358980..260b4c2 100644
}
/*************************************************************************
@@ -728,49 +727,49 @@ int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES se
*/
int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
{
- int ret = ERROR_BAD_PATHNAME;
- TRACE("(%p, %s, %p)\n", hWnd, debugstr_w(path), sec);
-
- if (PathIsRelativeW(path))
- {
- SetLastError(ret);
- }
- else
- {
- ret = SHNotifyCreateDirectoryW(path, sec);
- /* Refuse to work on certain error codes before trying to create directories recursively */
- if (ret != ERROR_SUCCESS &&
- ret != ERROR_FILE_EXISTS &&
- ret != ERROR_ALREADY_EXISTS &&
- ret != ERROR_FILENAME_EXCED_RANGE)
- {
- WCHAR *pEnd, *pSlash, szTemp[MAX_PATH + 1]; /* extra for PathAddBackslash() */
-
- lstrcpynW(szTemp, path, MAX_PATH);
- pEnd = PathAddBackslashW(szTemp);
- pSlash = szTemp + 3;
-
- while (*pSlash)
- {
- while (*pSlash && *pSlash != '\\') pSlash++;
- if (*pSlash)
- {
- *pSlash = 0; /* terminate path at separator */
-
- ret = SHNotifyCreateDirectoryW(szTemp, pSlash + 1 == pEnd ? sec : NULL);
- }
- *pSlash++ = '\\'; /* put the separator back */
- }
- }
-
- if (ret && hWnd && (ERROR_CANCELLED != ret))
- {
- /* We failed and should show a dialog box */
- FIXME("Show system error message, creating path %s, failed with error %d\n", debugstr_w(path), ret);
- ret = ERROR_CANCELLED; /* Error has been already presented to user (not really yet!) */
- }
- }
- return ret;
+ int ret = ERROR_BAD_PATHNAME;
+ TRACE("(%p, %s, %p)\n", hWnd, debugstr_w(path), sec);
+
+ if (PathIsRelativeW(path))
+ {
+ SetLastError(ret);
+ }
+ else
+ {
+ ret = SHNotifyCreateDirectoryW(path, sec);
+ /* Refuse to work on certain error codes before trying to create directories recursively */
+ if (ret != ERROR_SUCCESS &&
+ ret != ERROR_FILE_EXISTS &&
+ ret != ERROR_ALREADY_EXISTS &&
+ ret != ERROR_FILENAME_EXCED_RANGE)
+ {
+ WCHAR *pEnd, *pSlash, szTemp[MAX_PATH + 1]; /* extra for PathAddBackslash() */
+
+ lstrcpynW(szTemp, path, MAX_PATH);
+ pEnd = PathAddBackslashW(szTemp);
+ pSlash = szTemp + 3;
+
+ while (*pSlash)
+ {
+ while (*pSlash && *pSlash != '\\') pSlash++;
+ if (*pSlash)
+ {
+ *pSlash = 0; /* terminate path at separator */
+
+ ret = SHNotifyCreateDirectoryW(szTemp, pSlash + 1 == pEnd ? sec : NULL);
+ }
+ *pSlash++ = '\\'; /* put the separator back */
+ }
+ }
+
+ if (ret && hWnd && (ERROR_CANCELLED != ret))
+ {
+ /* We failed and should show a dialog box */
+ FIXME("Show system error message, creating path %s, failed with error %d\n", debugstr_w(path), ret);
+ ret = ERROR_CANCELLED; /* Error has been already presented to user (not really yet!) */
+ }
+ }
+ return ret;
}
/*************************************************************************
@@ -790,25 +789,25 @@ int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES s
@@ -792,25 +791,25 @@ int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES s
*/
static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly)
{
@ -738,7 +626,11 @@ index 9358980..260b4c2 100644
- BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, wWildcardChars));
- DWORD dwAttr = INVALID_FILE_ATTRIBUTES;
- HANDLE hFind = FindFirstFileW(pName, &wfd);
-
+ WIN32_FIND_DATAW wfd;
+ BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, wWildcardChars));
+ DWORD dwAttr = INVALID_FILE_ATTRIBUTES;
+ HANDLE hFind = FindFirstFileW(pName, &wfd);
- TRACE("%s %d\n", debugstr_w(pName), fileOnly);
- if (INVALID_HANDLE_VALUE != hFind)
- {
@ -753,11 +645,6 @@ index 9358980..260b4c2 100644
- FindClose(hFind);
- }
- return dwAttr;
+ WIN32_FIND_DATAW wfd;
+ BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, wWildcardChars));
+ DWORD dwAttr = INVALID_FILE_ATTRIBUTES;
+ HANDLE hFind = FindFirstFileW(pName, &wfd);
+
+ TRACE("%s %d\n", debugstr_w(pName), fileOnly);
+ if (INVALID_HANDLE_VALUE != hFind)
+ {
@ -775,13 +662,15 @@ index 9358980..260b4c2 100644
}
/*************************************************************************
@@ -822,27 +821,27 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly)
@@ -824,27 +823,27 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly)
*/
static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
{
- DWORD size = 0, aSize = 0;
- LPCSTR aString = (LPCSTR)*pWToFrom;
-
+ DWORD size = 0, aSize = 0;
+ LPCSTR aString = (LPCSTR)*pWToFrom;
- if (aString)
- {
- do
@ -800,9 +689,6 @@ index 9358980..260b4c2 100644
- }
- }
- return size;
+ DWORD size = 0, aSize = 0;
+ LPCSTR aString = (LPCSTR)*pWToFrom;
+
+ if (aString)
+ {
+ do
@ -824,7 +710,7 @@ index 9358980..260b4c2 100644
}
/*************************************************************************
* SHFileOperationA [SHELL32.@]
@@ -862,46 +861,45 @@ static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
@@ -864,46 +863,45 @@ static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
*/
int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
{
@ -851,23 +737,6 @@ index 9358980..260b4c2 100644
- /* Windows 95/98 returns S_OK for this case. */
- if (retCode == ERROR_ACCESS_DENIED && (GetVersion() & 0x80000000))
- retCode = S_OK;
-
- heap_free(ForFree); /* we cannot use wString, it was changed */
- break;
- }
- else
- {
- wString = ForFree = heap_alloc(size * sizeof(WCHAR));
- if (ForFree) continue;
- retCode = ERROR_OUTOFMEMORY;
- nFileOp.fAnyOperationsAborted = TRUE;
- return retCode;
- }
- }
-
- lpFileOp->hNameMappings = nFileOp.hNameMappings;
- lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted;
- return retCode;
+ SHFILEOPSTRUCTW nFileOp = *((LPSHFILEOPSTRUCTW)lpFileOp);
+ int retCode = 0;
+ DWORD size;
@ -884,7 +753,19 @@ index 9358980..260b4c2 100644
+ size = SHNameTranslate(&wString, &nFileOp.lpszProgressTitle, FALSE); /* no loop */
+ size += SHNameTranslate(&wString, &nFileOp.pFrom, TRUE); /* internal loop */
+ size += SHNameTranslate(&wString, &nFileOp.pTo, TRUE); /* internal loop */
+
- heap_free(ForFree); /* we cannot use wString, it was changed */
- break;
- }
- else
- {
- wString = ForFree = heap_alloc(size * sizeof(WCHAR));
- if (ForFree) continue;
- retCode = ERROR_OUTOFMEMORY;
- nFileOp.fAnyOperationsAborted = TRUE;
- return retCode;
- }
- }
+ if (ForFree)
+ {
+ retCode = SHFileOperationW(&nFileOp);
@ -903,14 +784,17 @@ index 9358980..260b4c2 100644
+ return retCode;
+ }
+ }
+
- lpFileOp->hNameMappings = nFileOp.hNameMappings;
- lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted;
- return retCode;
+ lpFileOp->hNameMappings = nFileOp.hNameMappings;
+ lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted;
+ return retCode;
}
#define ERROR_SHELL_INTERNAL_FILE_NOT_FOUND 1026
@@ -931,7 +929,7 @@ typedef struct
@@ -933,7 +931,7 @@ typedef struct
static inline void grow_list(FILE_LIST *list)
{
FILE_ENTRY *new = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, list->feFiles,
@ -919,7 +803,7 @@ index 9358980..260b4c2 100644
list->feFiles = new;
list->num_alloc *= 2;
}
@@ -1024,7 +1022,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles)
@@ -1026,7 +1024,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles)
/* empty list */
if (!szFiles[0])
return ERROR_ACCESS_DENIED;
@ -928,7 +812,7 @@ index 9358980..260b4c2 100644
flList->feFiles = heap_alloc_zero(flList->num_alloc * sizeof(FILE_ENTRY));
while (*ptr)
@@ -1129,7 +1127,7 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
@@ -1131,7 +1129,7 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
/* Don't ask the user about overwriting files when he accepted to overwrite the
folder. FIXME: this is not exactly what Windows does - e.g. there would be
an additional confirmation for a nested folder */
@ -937,7 +821,7 @@ index 9358980..260b4c2 100644
SHFileOperationW(&fileOp);
}
@@ -1342,7 +1340,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
@@ -1344,7 +1342,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
/* Windows also checks only the first item */
bTrash = (lpFileOp->fFlags & FOF_ALLOWUNDO)
@ -946,7 +830,7 @@ index 9358980..260b4c2 100644
if (!(lpFileOp->fFlags & FOF_NOCONFIRMATION) || (!bTrash && lpFileOp->fFlags & FOF_WANTNUKEWARNING))
if (!confirm_delete_list(lpFileOp->hwnd, lpFileOp->fFlags, bTrash, flFrom))
@@ -1377,11 +1375,11 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
@@ -1379,11 +1377,11 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
break;
}
}
@ -960,7 +844,7 @@ index 9358980..260b4c2 100644
else
ret = SHELL_DeleteDirectoryW(lpFileOp->hwnd, fileEntry->szFullPath, FALSE);
@@ -1506,8 +1504,8 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
@@ -1508,8 +1506,8 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
static void check_flags(FILEOP_FLAGS fFlags)
{
WORD wUnsupportedFlags = FOF_NO_CONNECTED_ELEMENTS |
@ -971,7 +855,7 @@ index 9358980..260b4c2 100644
if (fFlags & wUnsupportedFlags)
FIXME("Unsupported flags: %04x\n", fFlags);
@@ -1590,19 +1588,19 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1592,19 +1590,19 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
*/
void WINAPI SHFreeNameMappings(HANDLE hNameMapping)
{
@ -1001,7 +885,7 @@ index 9358980..260b4c2 100644
}
/*************************************************************************
@@ -1708,14 +1706,14 @@ DWORD WINAPI SheChangeDirW(LPWSTR path)
@@ -1710,14 +1708,14 @@ DWORD WINAPI SheChangeDirW(LPWSTR path)
}
/*************************************************************************
@ -1022,5 +906,5 @@ index 9358980..260b4c2 100644
--
1.9.1
2.21.0

View File

@ -1,24 +1,26 @@
From 08846f560480d776a99cf5ef5bd9661e13fa5a68 Mon Sep 17 00:00:00 2001
From ad50a50937dc367abb6a0cb08cd88be2b293b75d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 14 Dec 2015 00:39:54 +0100
Subject: wusa: Implement basic installation logic.
---
programs/wusa/Makefile.in | 4 +-
programs/wusa/main.c | 1044 ++++++++++++++++++++++++++++++++++++++++++++-
programs/wusa/manifest.c | 704 ++++++++++++++++++++++++++++++
programs/wusa/wusa.h | 160 +++++++
4 files changed, 1906 insertions(+), 6 deletions(-)
programs/wusa/Makefile.in | 6 +-
programs/wusa/main.c | 1044 ++++++++++++++++++++++++++++++++++++-
programs/wusa/manifest.c | 704 +++++++++++++++++++++++++
programs/wusa/wusa.h | 160 ++++++
4 files changed, 1907 insertions(+), 7 deletions(-)
create mode 100644 programs/wusa/manifest.c
create mode 100644 programs/wusa/wusa.h
diff --git a/programs/wusa/Makefile.in b/programs/wusa/Makefile.in
index 5068456..dbf424c 100644
index 3042e86bf..67060d7b4 100644
--- a/programs/wusa/Makefile.in
+++ b/programs/wusa/Makefile.in
@@ -1,5 +1,7 @@
@@ -1,6 +1,8 @@
MODULE = wusa.exe
APPMODE = -mconsole -municode
-EXTRADLLFLAGS = -mconsole -municode -mno-cygwin
+EXTRADLLFLAGS = -mconsole -municode
+IMPORTS = cabinet shlwapi ole32 oleaut32 advapi32
C_SRCS = \
@ -26,7 +28,7 @@ index 5068456..dbf424c 100644
+ main.c \
+ manifest.c
diff --git a/programs/wusa/main.c b/programs/wusa/main.c
index aa7a38f..7c1dfef 100644
index aa7a38fe1..7c1dfef7a 100644
--- a/programs/wusa/main.c
+++ b/programs/wusa/main.c
@@ -1,5 +1,7 @@
@ -1095,7 +1097,7 @@ index aa7a38f..7c1dfef 100644
}
diff --git a/programs/wusa/manifest.c b/programs/wusa/manifest.c
new file mode 100644
index 0000000..fc1f65b
index 000000000..fc1f65b02
--- /dev/null
+++ b/programs/wusa/manifest.c
@@ -0,0 +1,704 @@
@ -1805,7 +1807,7 @@ index 0000000..fc1f65b
+}
diff --git a/programs/wusa/wusa.h b/programs/wusa/wusa.h
new file mode 100644
index 0000000..eada6d9
index 000000000..eada6d9b2
--- /dev/null
+++ b/programs/wusa/wusa.h
@@ -0,0 +1,160 @@
@ -1970,5 +1972,5 @@ index 0000000..eada6d9
+ return ret;
+}
--
2.6.4
2.21.0