You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
109 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c119ae9eeb | ||
|
476caa4a5f | ||
|
9982d2e0ee | ||
|
2b2bf8ac06 | ||
|
088524a29e | ||
|
31d525e567 | ||
|
7d26828643 | ||
|
3dc3c4e0e2 | ||
|
154875b4e9 | ||
|
66148cb9b2 | ||
|
cfbf5f7b86 | ||
|
6f1b2ab35a | ||
|
550e67b8a2 | ||
|
e45211698d | ||
|
6be0dfd008 | ||
|
0121326c5a | ||
|
4912f27424 | ||
|
7a69c317fc | ||
|
c9b23fb803 | ||
|
c214f34a3d | ||
|
08623c69c9 | ||
|
6fb7d85916 | ||
|
178c0f6d74 | ||
|
735aa272dc | ||
|
ce62e30ee2 | ||
|
f828952b4b | ||
|
4e9b9940d2 | ||
|
3fe5e9d97b | ||
|
d792ec8a45 | ||
|
c30bad1531 | ||
|
7d49250016 | ||
|
52ea1ee7af | ||
|
bfff924f04 | ||
|
c45c01449e | ||
|
e6e67f2aab | ||
|
0a0998b398 | ||
|
d373c19f75 | ||
|
e871a1020b | ||
|
a56cf4623e | ||
|
fc28dc3e4c | ||
|
ff24c240c5 | ||
|
c6466b849b | ||
|
ad768e05ba | ||
|
c90f89fe90 | ||
|
2fdb980d1a | ||
|
bd5aed0c57 | ||
|
c6956ccbda | ||
|
e89028830e | ||
|
f215d139b4 | ||
|
d4deb4faac | ||
|
b8e292a69c | ||
|
3e1acbd286 | ||
|
73c60b9896 | ||
|
9d04d98ec8 | ||
|
3e32c05e8f | ||
|
461bcc1e5f | ||
|
9bf2a46f26 | ||
|
50917334e1 | ||
|
dffcd7e6d6 | ||
|
efd52500f7 | ||
|
2d29324070 | ||
|
84f6fd6c09 | ||
|
a1b38470f1 | ||
|
cc4e783b69 | ||
|
566cd55d62 | ||
|
b4524898d6 | ||
|
31e20daca3 | ||
|
e4a3b5fc9d | ||
|
ec85f08e87 | ||
|
ac5710e76d | ||
|
a423a7087f | ||
|
6fc555874b | ||
|
b874b3656e | ||
|
5a85ab07af | ||
|
4971d171bb | ||
|
4f57895f06 | ||
|
eb630f686f | ||
|
2802df41dc | ||
|
f3f4f80a01 | ||
|
8710aa32b4 | ||
|
f15b462860 | ||
|
616bf11236 | ||
|
20f1d05973 | ||
|
8519a9eaf6 | ||
|
803ed475af | ||
|
f5d03d51d3 | ||
|
3d981b8d47 | ||
|
a804fed0f7 | ||
|
ad4de04511 | ||
|
a83917b70e | ||
|
f4a4f3f5b7 | ||
|
30dca36aeb | ||
|
9556a78ab9 | ||
|
b56e74f39d | ||
|
652a39caf1 | ||
|
6bb65ccf88 | ||
|
4beed4a313 | ||
|
5a2c1ea66d | ||
|
8dced4d4ac | ||
|
15e36c54fc | ||
|
2de179532e | ||
|
f17ad5a016 | ||
|
faf8498490 | ||
|
9d20573c6e | ||
|
be75db4704 | ||
|
20a4649b84 | ||
|
1b1af92c85 | ||
|
5cf1692e74 | ||
|
9146bbc3d4 |
@@ -22,7 +22,7 @@ parallel. If this is the case for your distribution, you will have to type
|
||||
`/opt/wine-staging/bin/wine` instead of just `wine`. The same also applies for
|
||||
other wine-specific programs like `winecfg`. To learn more about how to use
|
||||
Wine Staging, please take a look at the
|
||||
[usage instructions](https://github.com/wine-compholio/wine-staging/wiki/Usage).
|
||||
[usage instructions](https://wiki.winehq.org/Wine-Staging_Usage).
|
||||
|
||||
Building
|
||||
--------
|
||||
@@ -73,7 +73,7 @@ Before you proceed with the compilation, please make sure that you installed all
|
||||
additional build dependencies required for the Wine Staging features you are
|
||||
interested in (check output of `./configure`). More information about building
|
||||
Wine Staging, optional build dependencies, and hints for packagers are collected
|
||||
in our [Wiki](https://github.com/wine-compholio/wine-staging/wiki/Packaging).
|
||||
in our [Wiki](https://wiki.winehq.org/Wine-Staging).
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
@@ -0,0 +1,61 @@
|
||||
From fc5c0462f64e0976d596bd726da4d7f0e4857384 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 19 Sep 2018 09:03:19 +1000
|
||||
Subject: [PATCH] windowscodecs: Avoid implicit cast of interface pointer.
|
||||
|
||||
---
|
||||
dlls/windowscodecs/info.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c
|
||||
index 0a86266..8c81574 100644
|
||||
--- a/dlls/windowscodecs/info.c
|
||||
+++ b/dlls/windowscodecs/info.c
|
||||
@@ -222,7 +222,7 @@ typedef struct {
|
||||
|
||||
static inline BitmapDecoderInfo *impl_from_IWICBitmapDecoderInfo(IWICBitmapDecoderInfo *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, BitmapDecoderInfo, base.IWICComponentInfo_iface);
|
||||
+ return CONTAINING_RECORD((IWICComponentInfo*)iface, BitmapDecoderInfo, base.IWICComponentInfo_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BitmapDecoderInfo_QueryInterface(IWICBitmapDecoderInfo *iface, REFIID iid,
|
||||
@@ -713,7 +713,7 @@ typedef struct {
|
||||
|
||||
static inline BitmapEncoderInfo *impl_from_IWICBitmapEncoderInfo(IWICBitmapEncoderInfo *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, BitmapEncoderInfo, base.IWICComponentInfo_iface);
|
||||
+ return CONTAINING_RECORD((IWICComponentInfo*)iface, BitmapEncoderInfo, base.IWICComponentInfo_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BitmapEncoderInfo_QueryInterface(IWICBitmapEncoderInfo *iface, REFIID iid,
|
||||
@@ -1005,7 +1005,7 @@ typedef struct {
|
||||
|
||||
static inline FormatConverterInfo *impl_from_IWICFormatConverterInfo(IWICFormatConverterInfo *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, FormatConverterInfo, base.IWICComponentInfo_iface);
|
||||
+ return CONTAINING_RECORD((IWICComponentInfo*)iface, FormatConverterInfo, base.IWICComponentInfo_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI FormatConverterInfo_QueryInterface(IWICFormatConverterInfo *iface, REFIID iid,
|
||||
@@ -1219,7 +1219,7 @@ typedef struct {
|
||||
|
||||
static inline PixelFormatInfo *impl_from_IWICPixelFormatInfo2(IWICPixelFormatInfo2 *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, PixelFormatInfo, base.IWICComponentInfo_iface);
|
||||
+ return CONTAINING_RECORD((IWICComponentInfo*)iface, PixelFormatInfo, base.IWICComponentInfo_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI PixelFormatInfo_QueryInterface(IWICPixelFormatInfo2 *iface, REFIID iid,
|
||||
@@ -1531,7 +1531,7 @@ static struct metadata_container *get_metadata_container(MetadataReaderInfo *inf
|
||||
|
||||
static inline MetadataReaderInfo *impl_from_IWICMetadataReaderInfo(IWICMetadataReaderInfo *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, MetadataReaderInfo, base.IWICComponentInfo_iface);
|
||||
+ return CONTAINING_RECORD((IWICComponentInfo*)iface, MetadataReaderInfo, base.IWICComponentInfo_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MetadataReaderInfo_QueryInterface(IWICMetadataReaderInfo *iface,
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1,15 +1,31 @@
|
||||
From e8bc998c7b00a18a724f6cfd2823aefcd8b1b15c Mon Sep 17 00:00:00 2001
|
||||
From 2aeb3a9e57142c3f4ff86cb81b206bdbc146552d Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 21:54:26 +0100
|
||||
Subject: d2d1: Avoid implicit cast of interface pointer.
|
||||
Subject: [PATCH] d2d1: Avoid implicit cast of interface pointer.
|
||||
|
||||
---
|
||||
dlls/d2d1/brush.c | 8 ++++----
|
||||
dlls/d2d1/geometry.c | 6 +++---
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
dlls/d2d1/bitmap.c | 2 +-
|
||||
dlls/d2d1/brush.c | 8 ++++----
|
||||
dlls/d2d1/dc_render_target.c | 2 +-
|
||||
dlls/d2d1/device.c | 2 +-
|
||||
dlls/d2d1/geometry.c | 6 +++---
|
||||
dlls/d2d1/hwnd_render_target.c | 2 +-
|
||||
dlls/d2d1/state_block.c | 2 +-
|
||||
7 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/d2d1/bitmap.c b/dlls/d2d1/bitmap.c
|
||||
index c0aef3c..8a4b517 100644
|
||||
--- a/dlls/d2d1/bitmap.c
|
||||
+++ b/dlls/d2d1/bitmap.c
|
||||
@@ -626,5 +626,5 @@ struct d2d_bitmap *unsafe_impl_from_ID2D1Bitmap(ID2D1Bitmap *iface)
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (ID2D1BitmapVtbl *)&d2d_bitmap_vtbl);
|
||||
- return CONTAINING_RECORD(iface, struct d2d_bitmap, ID2D1Bitmap1_iface);
|
||||
+ return CONTAINING_RECORD((ID2D1Bitmap1*)iface, struct d2d_bitmap, ID2D1Bitmap1_iface);
|
||||
}
|
||||
diff --git a/dlls/d2d1/brush.c b/dlls/d2d1/brush.c
|
||||
index b03af89..319a188 100644
|
||||
index 9c73ae1..a748669 100644
|
||||
--- a/dlls/d2d1/brush.c
|
||||
+++ b/dlls/d2d1/brush.c
|
||||
@@ -256,7 +256,7 @@ static void d2d_brush_init(struct d2d_brush *brush, ID2D1Factory *factory,
|
||||
@@ -48,8 +64,34 @@ index b03af89..319a188 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_bitmap_brush_QueryInterface(ID2D1BitmapBrush1 *iface,
|
||||
diff --git a/dlls/d2d1/dc_render_target.c b/dlls/d2d1/dc_render_target.c
|
||||
index b095008..6030826 100644
|
||||
--- a/dlls/d2d1/dc_render_target.c
|
||||
+++ b/dlls/d2d1/dc_render_target.c
|
||||
@@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d);
|
||||
|
||||
static inline struct d2d_dc_render_target *impl_from_IUnknown(IUnknown *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, struct d2d_dc_render_target, ID2D1DCRenderTarget_iface);
|
||||
+ return CONTAINING_RECORD((ID2D1DCRenderTarget*)iface, struct d2d_dc_render_target, ID2D1DCRenderTarget_iface);
|
||||
}
|
||||
|
||||
static HRESULT d2d_dc_render_target_present(IUnknown *outer_unknown)
|
||||
diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c
|
||||
index 45b2258..bf32c23 100644
|
||||
--- a/dlls/d2d1/device.c
|
||||
+++ b/dlls/d2d1/device.c
|
||||
@@ -207,7 +207,7 @@ static inline struct d2d_device_context *impl_from_ID2D1DeviceContext(ID2D1Devic
|
||||
|
||||
static inline struct d2d_device_context *impl_from_ID2D1RenderTarget(ID2D1RenderTarget *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, struct d2d_device_context, ID2D1DeviceContext_iface);
|
||||
+ return CONTAINING_RECORD((ID2D1DeviceContext*)iface, struct d2d_device_context, ID2D1DeviceContext_iface);
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_device_context_inner_QueryInterface(IUnknown *iface, REFIID iid, void **out)
|
||||
diff --git a/dlls/d2d1/geometry.c b/dlls/d2d1/geometry.c
|
||||
index d716fb1..18d8deb 100644
|
||||
index 421ba2b..f8db51c 100644
|
||||
--- a/dlls/d2d1/geometry.c
|
||||
+++ b/dlls/d2d1/geometry.c
|
||||
@@ -2987,7 +2987,7 @@ static const struct ID2D1GeometrySinkVtbl d2d_geometry_sink_vtbl =
|
||||
@@ -70,7 +112,7 @@ index d716fb1..18d8deb 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_rectangle_geometry_QueryInterface(ID2D1RectangleGeometry *iface,
|
||||
@@ -3839,7 +3839,7 @@ fail:
|
||||
@@ -3838,7 +3838,7 @@ fail:
|
||||
|
||||
static inline struct d2d_geometry *impl_from_ID2D1TransformedGeometry(ID2D1TransformedGeometry *iface)
|
||||
{
|
||||
@@ -79,6 +121,30 @@ index d716fb1..18d8deb 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_transformed_geometry_QueryInterface(ID2D1TransformedGeometry *iface,
|
||||
diff --git a/dlls/d2d1/hwnd_render_target.c b/dlls/d2d1/hwnd_render_target.c
|
||||
index d0b9695..429561e 100644
|
||||
--- a/dlls/d2d1/hwnd_render_target.c
|
||||
+++ b/dlls/d2d1/hwnd_render_target.c
|
||||
@@ -26,7 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d);
|
||||
|
||||
static inline struct d2d_hwnd_render_target *impl_from_IUnknown(IUnknown *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, struct d2d_hwnd_render_target, ID2D1HwndRenderTarget_iface);
|
||||
+ return CONTAINING_RECORD((ID2D1HwndRenderTarget*)iface, struct d2d_hwnd_render_target, ID2D1HwndRenderTarget_iface);
|
||||
}
|
||||
|
||||
static HRESULT d2d_hwnd_render_target_present(IUnknown *outer_unknown)
|
||||
diff --git a/dlls/d2d1/state_block.c b/dlls/d2d1/state_block.c
|
||||
index b15384e..4e7e34b 100644
|
||||
--- a/dlls/d2d1/state_block.c
|
||||
+++ b/dlls/d2d1/state_block.c
|
||||
@@ -190,5 +190,5 @@ struct d2d_state_block *unsafe_impl_from_ID2D1DrawingStateBlock(ID2D1DrawingStat
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (ID2D1DrawingStateBlockVtbl *)&d2d_state_block_vtbl);
|
||||
- return CONTAINING_RECORD(iface, struct d2d_state_block, ID2D1DrawingStateBlock1_iface);
|
||||
+ return CONTAINING_RECORD((ID2D1DrawingStateBlock1*)iface, struct d2d_state_block, ID2D1DrawingStateBlock1_iface);
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,21 +0,0 @@
|
||||
#
|
||||
# This file is deprecated and will be deleted in the future.
|
||||
# Please use patchinstall.sh instead, to apply the Wine Staging patches.
|
||||
#
|
||||
|
||||
CURDIR ?= ${.CURDIR}
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
@echo "WARNING: Using this Makefile is deprecated!" >&2
|
||||
"$(CURDIR)/patchinstall.sh" DESTDIR="$(DESTDIR)" --all
|
||||
|
||||
.PHONY: install-git
|
||||
install-git:
|
||||
@echo "WARNING: Using this Makefile is deprecated!" >&2
|
||||
"$(CURDIR)/patchinstall.sh" DESTDIR="$(DESTDIR)" --all --backend=git-am
|
||||
|
||||
.PHONY: series
|
||||
series:
|
||||
@echo "ERROR: Using this Makefile is deprecated!" >&2
|
||||
@false
|
@@ -1,25 +1,25 @@
|
||||
From 2e1a505fedd43f0f03ba36e1a8413bf04f8afa83 Mon Sep 17 00:00:00 2001
|
||||
From 05ca39b029f8f710ca53aeafc36384fd39fd6b89 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:53:46 +0200
|
||||
Subject: winelib: Append '(Staging)' at the end of the version string.
|
||||
Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string.
|
||||
|
||||
---
|
||||
libs/wine/Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in
|
||||
index 1b7fea8..780be10 100644
|
||||
index 4833eb5..3cfa4f4 100644
|
||||
--- a/libs/wine/Makefile.in
|
||||
+++ b/libs/wine/Makefile.in
|
||||
@@ -112,7 +112,7 @@ libwine_LDFLAGS = $(LIBWINE_LDFLAGS)
|
||||
@@ -31,7 +31,7 @@ libwine_LDFLAGS = $(LIBWINE_LDFLAGS)
|
||||
libwine_DEPS = $(LIBWINE_DEPENDS)
|
||||
|
||||
version.c: dummy
|
||||
- version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1)
|
||||
+ version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1 (Staging)";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1)
|
||||
- version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || (rm -f $@ && exit 1)
|
||||
+ version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1 (Staging)";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || (rm -f $@ && exit 1)
|
||||
|
||||
dummy:
|
||||
.PHONY: dummy
|
||||
--
|
||||
2.6.2
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,28 +1,23 @@
|
||||
From b4a2543264f9eb91fc259a81dea872eee3c14aba Mon Sep 17 00:00:00 2001
|
||||
From 07ca5e888c3265c57c88ef1758e6c47fbea4fb07 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 27 Jun 2015 19:28:51 +0200
|
||||
Subject: loader: Print library paths for --check-libs on Mac OS X.
|
||||
|
||||
---
|
||||
loader/main.c | 27 ++++++++++++++++++++++++++-
|
||||
1 file changed, 26 insertions(+), 1 deletion(-)
|
||||
loader/main.c | 30 +++++++++++++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index 44804e1..4d9126e 100644
|
||||
index a2dc40c51c..1642fb0965 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "main.h"
|
||||
@@ -50,6 +50,30 @@
|
||||
/* the preloader will set this variable */
|
||||
const struct wine_preload_info *wine_main_preload_info = NULL;
|
||||
|
||||
#ifdef __APPLE__
|
||||
+#ifdef __APPLE__
|
||||
+#include <mach-o/dyld.h>
|
||||
|
||||
#ifndef __clang__
|
||||
__asm__(".zerofill WINE_DOS, WINE_DOS, ___wine_dos, 0x40000000");
|
||||
@@ -73,6 +74,26 @@ static inline void reserve_area( void *addr, size_t size )
|
||||
wine_mmap_add_reserved_area( addr, size );
|
||||
}
|
||||
|
||||
+
|
||||
+static const char *get_macho_library_path( const char *libname )
|
||||
+{
|
||||
+ unsigned int path_len, libname_len = strlen( libname );
|
||||
@@ -30,7 +25,7 @@ index 44804e1..4d9126e 100644
|
||||
+
|
||||
+ for (i = 0; i < count; i++)
|
||||
+ {
|
||||
+ const char *path = _dyld_get_image_name( i );
|
||||
+ const char *path = _dyld_get_image_name( i );
|
||||
+ if (!path) continue;
|
||||
+
|
||||
+ path_len = strlen( path );
|
||||
@@ -42,11 +37,12 @@ index 44804e1..4d9126e 100644
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#else /* __APPLE__ */
|
||||
|
||||
/* the preloader will set this variable */
|
||||
@@ -181,7 +202,11 @@ static void check_command_line( int argc, char *argv[] )
|
||||
/***********************************************************************
|
||||
* check_command_line
|
||||
*
|
||||
@@ -146,7 +170,11 @@ static void check_command_line( int argc, char *argv[] )
|
||||
else
|
||||
#endif
|
||||
{
|
||||
@@ -60,5 +56,5 @@ index 44804e1..4d9126e 100644
|
||||
wine_dlclose( lib_handle, NULL, 0 );
|
||||
}
|
||||
--
|
||||
2.4.3
|
||||
2.14.1
|
||||
|
||||
|
@@ -0,0 +1,125 @@
|
||||
From 2b29014573fcb38388dd82e33fa16f67b1a43a8c Mon Sep 17 00:00:00 2001
|
||||
From: Austin English <austinenglish@gmail.com>
|
||||
Date: Sun, 23 Oct 2016 16:15:45 -0500
|
||||
Subject: [PATCH] advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41591
|
||||
Signed-off-by: Austin English <austinenglish@gmail.com>
|
||||
---
|
||||
dlls/advapi32/advapi32.spec | 4 ++--
|
||||
dlls/advapi32/registry.c | 24 ++++++++++++++++++++++
|
||||
.../api-ms-win-core-registry-l1-1-0.spec | 4 ++--
|
||||
.../api-ms-win-downlevel-advapi32-l1-1-0.spec | 4 ++--
|
||||
dlls/kernelbase/kernelbase.spec | 4 ++--
|
||||
include/winreg.h | 3 +++
|
||||
6 files changed, 35 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
|
||||
index e870a5d..042a523 100644
|
||||
--- a/dlls/advapi32/advapi32.spec
|
||||
+++ b/dlls/advapi32/advapi32.spec
|
||||
@@ -648,8 +648,8 @@
|
||||
@ stdcall RegGetKeySecurity(long long ptr ptr)
|
||||
@ stdcall RegGetValueA(long str str long ptr ptr ptr)
|
||||
@ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr)
|
||||
-# @ stub RegLoadAppKeyA
|
||||
-# @ stub RegLoadAppKeyW
|
||||
+@ stdcall RegLoadAppKeyA(str ptr long long long)
|
||||
+@ stdcall RegLoadAppKeyW(wstr ptr long long long)
|
||||
@ stdcall RegLoadKeyA(long str str)
|
||||
@ stdcall RegLoadKeyW(long wstr wstr)
|
||||
@ stdcall RegLoadMUIStringA(long str str long ptr long str)
|
||||
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
|
||||
index 3018372..55df6de 100644
|
||||
--- a/dlls/advapi32/registry.c
|
||||
+++ b/dlls/advapi32/registry.c
|
||||
@@ -3513,3 +3513,27 @@ LONG WINAPI RegDisableReflectionKey(HKEY base)
|
||||
FIXME("%p: stub\n", base);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
+
|
||||
+/******************************************************************************
|
||||
+ * RegLoadAppKeyA [ADVAPI32.@]
|
||||
+ *
|
||||
+ */
|
||||
+LSTATUS WINAPI RegLoadAppKeyA(const char *file, HKEY *result, REGSAM sam, DWORD options, DWORD reserved)
|
||||
+{
|
||||
+ FIXME("%s %p %u %u %u: stub\n", wine_dbgstr_a(file), result, sam, options, reserved);
|
||||
+
|
||||
+ *result = (HKEY)0xbeefcafe;
|
||||
+ return ERROR_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+/******************************************************************************
|
||||
+ * RegLoadAppKeyW [ADVAPI32.@]
|
||||
+ *
|
||||
+ */
|
||||
+LSTATUS WINAPI RegLoadAppKeyW(const WCHAR *file, HKEY *result, REGSAM sam, DWORD options, DWORD reserved)
|
||||
+{
|
||||
+ FIXME("%s %p %u %u %u: stub\n", wine_dbgstr_w(file), result, sam, options, reserved);
|
||||
+
|
||||
+ *result = (HKEY)0xbeefcafe;
|
||||
+ return ERROR_SUCCESS;
|
||||
+}
|
||||
diff --git a/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec b/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
|
||||
index 7a48e3b..f81f027 100644
|
||||
--- a/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
|
||||
@@ -17,8 +17,8 @@
|
||||
@ stdcall RegGetKeySecurity(long long ptr ptr) advapi32.RegGetKeySecurity
|
||||
@ stdcall RegGetValueA(long str str long ptr ptr ptr) advapi32.RegGetValueA
|
||||
@ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr) advapi32.RegGetValueW
|
||||
-@ stub RegLoadAppKeyA
|
||||
-@ stub RegLoadAppKeyW
|
||||
+@ stdcall RegLoadAppKeyA(str ptr long long long) advapi32.RegLoadAppKeyA
|
||||
+@ stdcall RegLoadAppKeyW(wstr ptr long long long) advapi32.RegLoadAppKeyW
|
||||
@ stdcall RegLoadKeyA(long str str) advapi32.RegLoadKeyA
|
||||
@ stdcall RegLoadKeyW(long wstr wstr) advapi32.RegLoadKeyW
|
||||
@ stdcall RegLoadMUIStringA(long str str long ptr long str) advapi32.RegLoadMUIStringA
|
||||
diff --git a/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec b/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
|
||||
index 5bdad41..b2dcc17 100644
|
||||
--- a/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
|
||||
@@ -102,8 +102,8 @@
|
||||
@ stdcall RegGetKeySecurity(long long ptr ptr) advapi32.RegGetKeySecurity
|
||||
@ stdcall RegGetValueA(long str str long ptr ptr ptr) advapi32.RegGetValueA
|
||||
@ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr) advapi32.RegGetValueW
|
||||
-@ stub RegLoadAppKeyA
|
||||
-@ stub RegLoadAppKeyW
|
||||
+@ stdcall RegLoadAppKeyA(str ptr long long long) advapi32.RegLoadAppKeyA
|
||||
+@ stdcall RegLoadAppKeyW(wstr ptr long long long) advapi32.RegLoadAppKeyW
|
||||
@ stdcall RegLoadKeyA(long str str) advapi32.RegLoadKeyA
|
||||
@ stdcall RegLoadKeyW(long wstr wstr) advapi32.RegLoadKeyW
|
||||
@ stdcall RegLoadMUIStringA(long str str long ptr long str) advapi32.RegLoadMUIStringA
|
||||
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
|
||||
index 286dae0..c114622 100644
|
||||
--- a/dlls/kernelbase/kernelbase.spec
|
||||
+++ b/dlls/kernelbase/kernelbase.spec
|
||||
@@ -1288,8 +1288,8 @@
|
||||
# @ stub RegKrnResetAppKeyLoaded
|
||||
# @ stub RegKrnSetDllHasThreadStateGlobal
|
||||
# @ stub RegKrnSetTermsrvRegistryExtensionFlags
|
||||
-# @ stub RegLoadAppKeyA
|
||||
-# @ stub RegLoadAppKeyW
|
||||
+@ stdcall RegLoadAppKeyA(str ptr long long long) advapi32.RegLoadAppKeyA
|
||||
+@ stdcall RegLoadAppKeyW(wstr ptr long long long) advapi32.RegLoadAppKeyW
|
||||
@ stdcall -private RegLoadKeyA(long str str) kernel32.RegLoadKeyA
|
||||
@ stdcall -private RegLoadKeyW(long wstr wstr) kernel32.RegLoadKeyW
|
||||
@ stdcall -private RegLoadMUIStringA(long str str long ptr long str) kernel32.RegLoadMUIStringA
|
||||
diff --git a/include/winreg.h b/include/winreg.h
|
||||
index 51e9f02..5656eec 100644
|
||||
--- a/include/winreg.h
|
||||
+++ b/include/winreg.h
|
||||
@@ -133,6 +133,9 @@ WINADVAPI LSTATUS WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY
|
||||
WINADVAPI LSTATUS WINAPI RegGetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD);
|
||||
WINADVAPI LSTATUS WINAPI RegGetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPDWORD,PVOID,LPDWORD);
|
||||
#define RegGetValue WINELIB_NAME_AW(RegGetValue)
|
||||
+WINADVAPI LSTATUS WINAPI RegLoadAppKeyA(const char*,HKEY*,REGSAM,DWORD,DWORD);
|
||||
+WINADVAPI LSTATUS WINAPI RegLoadAppKeyW(const WCHAR*,HKEY*,REGSAM,DWORD,DWORD);
|
||||
+#define RegLoadAppKey WINELIB_NAME_AW(RegLoadAppKey)
|
||||
WINADVAPI LSTATUS WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
|
||||
WINADVAPI LSTATUS WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
|
||||
#define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
|
||||
--
|
||||
1.9.1
|
||||
|
1
patches/advapi32-RegLoadAppKey/definition
Normal file
1
patches/advapi32-RegLoadAppKey/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [41591] advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs
|
@@ -1,7 +1,7 @@
|
||||
From 4b428e09733605affb987d369f56ec09d2525858 Mon Sep 17 00:00:00 2001
|
||||
From c8dc0ec6406e8449b59c219ede2e9bd88d8a56fa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 00:26:03 +0200
|
||||
Subject: server: Implement token elevation information.
|
||||
Subject: [PATCH] server: Implement token elevation information.
|
||||
|
||||
---
|
||||
dlls/ntdll/nt.c | 16 ++++++++++++----
|
||||
@@ -10,10 +10,10 @@ Subject: server: Implement token elevation information.
|
||||
3 files changed, 39 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index 5822dec9b15..dda6cabe1cf 100644
|
||||
index cd271fde9c..b1dd999cf5 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -597,18 +597,26 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
@@ -625,18 +625,26 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
SERVER_END_REQ;
|
||||
break;
|
||||
case TokenElevationType:
|
||||
@@ -45,10 +45,10 @@ index 5822dec9b15..dda6cabe1cf 100644
|
||||
case TokenSessionId:
|
||||
{
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index b3dce66eb9c..33f1d5f0ab8 100644
|
||||
index 90af9df7f4..93afaabca1 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3673,6 +3673,14 @@ struct handle_info
|
||||
@@ -3643,6 +3643,14 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@@ -64,10 +64,10 @@ index b3dce66eb9c..33f1d5f0ab8 100644
|
||||
@REQ(create_completion)
|
||||
unsigned int access; /* desired access to a port */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 7ab0f634c05..6a1085bae12 100644
|
||||
index 6d193603b4..64f20e1b57 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -126,6 +126,7 @@ struct token
|
||||
@@ -112,6 +112,7 @@ struct token
|
||||
ACL *default_dacl; /* the default DACL to assign to objects created by this user */
|
||||
TOKEN_SOURCE source; /* source of the token */
|
||||
int impersonation_level; /* impersonation level this token is capable of if non-primary token */
|
||||
@@ -75,7 +75,7 @@ index 7ab0f634c05..6a1085bae12 100644
|
||||
};
|
||||
|
||||
struct privilege
|
||||
@@ -566,7 +567,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -545,7 +546,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
const LUID_AND_ATTRIBUTES *privs, unsigned int priv_count,
|
||||
const ACL *default_dacl, TOKEN_SOURCE source,
|
||||
const luid_t *modified_id,
|
||||
@@ -84,7 +84,7 @@ index 7ab0f634c05..6a1085bae12 100644
|
||||
{
|
||||
struct token *token = alloc_object( &token_ops );
|
||||
if (token)
|
||||
@@ -588,6 +589,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -567,6 +568,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
token->impersonation_level = impersonation_level;
|
||||
token->default_dacl = NULL;
|
||||
token->primary_group = NULL;
|
||||
@@ -92,7 +92,7 @@ index 7ab0f634c05..6a1085bae12 100644
|
||||
|
||||
/* copy user */
|
||||
token->user = memdup( user, security_sid_len( user ));
|
||||
@@ -700,7 +702,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
@@ -682,7 +684,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
token = create_token( primary, src_token->user, NULL, 0,
|
||||
NULL, 0, src_token->default_dacl,
|
||||
src_token->source, modified_id,
|
||||
@@ -102,16 +102,16 @@ index 7ab0f634c05..6a1085bae12 100644
|
||||
if (!token) return token;
|
||||
|
||||
/* copy groups */
|
||||
@@ -904,7 +907,7 @@ struct token *token_create_admin( void )
|
||||
@@ -888,7 +891,7 @@ struct token *token_create_admin( void )
|
||||
static const TOKEN_SOURCE admin_source = {"SeMgr", {0, 0}};
|
||||
token = create_token( TRUE, user_sid, admin_groups, sizeof(admin_groups)/sizeof(admin_groups[0]),
|
||||
admin_privs, sizeof(admin_privs)/sizeof(admin_privs[0]), default_dacl,
|
||||
token = create_token( TRUE, user_sid, admin_groups, ARRAY_SIZE( admin_groups ),
|
||||
admin_privs, ARRAY_SIZE( admin_privs ), default_dacl,
|
||||
- admin_source, NULL, -1 );
|
||||
+ admin_source, NULL, -1, TokenElevationTypeFull );
|
||||
/* we really need a primary group */
|
||||
assert( token->primary_group );
|
||||
}
|
||||
@@ -1652,6 +1655,19 @@ DECL_HANDLER(get_token_statistics)
|
||||
@@ -1627,6 +1630,19 @@ DECL_HANDLER(get_token_statistics)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,5 +132,5 @@ index 7ab0f634c05..6a1085bae12 100644
|
||||
{
|
||||
struct token *token;
|
||||
--
|
||||
2.13.1
|
||||
2.19.1
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 971789f2af6149998e54382522569b3790309cf2 Mon Sep 17 00:00:00 2001
|
||||
From ae503e8e7eb8f4fcb9bf3e642458c2a1bba6ccaa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 7 Aug 2017 02:28:35 +0200
|
||||
Subject: [PATCH] server: Implement token integrity level.
|
||||
@@ -10,19 +10,19 @@ Subject: [PATCH] server: Implement token integrity level.
|
||||
3 files changed, 48 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index 9e60196..59c6e49 100644
|
||||
index ca26ab15..8aab0a48 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -340,7 +340,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
@@ -400,7 +400,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
0, /* TokenAccessInformation */
|
||||
0, /* TokenVirtualizationAllowed */
|
||||
0, /* TokenVirtualizationEnabled */
|
||||
sizeof(DWORD), /* TokenVirtualizationEnabled */
|
||||
- sizeof(TOKEN_MANDATORY_LABEL) + sizeof(SID), /* TokenIntegrityLevel [sizeof(SID) includes one SubAuthority] */
|
||||
+ 0, /* TokenIntegrityLevel */
|
||||
0, /* TokenUIAccess */
|
||||
0, /* TokenMandatoryPolicy */
|
||||
0, /* TokenLogonSid */
|
||||
@@ -593,18 +593,23 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
@@ -659,18 +659,23 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
}
|
||||
break;
|
||||
case TokenIntegrityLevel:
|
||||
@@ -55,10 +55,10 @@ index 9e60196..59c6e49 100644
|
||||
case TokenAppContainerSid:
|
||||
{
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index c961eaf..0bb04cd 100644
|
||||
index 11221d7d..1bfe3234 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3388,6 +3388,13 @@ enum caret_state
|
||||
@@ -3405,6 +3405,13 @@ enum caret_state
|
||||
VARARG(sid,SID); /* the sid specified by which_sid from the token */
|
||||
@END
|
||||
|
||||
@@ -73,10 +73,10 @@ index c961eaf..0bb04cd 100644
|
||||
obj_handle_t handle; /* handle to the token */
|
||||
@REPLY
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 355a523..1ed994a 100644
|
||||
index ccde0c2d..2d81118a 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -112,6 +112,7 @@ struct token
|
||||
@@ -113,6 +113,7 @@ struct token
|
||||
TOKEN_SOURCE source; /* source of the token */
|
||||
int impersonation_level; /* impersonation level this token is capable of if non-primary token */
|
||||
TOKEN_ELEVATION_TYPE elevation; /* elevation level */
|
||||
@@ -84,7 +84,7 @@ index 355a523..1ed994a 100644
|
||||
};
|
||||
|
||||
struct privilege
|
||||
@@ -544,7 +545,8 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -546,7 +547,8 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
const LUID_AND_ATTRIBUTES *privs, unsigned int priv_count,
|
||||
const ACL *default_dacl, TOKEN_SOURCE source,
|
||||
const luid_t *modified_id,
|
||||
@@ -94,7 +94,7 @@ index 355a523..1ed994a 100644
|
||||
{
|
||||
struct token *token = alloc_object( &token_ops );
|
||||
if (token)
|
||||
@@ -625,6 +627,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -630,6 +632,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
}
|
||||
|
||||
token->source = source;
|
||||
@@ -102,7 +102,7 @@ index 355a523..1ed994a 100644
|
||||
}
|
||||
return token;
|
||||
}
|
||||
@@ -680,7 +683,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
@@ -685,7 +688,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
NULL, 0, src_token->default_dacl,
|
||||
src_token->source, modified_id,
|
||||
impersonation_level,
|
||||
@@ -112,16 +112,16 @@ index 355a523..1ed994a 100644
|
||||
if (!token) return token;
|
||||
|
||||
/* copy groups */
|
||||
@@ -884,7 +888,7 @@ struct token *token_create_admin( void )
|
||||
@@ -890,7 +894,7 @@ struct token *token_create_admin( void )
|
||||
static const TOKEN_SOURCE admin_source = {"SeMgr", {0, 0}};
|
||||
token = create_token( TRUE, user_sid, admin_groups, sizeof(admin_groups)/sizeof(admin_groups[0]),
|
||||
admin_privs, sizeof(admin_privs)/sizeof(admin_privs[0]), default_dacl,
|
||||
token = create_token( TRUE, user_sid, admin_groups, ARRAY_SIZE( admin_groups ),
|
||||
admin_privs, ARRAY_SIZE( admin_privs ), default_dacl,
|
||||
- admin_source, NULL, -1, TokenElevationTypeFull );
|
||||
+ admin_source, NULL, -1, TokenElevationTypeFull, &high_label_sid );
|
||||
/* we really need a primary group */
|
||||
assert( token->primary_group );
|
||||
}
|
||||
@@ -1530,6 +1534,26 @@ DECL_HANDLER(get_token_sid)
|
||||
@@ -1524,6 +1528,26 @@ DECL_HANDLER(get_token_sid)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,5 +149,5 @@ index 355a523..1ed994a 100644
|
||||
DECL_HANDLER(get_token_groups)
|
||||
{
|
||||
--
|
||||
1.9.1
|
||||
2.19.1
|
||||
|
||||
|
@@ -1,109 +0,0 @@
|
||||
From 6dc2138136a0699c8e8d1337b646a09b93cd8b0f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 04:02:16 +0200
|
||||
Subject: [PATCH] kernel32: Implement CreateProcessInternalW.
|
||||
|
||||
---
|
||||
dlls/kernel32/kernel32.spec | 2 +-
|
||||
dlls/kernel32/process.c | 24 ++++++++++++++----------
|
||||
dlls/kernelbase/kernelbase.spec | 2 +-
|
||||
include/winbase.h | 1 +
|
||||
4 files changed, 17 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
|
||||
index cb9c73a..98d5000 100644
|
||||
--- a/dlls/kernel32/kernel32.spec
|
||||
+++ b/dlls/kernel32/kernel32.spec
|
||||
@@ -315,7 +315,7 @@
|
||||
@ stdcall CreateProcessA(str str ptr ptr long long ptr str ptr ptr)
|
||||
# @ stub CreateProcessAsUserW
|
||||
# @ stub CreateProcessInternalA
|
||||
-# @ stub CreateProcessInternalW
|
||||
+@ stdcall CreateProcessInternalW(long wstr wstr ptr ptr long long ptr wstr ptr ptr ptr)
|
||||
# @ stub CreateProcessInternalWSecure
|
||||
@ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr)
|
||||
@ stdcall CreateRemoteThread(long ptr long ptr long long ptr)
|
||||
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
|
||||
index 658a0b1..15460aa 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -2588,12 +2588,13 @@ static LPWSTR get_file_name( LPCWSTR appname, LPWSTR cmdline, LPWSTR buffer,
|
||||
return ret;
|
||||
}
|
||||
|
||||
-
|
||||
-/* Steam hotpatches CreateProcessA and W, so to prevent it from crashing use an internal function */
|
||||
-static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_ATTRIBUTES process_attr,
|
||||
- LPSECURITY_ATTRIBUTES thread_attr, BOOL inherit, DWORD flags,
|
||||
- LPVOID env, LPCWSTR cur_dir, LPSTARTUPINFOW startup_info,
|
||||
- LPPROCESS_INFORMATION info )
|
||||
+/**********************************************************************
|
||||
+ * CreateProcessInternalW (KERNEL32.@)
|
||||
+ */
|
||||
+BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_ATTRIBUTES process_attr,
|
||||
+ LPSECURITY_ATTRIBUTES thread_attr, BOOL inherit, DWORD flags,
|
||||
+ LPVOID env, LPCWSTR cur_dir, LPSTARTUPINFOW startup_info,
|
||||
+ LPPROCESS_INFORMATION info, HANDLE *new_token )
|
||||
{
|
||||
BOOL retv = FALSE;
|
||||
HANDLE hFile = 0;
|
||||
@@ -2608,6 +2609,9 @@ static BOOL create_process_impl( LPCWSTR app_name, LPWSTR cmd_line, LPSECURITY_A
|
||||
|
||||
TRACE("app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
|
||||
|
||||
+ if (token) FIXME("Creating a process with a token is not yet implemented\n");
|
||||
+ if (new_token) FIXME("No support for returning created process token\n");
|
||||
+
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, ARRAY_SIZE( name ), &hFile, &is_64bit )))
|
||||
return FALSE;
|
||||
if (hFile == INVALID_HANDLE_VALUE) goto done;
|
||||
@@ -2774,8 +2778,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA( LPCSTR app_name, LPSTR cmd_line, L
|
||||
FIXME("StartupInfo.lpReserved is used, please report (%s)\n",
|
||||
debugstr_a(startup_info->lpReserved));
|
||||
|
||||
- ret = create_process_impl( app_nameW, cmd_lineW, process_attr, thread_attr,
|
||||
- inherit, flags, env, cur_dirW, &infoW, info );
|
||||
+ ret = CreateProcessInternalW( NULL, app_nameW, cmd_lineW, process_attr, thread_attr,
|
||||
+ inherit, flags, env, cur_dirW, &infoW, info, NULL );
|
||||
done:
|
||||
HeapFree( GetProcessHeap(), 0, app_nameW );
|
||||
HeapFree( GetProcessHeap(), 0, cmd_lineW );
|
||||
@@ -2794,8 +2798,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW( LPCWSTR app_name, LPWSTR cmd_line,
|
||||
LPVOID env, LPCWSTR cur_dir, LPSTARTUPINFOW startup_info,
|
||||
LPPROCESS_INFORMATION info )
|
||||
{
|
||||
- return create_process_impl( app_name, cmd_line, process_attr, thread_attr,
|
||||
- inherit, flags, env, cur_dir, startup_info, info);
|
||||
+ return CreateProcessInternalW( NULL, app_name, cmd_line, process_attr, thread_attr,
|
||||
+ inherit, flags, env, cur_dir, startup_info, info, NULL);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
|
||||
index 7d8439f..cfc3bec 100644
|
||||
--- a/dlls/kernelbase/kernelbase.spec
|
||||
+++ b/dlls/kernelbase/kernelbase.spec
|
||||
@@ -209,7 +209,7 @@
|
||||
@ stdcall CreateProcessAsUserA(long str str ptr ptr long long ptr str ptr ptr) advapi32.CreateProcessAsUserA
|
||||
@ stdcall CreateProcessAsUserW(long wstr wstr ptr ptr long long ptr wstr ptr ptr) advapi32.CreateProcessAsUserW
|
||||
# @ stub CreateProcessInternalA
|
||||
-# @ stub CreateProcessInternalW
|
||||
+@ stdcall CreateProcessInternalW(long wstr wstr ptr ptr long long ptr wstr ptr ptr ptr) kernel32.CreateProcessInternalW
|
||||
@ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr) kernel32.CreateProcessW
|
||||
@ stdcall CreateRemoteThread(long ptr long ptr long long ptr) kernel32.CreateRemoteThread
|
||||
@ stdcall CreateRemoteThreadEx(long ptr long ptr ptr long ptr ptr) kernel32.CreateRemoteThreadEx
|
||||
diff --git a/include/winbase.h b/include/winbase.h
|
||||
index de52e5a..99e761e 100644
|
||||
--- a/include/winbase.h
|
||||
+++ b/include/winbase.h
|
||||
@@ -1863,6 +1863,7 @@ WINBASEAPI BOOL WINAPI CreateProcessW(LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTE
|
||||
WINADVAPI BOOL WINAPI CreateProcessAsUserA(HANDLE,LPCSTR,LPSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCSTR,LPSTARTUPINFOA,LPPROCESS_INFORMATION);
|
||||
WINADVAPI BOOL WINAPI CreateProcessAsUserW(HANDLE,LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
|
||||
#define CreateProcessAsUser WINELIB_NAME_AW(CreateProcessAsUser)
|
||||
+WINBASEAPI BOOL WINAPI CreateProcessInternalW(HANDLE,LPCWSTR,LPWSTR,LPSECURITY_ATTRIBUTES,LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION,HANDLE*);
|
||||
WINADVAPI BOOL WINAPI CreateProcessWithLogonW(LPCWSTR,LPCWSTR,LPCWSTR,DWORD,LPCWSTR,LPWSTR,DWORD,LPVOID,LPCWSTR,LPSTARTUPINFOW,LPPROCESS_INFORMATION);
|
||||
WINBASEAPI HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD);
|
||||
WINBASEAPI HANDLE WINAPI CreateRemoteThreadEx(HANDLE,LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPPROC_THREAD_ATTRIBUTE_LIST,LPDWORD);
|
||||
--
|
||||
2.7.4
|
||||
|
@@ -1,79 +1,80 @@
|
||||
From ed2822f9c9c1178b78872b13aa5d5df1a397bd35 Mon Sep 17 00:00:00 2001
|
||||
From e571cdf9236e083f196c09d0fc96ed7c98fae440 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 6 Aug 2017 02:08:05 +0200
|
||||
Subject: [PATCH] server: Implement support for creating processes using a
|
||||
token.
|
||||
|
||||
---
|
||||
dlls/kernel32/process.c | 33 ++++++++++++++++++---------------
|
||||
server/process.c | 29 +++++++++++++++++++++++++----
|
||||
dlls/kernel32/process.c | 27 +++++++++++++++------------
|
||||
server/process.c | 39 +++++++++++++++++++++++++++++++++++----
|
||||
server/process.h | 2 +-
|
||||
server/protocol.def | 1 +
|
||||
server/request.c | 2 +-
|
||||
server/security.h | 2 ++
|
||||
server/token.c | 11 +++++++++++
|
||||
7 files changed, 59 insertions(+), 21 deletions(-)
|
||||
7 files changed, 66 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
|
||||
index e9d10ee..4ea7f1d 100644
|
||||
index bb6cc3e..7b202db 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -2203,7 +2203,7 @@ static NTSTATUS alloc_object_attributes( const SECURITY_ATTRIBUTES *attr, struct
|
||||
@@ -2289,7 +2289,7 @@ static BOOL replace_process( HANDLE handle, const RTL_USER_PROCESS_PARAMETERS *p
|
||||
* Create a new process. If hFile is a valid handle we have an exe
|
||||
* file, otherwise it is a Winelib app.
|
||||
*/
|
||||
-static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPWSTR env,
|
||||
+static BOOL create_process( HANDLE token, HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPWSTR env,
|
||||
LPCWSTR cur_dir, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir,
|
||||
@@ -2316,6 +2316,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
|
||||
-static BOOL create_process( HANDLE hFile, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
+static BOOL create_process( HANDLE token, HANDLE hFile, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, const RTL_USER_PROCESS_PARAMETERS *params,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir, const pe_image_info_t *pe_info )
|
||||
{
|
||||
@@ -2356,6 +2356,7 @@ static BOOL create_process( HANDLE hFile, LPSECURITY_ATTRIBUTES psa, LPSECURITY_
|
||||
req->access = PROCESS_ALL_ACCESS;
|
||||
req->cpu = cpu;
|
||||
req->cpu = pe_info->cpu;
|
||||
req->info_size = startup_info_size;
|
||||
+ req->token = wine_server_obj_handle( token );
|
||||
wine_server_add_data( req, objattr, attr_len );
|
||||
wine_server_add_data( req, startup_info, startup_info_size );
|
||||
wine_server_add_data( req, env, (env_end - env) * sizeof(WCHAR) );
|
||||
@@ -2432,7 +2433,7 @@ error:
|
||||
wine_server_add_data( req, params->Environment, (env_end - params->Environment) * sizeof(WCHAR) );
|
||||
@@ -2526,7 +2527,7 @@ static RTL_USER_PROCESS_PARAMETERS *get_vdm_params( const RTL_USER_PROCESS_PARAM
|
||||
*
|
||||
* Create a new VDM process for a 16-bit or DOS application.
|
||||
*/
|
||||
-static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, LPCWSTR cur_dir,
|
||||
+static BOOL create_vdm_process( HANDLE token, LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, LPCWSTR cur_dir,
|
||||
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir, int exec_only )
|
||||
@@ -2458,7 +2459,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
sprintfW(new_cmd_line, argsW, winevdmW, buffer, cmd_line);
|
||||
memset( &pe_info, 0, sizeof(pe_info) );
|
||||
pe_info.machine = IMAGE_FILE_MACHINE_I386;
|
||||
- ret = create_process( 0, winevdmW, new_cmd_line, env, cur_dir, psa, tsa, inherit,
|
||||
+ ret = create_process( token, 0, winevdmW, new_cmd_line, env, cur_dir, psa, tsa, inherit,
|
||||
flags, startup, info, unixdir, &pe_info, exec_only );
|
||||
HeapFree( GetProcessHeap(), 0, new_cmd_line );
|
||||
-static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
+static BOOL create_vdm_process( HANDLE token, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, const RTL_USER_PROCESS_PARAMETERS *params,
|
||||
LPPROCESS_INFORMATION info, LPCSTR unixdir )
|
||||
{
|
||||
@@ -2536,7 +2537,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
|
||||
|
||||
if (!(new_params = get_vdm_params( params, &pe_info ))) return FALSE;
|
||||
|
||||
- ret = create_process( 0, psa, tsa, inherit, flags, new_params, info, unixdir, &pe_info );
|
||||
+ ret = create_process( token, 0, psa, tsa, inherit, flags, new_params, info, unixdir, &pe_info );
|
||||
RtlDestroyProcessParameters( new_params );
|
||||
return ret;
|
||||
@@ -2470,7 +2471,7 @@ static BOOL create_vdm_process( LPCWSTR filename, LPWSTR cmd_line, LPWSTR env, L
|
||||
}
|
||||
@@ -2547,7 +2548,7 @@ static BOOL create_vdm_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
|
||||
*
|
||||
* Create a new cmd shell process for a .BAT file.
|
||||
*/
|
||||
-static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, LPCWSTR cur_dir,
|
||||
+static BOOL create_cmd_process( HANDLE token, LPCWSTR filename, LPWSTR cmd_line, LPVOID env, LPCWSTR cur_dir,
|
||||
LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
-static BOOL create_cmd_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
+static BOOL create_cmd_process( HANDLE token, LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES tsa,
|
||||
BOOL inherit, DWORD flags, LPSTARTUPINFOW startup,
|
||||
const RTL_USER_PROCESS_PARAMETERS *params,
|
||||
LPPROCESS_INFORMATION info )
|
||||
@@ -2498,8 +2499,8 @@ static BOOL create_cmd_process( LPCWSTR filename, LPWSTR cmd_line, LPVOID env, L
|
||||
strcatW( newcmdline, quotW );
|
||||
strcatW( newcmdline, cmd_line );
|
||||
@@ -2577,9 +2578,9 @@ static BOOL create_cmd_process( LPSECURITY_ATTRIBUTES psa, LPSECURITY_ATTRIBUTES
|
||||
strcatW( newcmdline, params->CommandLine.Buffer );
|
||||
strcatW( newcmdline, quotW );
|
||||
if (params->CurrentDirectory.DosPath.Length) cur_dir = params->CurrentDirectory.DosPath.Buffer;
|
||||
- ret = CreateProcessW( comspec, newcmdline, psa, tsa, inherit,
|
||||
- flags, env, cur_dir, startup, info );
|
||||
+ ret = CreateProcessInternalW( token, comspec, newcmdline, psa, tsa, inherit,
|
||||
+ flags, env, cur_dir, startup, info, NULL );
|
||||
flags | CREATE_UNICODE_ENVIRONMENT, params->Environment, cur_dir,
|
||||
- startup, info );
|
||||
+ startup, info, NULL );
|
||||
HeapFree( GetProcessHeap(), 0, newcmdline );
|
||||
return ret;
|
||||
}
|
||||
@@ -2611,7 +2612,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2692,7 +2693,9 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
|
||||
TRACE("app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
|
||||
|
||||
@@ -84,83 +85,58 @@ index e9d10ee..4ea7f1d 100644
|
||||
if (new_token) FIXME("No support for returning created process token\n");
|
||||
|
||||
if (!(tidy_cmdline = get_file_name( app_name, cmd_line, name, ARRAY_SIZE( name ), &hFile, &is_64bit )))
|
||||
@@ -2688,18 +2691,18 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
debugstr_w(name), is_64bit_arch(pe_info.machine) ? 64 : 32,
|
||||
@@ -2760,17 +2763,17 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
debugstr_w(name), is_64bit_arch(pe_info.cpu) ? 64 : 32,
|
||||
wine_dbgstr_longlong(pe_info.base), wine_dbgstr_longlong(pe_info.base + pe_info.map_size),
|
||||
pe_info.machine );
|
||||
- retv = create_process( hFile, name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr,
|
||||
+ retv = create_process( token, hFile, name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr,
|
||||
inherit, flags, startup_info, info, unixdir, &pe_info, FALSE );
|
||||
cpu_names[pe_info.cpu] );
|
||||
- retv = create_process( hFile, process_attr, thread_attr,
|
||||
+ retv = create_process( token, hFile, process_attr, thread_attr,
|
||||
inherit, flags, params, info, unixdir, &pe_info );
|
||||
break;
|
||||
case BINARY_WIN16:
|
||||
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(name) );
|
||||
- retv = create_vdm_process( name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr,
|
||||
+ retv = create_vdm_process( token, name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr,
|
||||
inherit, flags, startup_info, info, unixdir, FALSE );
|
||||
- retv = create_vdm_process( process_attr, thread_attr, inherit, flags, params, info, unixdir );
|
||||
+ retv = create_vdm_process( token, process_attr, thread_attr, inherit, flags, params, info, unixdir );
|
||||
break;
|
||||
case BINARY_UNIX_LIB:
|
||||
TRACE( "starting %s as %d-bit Winelib app\n",
|
||||
debugstr_w(name), is_64bit_arch(pe_info.machine) ? 64 : 32 );
|
||||
- retv = create_process( hFile, name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr,
|
||||
+ retv = create_process( token, hFile, name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr,
|
||||
inherit, flags, startup_info, info, unixdir, &pe_info, FALSE );
|
||||
debugstr_w(name), is_64bit_arch(pe_info.cpu) ? 64 : 32 );
|
||||
- retv = create_process( hFile, process_attr, thread_attr,
|
||||
+ retv = create_process( token, hFile, process_attr, thread_attr,
|
||||
inherit, flags, params, info, unixdir, &pe_info );
|
||||
break;
|
||||
case BINARY_UNKNOWN:
|
||||
@@ -2709,14 +2712,14 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
@@ -2780,14 +2783,14 @@ BOOL WINAPI CreateProcessInternalW( HANDLE token, LPCWSTR app_name, LPWSTR cmd_l
|
||||
if (!strcmpiW( p, comW ) || !strcmpiW( p, pifW ))
|
||||
{
|
||||
TRACE( "starting %s as DOS binary\n", debugstr_w(name) );
|
||||
- retv = create_vdm_process( name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr,
|
||||
+ retv = create_vdm_process( token, name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr,
|
||||
inherit, flags, startup_info, info, unixdir, FALSE );
|
||||
- retv = create_vdm_process( process_attr, thread_attr,
|
||||
+ retv = create_vdm_process( token, process_attr, thread_attr,
|
||||
inherit, flags, params, info, unixdir );
|
||||
break;
|
||||
}
|
||||
if (!strcmpiW( p, batW ) || !strcmpiW( p, cmdW ) )
|
||||
{
|
||||
TRACE( "starting %s as batch binary\n", debugstr_w(name) );
|
||||
- retv = create_cmd_process( name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr,
|
||||
+ retv = create_cmd_process( token, name, tidy_cmdline, envW, cur_dir, process_attr, thread_attr,
|
||||
inherit, flags, startup_info, info );
|
||||
- retv = create_cmd_process( process_attr, thread_attr,
|
||||
+ retv = create_cmd_process( token, process_attr, thread_attr,
|
||||
inherit, flags, startup_info, params, info );
|
||||
break;
|
||||
}
|
||||
@@ -2832,12 +2835,12 @@ static void exec_process( LPCWSTR name )
|
||||
debugstr_w(name), is_64bit_arch(pe_info.machine) ? 64 : 32,
|
||||
wine_dbgstr_longlong(pe_info.base), wine_dbgstr_longlong(pe_info.base + pe_info.map_size),
|
||||
pe_info.machine );
|
||||
- create_process( hFile, name, GetCommandLineW(), NULL, NULL, NULL, NULL,
|
||||
+ create_process( NULL, hFile, name, GetCommandLineW(), NULL, NULL, NULL, NULL,
|
||||
FALSE, 0, &startup_info, &info, NULL, &pe_info, TRUE );
|
||||
break;
|
||||
case BINARY_UNIX_LIB:
|
||||
TRACE( "%s is a Unix library, starting as Winelib app\n", debugstr_w(name) );
|
||||
- create_process( hFile, name, GetCommandLineW(), NULL, NULL, NULL, NULL,
|
||||
+ create_process( NULL, hFile, name, GetCommandLineW(), NULL, NULL, NULL, NULL,
|
||||
FALSE, 0, &startup_info, &info, NULL, &pe_info, TRUE );
|
||||
break;
|
||||
case BINARY_UNKNOWN:
|
||||
@@ -2847,7 +2850,7 @@ static void exec_process( LPCWSTR name )
|
||||
/* fall through */
|
||||
case BINARY_WIN16:
|
||||
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(name) );
|
||||
- create_vdm_process( name, GetCommandLineW(), NULL, NULL, NULL, NULL,
|
||||
+ create_vdm_process( NULL, name, GetCommandLineW(), NULL, NULL, NULL, NULL,
|
||||
FALSE, 0, &startup_info, &info, NULL, TRUE );
|
||||
break;
|
||||
default:
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index 653e513..2bb49e2 100644
|
||||
index af2ba3d..57bf0ec 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -486,7 +486,7 @@ static void start_sigkill_timer( struct process *process )
|
||||
/* create a new process */
|
||||
/* if the function fails the fd is closed */
|
||||
struct process *create_process( int fd, struct thread *parent_thread, int inherit_all,
|
||||
struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
- const struct security_descriptor *sd )
|
||||
+ const struct security_descriptor *sd, struct token *token )
|
||||
{
|
||||
struct process *process;
|
||||
|
||||
@@ -562,7 +562,7 @@ struct process *create_process( int fd, struct thread *parent_thread, int inheri
|
||||
@@ -561,7 +561,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
: alloc_handle_table( process, 0 );
|
||||
/* Note: for security reasons, starting a new process does not attempt
|
||||
* to use the current impersonation token for the new process */
|
||||
@@ -169,7 +145,7 @@ index 653e513..2bb49e2 100644
|
||||
process->affinity = parent->affinity;
|
||||
}
|
||||
if (!process->handles || !process->token) goto error;
|
||||
@@ -1128,6 +1128,7 @@ DECL_HANDLER(new_process)
|
||||
@@ -1127,6 +1127,7 @@ DECL_HANDLER(new_process)
|
||||
const struct security_descriptor *sd;
|
||||
const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, NULL );
|
||||
struct process *process = NULL;
|
||||
@@ -177,7 +153,7 @@ index 653e513..2bb49e2 100644
|
||||
struct process *parent = current->process;
|
||||
int socket_fd = thread_get_inflight_fd( current, req->socket_fd );
|
||||
|
||||
@@ -1168,13 +1169,31 @@ DECL_HANDLER(new_process)
|
||||
@@ -1167,10 +1168,39 @@ DECL_HANDLER(new_process)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -198,19 +174,18 @@ index 653e513..2bb49e2 100644
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (!req->info_size) /* create an orphaned process */
|
||||
{
|
||||
- if ((process = create_process( socket_fd, NULL, 0, sd )))
|
||||
+ if (!req->info_size) /* create an orphaned process */
|
||||
+ {
|
||||
+ if ((process = create_process( socket_fd, NULL, 0, sd, token )))
|
||||
{
|
||||
create_thread( -1, process, NULL );
|
||||
release_object( process );
|
||||
}
|
||||
+ {
|
||||
+ create_thread( -1, process, NULL );
|
||||
+ release_object( process );
|
||||
+ }
|
||||
+ if (token) release_object( token );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1182,6 +1201,7 @@ DECL_HANDLER(new_process)
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
/* build the startup info for a new process */
|
||||
if (!(info = alloc_object( &startup_info_ops )))
|
||||
{
|
||||
close( socket_fd );
|
||||
@@ -218,16 +193,16 @@ index 653e513..2bb49e2 100644
|
||||
return;
|
||||
}
|
||||
info->process = NULL;
|
||||
@@ -1228,7 +1248,7 @@ DECL_HANDLER(new_process)
|
||||
@@ -1217,7 +1247,7 @@ DECL_HANDLER(new_process)
|
||||
#undef FIXUP_LEN
|
||||
}
|
||||
|
||||
- if (!(process = create_process( socket_fd, current, req->inherit_all, sd ))) goto done;
|
||||
+ if (!(process = create_process( socket_fd, current, req->inherit_all, sd, token ))) goto done;
|
||||
- if (!(process = create_process( socket_fd, parent, req->inherit_all, sd ))) goto done;
|
||||
+ if (!(process = create_process( socket_fd, parent, req->inherit_all, sd, token ))) goto done;
|
||||
|
||||
process->startup_info = (struct startup_info *)grab_object( info );
|
||||
|
||||
@@ -1290,6 +1310,7 @@ DECL_HANDLER(new_process)
|
||||
@@ -1279,6 +1309,7 @@ DECL_HANDLER(new_process)
|
||||
reply->handle = alloc_handle_no_access_check( parent, process, req->access, objattr->attributes );
|
||||
|
||||
done:
|
||||
@@ -235,24 +210,33 @@ index 653e513..2bb49e2 100644
|
||||
if (process) release_object( process );
|
||||
release_object( info );
|
||||
}
|
||||
@@ -1311,7 +1342,7 @@ DECL_HANDLER(exec_process)
|
||||
close( socket_fd );
|
||||
return;
|
||||
}
|
||||
- if (!(process = create_process( socket_fd, NULL, 0, NULL ))) return;
|
||||
+ if (!(process = create_process( socket_fd, NULL, 0, NULL, NULL ))) return;
|
||||
create_thread( -1, process, NULL );
|
||||
release_object( process );
|
||||
}
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index 1128dba..ec44e02 100644
|
||||
index 029b328..ea28091 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -116,7 +116,7 @@ extern unsigned int alloc_ptid( void *ptr );
|
||||
extern void free_ptid( unsigned int id );
|
||||
extern void *get_ptid_entry( unsigned int id );
|
||||
extern struct process *create_process( int fd, struct thread *parent_thread, int inherit_all,
|
||||
extern struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
- const struct security_descriptor *sd );
|
||||
+ const struct security_descriptor *sd, struct token *token );
|
||||
extern data_size_t init_process( struct thread *thread );
|
||||
extern struct thread *get_process_first_thread( struct process *process );
|
||||
extern struct process *get_process_from_id( process_id_t id );
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 2ddc62f..897aa2b 100644
|
||||
index 607644e..1b5e6de 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -743,6 +743,7 @@ struct rawinput_device
|
||||
@@ -744,6 +744,7 @@ struct rawinput_device
|
||||
unsigned int access; /* access rights for process object */
|
||||
cpu_type_t cpu; /* CPU that the new process will use */
|
||||
data_size_t info_size; /* size of startup info */
|
||||
@@ -316,5 +300,5 @@ index 1184241..5db97b4 100644
|
||||
{
|
||||
GENERIC_MAPPING mapping;
|
||||
--
|
||||
2.7.4
|
||||
1.9.1
|
||||
|
||||
|
@@ -1,62 +0,0 @@
|
||||
From bddfc5e460ca5d5751bf7d9069379e0e0462ae94 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 6 Aug 2017 02:11:15 +0200
|
||||
Subject: advapi32: Use token in CreateProcessAsUserW and
|
||||
CreateProcessWithTokenW.
|
||||
|
||||
---
|
||||
dlls/advapi32/security.c | 14 ++++++++------
|
||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index c531e45c9a0..4fc27ef82f9 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -5700,13 +5700,14 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessAsUserW(
|
||||
LPSTARTUPINFOW lpStartupInfo,
|
||||
LPPROCESS_INFORMATION lpProcessInformation )
|
||||
{
|
||||
- FIXME("%p %s %s %p %p %d 0x%08x %p %s %p %p - semi-stub\n", hToken,
|
||||
+ TRACE("%p %s %s %p %p %d 0x%08x %p %s %p %p\n", hToken,
|
||||
debugstr_w(lpApplicationName), debugstr_w(lpCommandLine), lpProcessAttributes,
|
||||
lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment,
|
||||
debugstr_w(lpCurrentDirectory), lpStartupInfo, lpProcessInformation);
|
||||
|
||||
/* We should create the process with a suspended main thread */
|
||||
- if (!CreateProcessW (lpApplicationName,
|
||||
+ if (!CreateProcessInternalW(hToken,
|
||||
+ lpApplicationName,
|
||||
lpCommandLine,
|
||||
lpProcessAttributes,
|
||||
lpThreadAttributes,
|
||||
@@ -5715,7 +5716,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessAsUserW(
|
||||
lpEnvironment,
|
||||
lpCurrentDirectory,
|
||||
lpStartupInfo,
|
||||
- lpProcessInformation))
|
||||
+ lpProcessInformation,
|
||||
+ NULL))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -5742,14 +5744,14 @@ BOOL WINAPI CreateProcessWithTokenW(HANDLE token, DWORD logon_flags, LPCWSTR app
|
||||
DWORD creation_flags, void *environment, LPCWSTR current_directory, STARTUPINFOW *startup_info,
|
||||
PROCESS_INFORMATION *process_information )
|
||||
{
|
||||
- FIXME("%p 0x%08x %s %s 0x%08x %p %s %p %p - semi-stub\n", token,
|
||||
+ TRACE("%p 0x%08x %s %s 0x%08x %p %s %p %p\n", token,
|
||||
logon_flags, debugstr_w(application_name), debugstr_w(command_line),
|
||||
creation_flags, environment, debugstr_w(current_directory),
|
||||
startup_info, process_information);
|
||||
|
||||
/* FIXME: check if handles should be inherited */
|
||||
- return CreateProcessW( application_name, command_line, NULL, NULL, FALSE, creation_flags, environment,
|
||||
- current_directory, startup_info, process_information );
|
||||
+ return CreateProcessInternalW( token, application_name, command_line, NULL, NULL, FALSE, creation_flags, environment,
|
||||
+ current_directory, startup_info, process_information, NULL );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
--
|
||||
2.13.1
|
||||
|
@@ -1,26 +0,0 @@
|
||||
From e71a9b9a10c2de28a617f9490c3d135b1e12adf1 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 16 Dec 2016 13:20:32 +0800
|
||||
Subject: advapi32: SDDL assigns the "AC" abbreviation to
|
||||
WinBuiltinAnyPackageSid.
|
||||
|
||||
---
|
||||
dlls/advapi32/security.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index 28331df..3b585aa 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -135,7 +135,7 @@ static const WELLKNOWNSID WellKnownSids[] =
|
||||
{ {'M','E'}, WinMediumLabelSid, { SID_REVISION, 1, { SECURITY_MANDATORY_LABEL_AUTHORITY}, { SECURITY_MANDATORY_MEDIUM_RID } } },
|
||||
{ {'H','I'}, WinHighLabelSid, { SID_REVISION, 1, { SECURITY_MANDATORY_LABEL_AUTHORITY}, { SECURITY_MANDATORY_HIGH_RID } } },
|
||||
{ {'S','I'}, WinSystemLabelSid, { SID_REVISION, 1, { SECURITY_MANDATORY_LABEL_AUTHORITY}, { SECURITY_MANDATORY_SYSTEM_RID } } },
|
||||
- { {0,0}, WinBuiltinAnyPackageSid, { SID_REVISION, 2, { SECURITY_APP_PACKAGE_AUTHORITY }, { SECURITY_APP_PACKAGE_BASE_RID, SECURITY_BUILTIN_PACKAGE_ANY_PACKAGE } } },
|
||||
+ { {'A','C'}, WinBuiltinAnyPackageSid, { SID_REVISION, 2, { SECURITY_APP_PACKAGE_AUTHORITY }, { SECURITY_APP_PACKAGE_BASE_RID, SECURITY_BUILTIN_PACKAGE_ANY_PACKAGE } } },
|
||||
};
|
||||
|
||||
/* these SIDs must be constructed as relative to some domain - only the RID is well-known */
|
||||
--
|
||||
2.9.0
|
||||
|
@@ -1,227 +0,0 @@
|
||||
From 393f8906d8b26414fb4fc89c692cb5247be6b4c2 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 16 Dec 2016 13:23:15 +0800
|
||||
Subject: advapi32/tests: Add a test that compares a well-known SID to a SID
|
||||
created from a SDDL abbreviation.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/security.c | 130 +++++++++++++++++++++++++++++------------
|
||||
1 file changed, 92 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index dfe2f871d42..808547ddbc0 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -2,7 +2,7 @@
|
||||
* Unit tests for security functions
|
||||
*
|
||||
* Copyright (c) 2004 Mike McCormack
|
||||
- * Copyright (c) 2011 Dmitry Timoshkov
|
||||
+ * Copyright (c) 2011,2013,2014,2016 Dmitry Timoshkov
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -138,14 +138,6 @@ static HMODULE hmod;
|
||||
static int myARGC;
|
||||
static char** myARGV;
|
||||
|
||||
-struct strsid_entry
|
||||
-{
|
||||
- const char *str;
|
||||
- DWORD flags;
|
||||
-};
|
||||
-#define STRSID_OK 0
|
||||
-#define STRSID_OPT 1
|
||||
-
|
||||
#define SID_SLOTS 4
|
||||
static char debugsid_str[SID_SLOTS][256];
|
||||
static int debugsid_index = 0;
|
||||
@@ -174,12 +166,6 @@ static const char* debugstr_sid(PSID sid)
|
||||
return res;
|
||||
}
|
||||
|
||||
-struct sidRef
|
||||
-{
|
||||
- SID_IDENTIFIER_AUTHORITY auth;
|
||||
- const char *refStr;
|
||||
-};
|
||||
-
|
||||
static void init(void)
|
||||
{
|
||||
HMODULE hntdll;
|
||||
@@ -297,7 +283,11 @@ static void test_group_equal(HANDLE Handle, PSID expected, int line)
|
||||
|
||||
static void test_sid(void)
|
||||
{
|
||||
- struct sidRef refs[] = {
|
||||
+ static struct
|
||||
+ {
|
||||
+ SID_IDENTIFIER_AUTHORITY auth;
|
||||
+ const char *refStr;
|
||||
+ } refs[] = {
|
||||
{ { {0x00,0x00,0x33,0x44,0x55,0x66} }, "S-1-860116326-1" },
|
||||
{ { {0x00,0x00,0x01,0x02,0x03,0x04} }, "S-1-16909060-1" },
|
||||
{ { {0x00,0x00,0x00,0x01,0x02,0x03} }, "S-1-66051-1" },
|
||||
@@ -305,24 +295,60 @@ static void test_sid(void)
|
||||
{ { {0x00,0x00,0x00,0x00,0x00,0x02} }, "S-1-2-1" },
|
||||
{ { {0x00,0x00,0x00,0x00,0x00,0x0c} }, "S-1-12-1" },
|
||||
};
|
||||
- struct strsid_entry strsid_table[] = {
|
||||
- {"AO", STRSID_OK}, {"RU", STRSID_OK}, {"AN", STRSID_OK}, {"AU", STRSID_OK},
|
||||
- {"BA", STRSID_OK}, {"BG", STRSID_OK}, {"BO", STRSID_OK}, {"BU", STRSID_OK},
|
||||
- {"CA", STRSID_OPT}, {"CG", STRSID_OK}, {"CO", STRSID_OK}, {"DA", STRSID_OPT},
|
||||
- {"DC", STRSID_OPT}, {"DD", STRSID_OPT}, {"DG", STRSID_OPT}, {"DU", STRSID_OPT},
|
||||
- {"EA", STRSID_OPT}, {"ED", STRSID_OK}, {"WD", STRSID_OK}, {"PA", STRSID_OPT},
|
||||
- {"IU", STRSID_OK}, {"LA", STRSID_OK}, {"LG", STRSID_OK}, {"LS", STRSID_OK},
|
||||
- {"SY", STRSID_OK}, {"NU", STRSID_OK}, {"NO", STRSID_OK}, {"NS", STRSID_OK},
|
||||
- {"PO", STRSID_OK}, {"PS", STRSID_OK}, {"PU", STRSID_OK}, {"RS", STRSID_OPT},
|
||||
- {"RD", STRSID_OK}, {"RE", STRSID_OK}, {"RC", STRSID_OK}, {"SA", STRSID_OPT},
|
||||
- {"SO", STRSID_OK}, {"SU", STRSID_OK}};
|
||||
-
|
||||
+ static const struct
|
||||
+ {
|
||||
+ const char *str;
|
||||
+ WELL_KNOWN_SID_TYPE sid_type;
|
||||
+ BOOL optional;
|
||||
+ } strsid_table[] = {
|
||||
+ /* Please keep the list sorted. */
|
||||
+ { "AC", WinBuiltinAnyPackageSid, TRUE },
|
||||
+ { "AN", WinAnonymousSid },
|
||||
+ { "AO", WinBuiltinAccountOperatorsSid },
|
||||
+ { "AU", WinAuthenticatedUserSid },
|
||||
+ { "BA", WinBuiltinAdministratorsSid },
|
||||
+ { "BG", WinBuiltinGuestsSid },
|
||||
+ { "BO", WinBuiltinBackupOperatorsSid },
|
||||
+ { "BU", WinBuiltinUsersSid },
|
||||
+ { "CA", WinAccountCertAdminsSid, TRUE},
|
||||
+ { "CG", WinCreatorGroupSid },
|
||||
+ { "CO", WinCreatorOwnerSid },
|
||||
+ { "DA", WinAccountDomainAdminsSid, TRUE},
|
||||
+ { "DC", WinAccountComputersSid, TRUE},
|
||||
+ { "DD", WinAccountControllersSid, TRUE},
|
||||
+ { "DG", WinAccountDomainGuestsSid, TRUE},
|
||||
+ { "DU", WinAccountDomainUsersSid, TRUE},
|
||||
+ { "EA", WinAccountEnterpriseAdminsSid, TRUE},
|
||||
+ { "ED", WinEnterpriseControllersSid },
|
||||
+ { "IU", WinInteractiveSid },
|
||||
+ { "LA", WinAccountAdministratorSid },
|
||||
+ { "LG", WinAccountGuestSid },
|
||||
+ { "LS", WinLocalServiceSid },
|
||||
+ { "NO", WinBuiltinNetworkConfigurationOperatorsSid },
|
||||
+ { "NS", WinNetworkServiceSid },
|
||||
+ { "NU", WinNetworkSid },
|
||||
+ { "PA", WinAccountPolicyAdminsSid, TRUE},
|
||||
+ { "PO", WinBuiltinPrintOperatorsSid },
|
||||
+ { "PS", WinSelfSid },
|
||||
+ { "PU", WinBuiltinPowerUsersSid },
|
||||
+ { "RC", WinRestrictedCodeSid },
|
||||
+ { "RD", WinBuiltinRemoteDesktopUsersSid },
|
||||
+ { "RE", WinBuiltinReplicatorSid },
|
||||
+ { "RS", WinAccountRasAndIasServersSid, TRUE },
|
||||
+ { "RU", WinBuiltinPreWindows2000CompatibleAccessSid },
|
||||
+ { "SA", WinAccountSchemaAdminsSid, TRUE },
|
||||
+ { "SO", WinBuiltinSystemOperatorsSid },
|
||||
+ { "SU", WinServiceSid },
|
||||
+ { "SY", WinLocalSystemSid },
|
||||
+ { "WD", WinWorldSid },
|
||||
+ };
|
||||
+ SID_IDENTIFIER_AUTHORITY domain_ident = { SECURITY_NT_AUTHORITY };
|
||||
const char noSubAuthStr[] = "S-1-5";
|
||||
unsigned int i;
|
||||
- PSID psid = NULL;
|
||||
+ PSID psid, domain_sid;
|
||||
SID *pisid;
|
||||
BOOL r;
|
||||
- LPSTR str = NULL;
|
||||
+ LPSTR str;
|
||||
|
||||
if( !pConvertStringSidToSidA )
|
||||
{
|
||||
@@ -402,7 +428,7 @@ static void test_sid(void)
|
||||
}
|
||||
|
||||
/* string constant format not supported before XP */
|
||||
- r = pConvertStringSidToSidA(strsid_table[0].str, &psid);
|
||||
+ r = pConvertStringSidToSidA("AN", &psid);
|
||||
if(!r)
|
||||
{
|
||||
win_skip("String constant format not supported\n");
|
||||
@@ -410,25 +436,51 @@ static void test_sid(void)
|
||||
}
|
||||
LocalFree(psid);
|
||||
|
||||
+ AllocateAndInitializeSid(&domain_ident, 4, SECURITY_NT_NON_UNIQUE, 0, 0, 0, 0, 0, 0, 0, &domain_sid);
|
||||
+
|
||||
for(i = 0; i < ARRAY_SIZE(strsid_table); i++)
|
||||
{
|
||||
- char *temp;
|
||||
-
|
||||
SetLastError(0xdeadbeef);
|
||||
r = pConvertStringSidToSidA(strsid_table[i].str, &psid);
|
||||
|
||||
- if (!(strsid_table[i].flags & STRSID_OPT))
|
||||
+ if (!(strsid_table[i].optional))
|
||||
{
|
||||
ok(r, "%s: got %u\n", strsid_table[i].str, GetLastError());
|
||||
}
|
||||
|
||||
if (r)
|
||||
{
|
||||
- if ((winetest_debug > 1) && (ConvertSidToStringSidA(psid, &temp)))
|
||||
+ char buf[SECURITY_MAX_SID_SIZE];
|
||||
+ char *sid_string, *well_known_sid_string;
|
||||
+ DWORD n, size;
|
||||
+
|
||||
+ /* zero out domain id before comparison to simplify things */
|
||||
+ if (strsid_table[i].sid_type == WinAccountAdministratorSid ||
|
||||
+ strsid_table[i].sid_type == WinAccountGuestSid)
|
||||
{
|
||||
- trace(" %s: %s\n", strsid_table[i].str, temp);
|
||||
- LocalFree(temp);
|
||||
+ for (n = 1; n <= 3; n++)
|
||||
+ *GetSidSubAuthority(psid, n) = 0;
|
||||
}
|
||||
+
|
||||
+ r = ConvertSidToStringSidA(psid, &sid_string);
|
||||
+ ok(r, "%s: ConvertSidToStringSid error %u\n", strsid_table[i].str, GetLastError());
|
||||
+ if (winetest_debug > 1)
|
||||
+ trace("%s => %s\n", strsid_table[i].str, sid_string);
|
||||
+
|
||||
+ size = sizeof(buf);
|
||||
+ r = pCreateWellKnownSid(strsid_table[i].sid_type, domain_sid, buf, &size);
|
||||
+ ok(r, "%u: CreateWellKnownSid(%u) error %u\n", i, strsid_table[i].sid_type, GetLastError());
|
||||
+
|
||||
+ r = ConvertSidToStringSidA(buf, &well_known_sid_string);
|
||||
+ ok(r, "%u: ConvertSidToStringSi(%u) error %u\n", i, strsid_table[i].sid_type, GetLastError());
|
||||
+ if (winetest_debug > 1)
|
||||
+ trace("%u => %s\n", strsid_table[i].sid_type, well_known_sid_string);
|
||||
+
|
||||
+ ok(strcmp(sid_string, well_known_sid_string) == 0,
|
||||
+ "%u: (%u) expected %s, got %s\n", i, strsid_table[i].sid_type, well_known_sid_string, sid_string);
|
||||
+
|
||||
+ LocalFree(well_known_sid_string);
|
||||
+ LocalFree(sid_string);
|
||||
LocalFree(psid);
|
||||
}
|
||||
else
|
||||
@@ -439,6 +491,8 @@ static void test_sid(void)
|
||||
trace(" %s: couldn't be converted\n", strsid_table[i].str);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ LocalFree(domain_sid);
|
||||
}
|
||||
|
||||
static void test_trustee(void)
|
||||
@@ -2288,7 +2342,7 @@ static void test_LookupAccountSid(void)
|
||||
if (pCreateWellKnownSid)
|
||||
{
|
||||
trace("Well Known SIDs:\n");
|
||||
- for (i = 0; i <= 60; i++)
|
||||
+ for (i = 0; i <= 84; i++)
|
||||
{
|
||||
size = SECURITY_MAX_SID_SIZE;
|
||||
if (pCreateWellKnownSid(i, NULL, &max_sid.sid, &size))
|
||||
--
|
||||
2.13.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [41934] Assigns the AC abbreviation to WinBuiltinAnyPackageSid
|
@@ -0,0 +1,100 @@
|
||||
From 452c42b4855e2f6338fa9b8746377ff9fe9ee706 Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Wed, 23 Apr 2014 04:16:53 +0800
|
||||
Subject: [PATCH] atl: Implement AtlAxDialogBox[A,W]
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=32749
|
||||
---
|
||||
dlls/atl/atl_ax.c | 60 +++++++++++++++++++++++++++++++++++++++++++++----------
|
||||
1 file changed, 50 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c
|
||||
index 8121278..92fcb84 100644
|
||||
--- a/dlls/atl/atl_ax.c
|
||||
+++ b/dlls/atl/atl_ax.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "winerror.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/debug.h"
|
||||
+#include "wine/heap.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "ole2.h"
|
||||
@@ -1407,25 +1408,64 @@ HRESULT WINAPI AtlAxGetControl(HWND hWnd, IUnknown **pUnk)
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
- * AtlAxDialogBoxW [atl100.35]
|
||||
+ * AtlAxDialogBoxA [atl100.@]
|
||||
*
|
||||
*/
|
||||
-INT_PTR WINAPI AtlAxDialogBoxW(HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogProc,
|
||||
- LPARAM dwInitParam)
|
||||
+INT_PTR WINAPI AtlAxDialogBoxA(HINSTANCE hInst, LPCSTR name, HWND owner, DLGPROC dlgProc, LPARAM param)
|
||||
{
|
||||
- FIXME("(%p %s %p %p %lx)\n", hInstance, debugstr_w(lpTemplateName), hWndParent, lpDialogProc, dwInitParam);
|
||||
- return 0;
|
||||
+ INT_PTR res = 0;
|
||||
+ int length;
|
||||
+ WCHAR *nameW;
|
||||
+
|
||||
+ if (IS_INTRESOURCE(name))
|
||||
+ return AtlAxDialogBoxW( hInst, (LPCWSTR) name, owner, dlgProc, param );
|
||||
+
|
||||
+ length = MultiByteToWideChar( CP_ACP, 0, name, -1, NULL, 0 );
|
||||
+ nameW = heap_alloc( length * sizeof(WCHAR) );
|
||||
+ if (nameW)
|
||||
+ {
|
||||
+ MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, length );
|
||||
+ res = AtlAxDialogBoxW( hInst, nameW, owner, dlgProc, param );
|
||||
+ heap_free( nameW );
|
||||
+ }
|
||||
+ return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
- * AtlAxDialogBoxA [atl100.36]
|
||||
+ * AtlAxDialogBoxW [atl100.@]
|
||||
*
|
||||
*/
|
||||
-INT_PTR WINAPI AtlAxDialogBoxA(HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogProc,
|
||||
- LPARAM dwInitParam)
|
||||
+INT_PTR WINAPI AtlAxDialogBoxW(HINSTANCE hInst, LPCWSTR name, HWND owner, DLGPROC dlgProc, LPARAM param)
|
||||
{
|
||||
- FIXME("(%p %s %p %p %lx)\n", hInstance, debugstr_a(lpTemplateName), hWndParent, lpDialogProc, dwInitParam);
|
||||
- return 0;
|
||||
+ HRSRC hrsrc;
|
||||
+ HGLOBAL hgl;
|
||||
+ LPCDLGTEMPLATEW ptr;
|
||||
+ LPDLGTEMPLATEW newptr;
|
||||
+ INT_PTR res;
|
||||
+
|
||||
+ TRACE("(%p %s %p %p %lx)\n", hInst, debugstr_w(name), owner, dlgProc, param);
|
||||
+
|
||||
+ hrsrc = FindResourceW( hInst, name, (LPWSTR)RT_DIALOG );
|
||||
+ if ( !hrsrc )
|
||||
+ return 0;
|
||||
+ hgl = LoadResource (hInst, hrsrc);
|
||||
+ if ( !hgl )
|
||||
+ return 0;
|
||||
+ ptr = LockResource ( hgl );
|
||||
+ if (!ptr)
|
||||
+ {
|
||||
+ FreeResource( hgl );
|
||||
+ return 0;
|
||||
+ }
|
||||
+ newptr = AX_ConvertDialogTemplate( ptr );
|
||||
+ if ( newptr )
|
||||
+ {
|
||||
+ res = DialogBoxIndirectParamW( hInst, newptr, owner, dlgProc, param );
|
||||
+ heap_free( newptr );
|
||||
+ } else
|
||||
+ res = 0;
|
||||
+ FreeResource ( hrsrc );
|
||||
+ return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
--
|
||||
1.9.1
|
||||
|
1
patches/atl-AtlAxDialogBox/definition
Normal file
1
patches/atl-AtlAxDialogBox/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [32749] atl: Implemented AtlAxDialogBox[A,W]
|
@@ -1,4 +1,4 @@
|
||||
From a324685a2f4f48d5d9da8c3000164800152dc297 Mon Sep 17 00:00:00 2001
|
||||
From ff1967f048d2b32ad98e91b4f39edba0c425a8a9 Mon Sep 17 00:00:00 2001
|
||||
From: Jack Grigg <me@jackgrigg.com>
|
||||
Date: Sat, 17 Mar 2018 21:14:05 +1100
|
||||
Subject: [PATCH] bcrypt: Implement BCryptDeriveKeyPBKDF2 and add test vectors.
|
||||
@@ -17,8 +17,9 @@ Signed-off-by: Jack Grigg <me@jackgrigg.com>
|
||||
dlls/bcrypt/bcrypt.spec | 1 +
|
||||
dlls/bcrypt/bcrypt_main.c | 163 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/bcrypt/tests/bcrypt.c | 83 +++++++++++++++++++++++
|
||||
dlls/ncrypt/ncrypt.spec | 2 +-
|
||||
include/bcrypt.h | 1 +
|
||||
4 files changed, 248 insertions(+)
|
||||
5 files changed, 249 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index 78824d7..f4d9a57 100644
|
||||
@@ -33,10 +34,10 @@ index 78824d7..f4d9a57 100644
|
||||
@ stdcall BCryptDestroyKey(ptr)
|
||||
@ stub BCryptDestroySecret
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 29a0a78..33c1da53 100644
|
||||
index 2b9ae0b..49ccb13 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -2315,6 +2315,169 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
|
||||
@@ -1316,6 +1316,169 @@ NTSTATUS WINAPI BCryptSetProperty( BCRYPT_HANDLE handle, const WCHAR *prop, UCHA
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,6 +321,19 @@ index 6865e87..5c4df6a 100644
|
||||
+
|
||||
FreeLibrary(module);
|
||||
}
|
||||
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
|
||||
index e7b12e0..adc0999 100644
|
||||
--- a/dlls/ncrypt/ncrypt.spec
|
||||
+++ b/dlls/ncrypt/ncrypt.spec
|
||||
@@ -9,7 +9,7 @@
|
||||
@ stub BCryptDeleteContext
|
||||
@ stub BCryptDeriveKey
|
||||
@ stub BCryptDeriveKeyCapi
|
||||
-@ stub BCryptDeriveKeyPBKDF2
|
||||
+@ stdcall BCryptDeriveKeyPBKDF2(ptr ptr long ptr long int64 ptr long long) bcrypt.BCryptDeriveKeyPBKDF2
|
||||
@ stdcall BCryptDestroyHash(ptr) bcrypt.BCryptDestroyHash
|
||||
@ stdcall BCryptDestroyKey(ptr) bcrypt.BCryptDestroyKey
|
||||
@ stub BCryptDestroySecret
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index df54f62..d3e4b99 100644
|
||||
--- a/include/bcrypt.h
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 8ebad635c033bf41392e23ee50494195fdce73b9 Mon Sep 17 00:00:00 2001
|
||||
From 480ec9b4f559237e618ede31ecd158340783ab80 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Lombard <berillions@gmail.com>
|
||||
Date: Sun, 10 Jun 2018 14:50:31 +0200
|
||||
Subject: [PATCH 2/3] bcrypt: Add BCryptGenerateKeyPair stub.
|
||||
@@ -6,14 +6,15 @@ Subject: [PATCH 2/3] bcrypt: Add BCryptGenerateKeyPair stub.
|
||||
---
|
||||
dlls/bcrypt/bcrypt.spec | 2 +-
|
||||
dlls/bcrypt/bcrypt_main.c | 6 ++++++
|
||||
dlls/ncrypt/ncrypt.spec | 2 +-
|
||||
include/bcrypt.h | 1 +
|
||||
3 files changed, 8 insertions(+), 1 deletion(-)
|
||||
4 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
|
||||
index f4d9a57..1e81ad1 100644
|
||||
index 78824d7..ccfec63 100644
|
||||
--- a/dlls/bcrypt/bcrypt.spec
|
||||
+++ b/dlls/bcrypt/bcrypt.spec
|
||||
@@ -26,7 +26,7 @@
|
||||
@@ -25,7 +25,7 @@
|
||||
@ stdcall BCryptFinishHash(ptr ptr long long)
|
||||
@ stub BCryptFreeBuffer
|
||||
@ stdcall BCryptGenRandom(ptr ptr long long)
|
||||
@@ -23,7 +24,7 @@ index f4d9a57..1e81ad1 100644
|
||||
@ stdcall BCryptGetFipsAlgorithmMode(ptr)
|
||||
@ stdcall BCryptGetProperty(ptr wstr ptr long ptr long)
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 003e8f3..0d94634 100644
|
||||
index 0381b65..623ccb5 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -160,6 +160,12 @@ NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE handle, UCHAR *buffer, ULONG c
|
||||
@@ -39,11 +40,24 @@ index 003e8f3..0d94634 100644
|
||||
NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR id, LPCWSTR implementation, DWORD flags )
|
||||
{
|
||||
const DWORD supported_flags = BCRYPT_ALG_HANDLE_HMAC_FLAG;
|
||||
diff --git a/dlls/ncrypt/ncrypt.spec b/dlls/ncrypt/ncrypt.spec
|
||||
index e7b12e0..e667e75 100644
|
||||
--- a/dlls/ncrypt/ncrypt.spec
|
||||
+++ b/dlls/ncrypt/ncrypt.spec
|
||||
@@ -27,7 +27,7 @@
|
||||
@ stdcall BCryptFinishHash(ptr ptr long long) bcrypt.BCryptFinishHash
|
||||
@ stub BCryptFreeBuffer
|
||||
@ stdcall BCryptGenRandom(ptr ptr long long) bcrypt.BCryptGenRandom
|
||||
-@ stub BCryptGenerateKeyPair
|
||||
+@ stdcall BCryptGenerateKeyPair(ptr ptr long long) bcrypt.BCryptGenerateKeyPair
|
||||
@ stdcall BCryptGenerateSymmetricKey(ptr ptr ptr long ptr long long) bcrypt.BCryptGenerateSymmetricKey
|
||||
@ stdcall BCryptGetFipsAlgorithmMode(ptr) bcrypt.BCryptGetFipsAlgorithmMode
|
||||
@ stdcall BCryptGetProperty(ptr wstr ptr long ptr long) bcrypt.BCryptGetProperty
|
||||
diff --git a/include/bcrypt.h b/include/bcrypt.h
|
||||
index 676db72..ce11685 100644
|
||||
index 7966f76..2ef073b 100644
|
||||
--- a/include/bcrypt.h
|
||||
+++ b/include/bcrypt.h
|
||||
@@ -224,6 +224,7 @@ NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
|
||||
@@ -223,6 +223,7 @@ NTSTATUS WINAPI BCryptDestroyKey(BCRYPT_KEY_HANDLE);
|
||||
NTSTATUS WINAPI BCryptEncrypt(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG, ULONG *, ULONG);
|
||||
NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG, ULONG *, BCRYPT_ALGORITHM_IDENTIFIER **, ULONG);
|
||||
NTSTATUS WINAPI BCryptFinishHash(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user