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
478 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2414b1da6a | ||
|
7ab49f09a2 | ||
|
a3d08de2b8 | ||
|
1c969cbbed | ||
|
0e7472e7a3 | ||
|
f3e785a3a8 | ||
|
dfddef9654 | ||
|
d87ec36ccf | ||
|
a3710ff21f | ||
|
0e67af3d09 | ||
|
8b1e0eec1d | ||
|
b8ca0eae9f | ||
|
350eb136a5 | ||
|
f40763d8a5 | ||
|
4462586c80 | ||
|
aae98229b0 | ||
|
7ad10427be | ||
|
9912133b6a | ||
|
14450482bc | ||
|
a8947d8016 | ||
|
a5a402a003 | ||
|
2505882bc6 | ||
|
760b2fbc35 | ||
|
909415c8d0 | ||
|
5cd622f667 | ||
|
4004f81390 | ||
|
28c6e62cb9 | ||
|
df37ef7599 | ||
|
3b4ce945a6 | ||
|
6d67766abd | ||
|
143e59bfe2 | ||
|
7dbce711de | ||
|
53bbade133 | ||
|
fe5b02cbbc | ||
|
abb7ae8b1c | ||
|
0fc2f15ac5 | ||
|
c646dc9283 | ||
|
d0b0b5be24 | ||
|
8cbc70df46 | ||
|
a8684593e2 | ||
|
e015f0590c | ||
|
dea57ccd5f | ||
|
fd8727a320 | ||
|
dc77e28b0f | ||
|
213037cb33 | ||
|
fce121fcd9 | ||
|
2dc013940d | ||
|
8229c98169 | ||
|
d7b71f0bb4 | ||
|
3511fe03ee | ||
|
7ffd7fc333 | ||
|
7be9c41c35 | ||
|
e002d94a8b | ||
|
5eb920dd83 | ||
|
968e22f2ed | ||
|
f9e86098b3 | ||
|
023588ac34 | ||
|
d3b70d6278 | ||
|
47fea9ffa2 | ||
|
2a073f334b | ||
|
3b0de86bf9 | ||
|
b9d3415f29 | ||
|
84bb779a9b | ||
|
3553024da0 | ||
|
991f2e8ebf | ||
|
837404f454 | ||
|
18032936f1 | ||
|
0ae7315541 | ||
|
f257f37b92 | ||
|
371d6ff606 | ||
|
88ffa8d374 | ||
|
7734f7a808 | ||
|
0192a7b36c | ||
|
5566259fb5 | ||
|
7bdc1d6bac | ||
|
852a7d9a7d | ||
|
3b6b470bca | ||
|
cd3ee9b25d | ||
|
c7ea1850c7 | ||
|
41c7c741d7 | ||
|
009f571ba1 | ||
|
e2d9f97b61 | ||
|
c32fb530b8 | ||
|
9d2a93164f | ||
|
4130b2a71c | ||
|
786cac8be4 | ||
|
6ad4bdecd2 | ||
|
950d7c6c43 | ||
|
66561ecf5d | ||
|
7925f8829e | ||
|
f7739e7052 | ||
|
44f49e8001 | ||
|
c118dfd709 | ||
|
c811f7aa7e | ||
|
495ae4e9af | ||
|
819539b19f | ||
|
bd2086ff97 | ||
|
db6b6282eb | ||
|
3dc5147b28 | ||
|
d1a75649b7 | ||
|
40dda2bf72 | ||
|
534f6ae34e | ||
|
411aeb2398 | ||
|
7e7e0bbe3e | ||
|
bf69e4ee2b | ||
|
8d04884c1f | ||
|
8d07859cb1 | ||
|
05efccaeaf | ||
|
8cacc0d955 | ||
|
5b5a6de9b8 | ||
|
be9c96813a | ||
|
ed56966feb | ||
|
80498dd440 | ||
|
601cfd7fdb | ||
|
6d726da3ba | ||
|
6a87f0a479 | ||
|
2d12fd01d7 | ||
|
fbf364bce9 | ||
|
23ca7fe894 | ||
|
ae8bdc6121 | ||
|
3cea972271 | ||
|
b49e874386 | ||
|
6ea9eb634f | ||
|
24fa2aa786 | ||
|
8bef81b0a6 | ||
|
ab4391f61b | ||
|
f6356a2c93 | ||
|
8c5be4c9e7 | ||
|
48fc6b0ba0 | ||
|
ee0185d9e2 | ||
|
df02967431 | ||
|
87a40ed683 | ||
|
194669052e | ||
|
aa7895faf6 | ||
|
f82518af72 | ||
|
7145412e08 | ||
|
cd9f6dbd90 | ||
|
e634569429 | ||
|
76a479203b | ||
|
639755741e | ||
|
9acfa3b899 | ||
|
7b32c6a57f | ||
|
7bd8acb4ca | ||
|
0a299f39c8 | ||
|
f22ff249a9 | ||
|
f90534f9da | ||
|
de03562a2d | ||
|
831d2d8b52 | ||
|
5087d8a8d9 | ||
|
22ed5ee061 | ||
|
003d5833c2 | ||
|
151728b04d | ||
|
83c7e2a993 | ||
|
91a9c0e3db | ||
|
c35a3386eb | ||
|
2996658d6a | ||
|
c7aa87d8a2 | ||
|
4125a9880c | ||
|
c44db537f1 | ||
|
71ac12a8e3 | ||
|
7fc716aa5f | ||
|
d34ff18679 | ||
|
a2fed1b240 | ||
|
88f994eb57 | ||
|
88e6b6c65c | ||
|
9a9401026f | ||
|
d79463a8b3 | ||
|
ec77bc9d66 | ||
|
5969ae1e56 | ||
|
5e685d6df9 | ||
|
ad66963dff | ||
|
480bf20bec | ||
|
7a5a98a14b | ||
|
0505562a30 | ||
|
d7df18ad2d | ||
|
603343a361 | ||
|
1d149ff59d | ||
|
285e594688 | ||
|
6c6ef5bfa4 | ||
|
db87b45e49 | ||
|
21620bf3cf | ||
|
f6495b290f | ||
|
caf4d5011e | ||
|
c3138a19dc | ||
|
5af9636365 | ||
|
fd175dc863 | ||
|
2b119ef030 | ||
|
c4b73e1752 | ||
|
424cc0395c | ||
|
298af8f9fe | ||
|
416f7f3bb5 | ||
|
8321c62f24 | ||
|
d452acf61b | ||
|
663c3ba497 | ||
|
4242749b5b | ||
|
7d08bb86e1 | ||
|
28fad42582 | ||
|
68c50a8fb4 | ||
|
47035cfbf5 | ||
|
8e20899551 | ||
|
03290f8a41 | ||
|
c811ed7bd9 | ||
|
d9eb78e597 | ||
|
150ce22fa2 | ||
|
eae4093bf8 | ||
|
621cf69c80 | ||
|
bc6c681225 | ||
|
46420edcd0 | ||
|
af56d3821a | ||
|
32082f4d6f | ||
|
59e6a606b9 | ||
|
bf043458ba | ||
|
7c1249e5c0 | ||
|
3b24c1cf1d | ||
|
eb32fd78ae | ||
|
e4a11b1663 | ||
|
90d57326b5 | ||
|
b71d588d78 | ||
|
bafd1bfc74 | ||
|
23ae4e6c7a | ||
|
6ecb8df033 | ||
|
364ce82bd1 | ||
|
261a981d77 | ||
|
f7013bb1b4 | ||
|
99c296e10c | ||
|
02be23fa52 | ||
|
352d5a391b | ||
|
4373a1011e | ||
|
26d3815d8c | ||
|
54ae005107 | ||
|
0e493bcef1 | ||
|
ee89d77f18 | ||
|
4ffe305c90 | ||
|
1a87edb76b | ||
|
914f67c020 | ||
|
c3c5d48b18 | ||
|
884f646404 | ||
|
5c4729e4ce | ||
|
103195f07d | ||
|
3acacd0ee1 | ||
|
d2d0366ce5 | ||
|
913b39b117 | ||
|
4d315a6098 | ||
|
5e5dafe07a | ||
|
bb79717d86 | ||
|
b1219b7fae | ||
|
046f6604b7 | ||
|
f6954e6e77 | ||
|
553c1cff5a | ||
|
4ef21bcf82 | ||
|
ebbd01086e | ||
|
b1765ff74e | ||
|
21a97e1f88 | ||
|
4f13965432 | ||
|
3dd8d0e647 | ||
|
3f3a05f91c | ||
|
f48f106853 | ||
|
2e111fae10 | ||
|
9cca205cc2 | ||
|
502c444d9c | ||
|
215d78f8e1 | ||
|
cbdc68f558 | ||
|
6125243d3a | ||
|
262df397ef | ||
|
f904ca32a3 | ||
|
70f6f6d7e4 | ||
|
4995d0d3af | ||
|
40099e26bf | ||
|
70d8178927 | ||
|
b6c2818755 | ||
|
37fc290f77 | ||
|
82cff8bbdb | ||
|
df2fd22e4d | ||
|
60074b960f | ||
|
97fbe3fe04 | ||
|
f2686a1537 | ||
|
7766c17912 | ||
|
8402c95961 | ||
|
6274392d27 | ||
|
102af10c89 | ||
|
3d9a927266 | ||
|
8e5546184f | ||
|
d799e8fd82 | ||
|
02913f754f | ||
|
03f5adcafb | ||
|
984d402240 | ||
|
32fcc0d75b | ||
|
b6595d9e28 | ||
|
eb4f9db59c | ||
|
11f545447b | ||
|
7934e14fc0 | ||
|
5306e1df11 | ||
|
938c0aa155 | ||
|
cb2a6551bc | ||
|
9a4c8c5631 | ||
|
044cb93066 | ||
|
8648971fa8 | ||
|
f1917e904a | ||
|
f12808c094 | ||
|
8a2765d125 | ||
|
7b78338b07 | ||
|
0db92c336f | ||
|
2fd3b9fdfd | ||
|
92d52c3f4c | ||
|
a4d98c48f9 | ||
|
676f261e5e | ||
|
6387991cc0 | ||
|
c81093882b | ||
|
f132e60b9d | ||
|
934a09585a | ||
|
06877e55b1 | ||
|
4e692b5301 | ||
|
9ff4e2dc44 | ||
|
76f206526a | ||
|
f3298432f0 | ||
|
8be56c21f9 | ||
|
543cee79a8 | ||
|
c6132bcb28 | ||
|
9ffacb6b09 | ||
|
bca232f190 | ||
|
2263ec0d3d | ||
|
2c7588eb2f | ||
|
7b5a0e5a94 | ||
|
bf85255a61 | ||
|
7f9b426cb9 | ||
|
a1bda115af | ||
|
033542b024 | ||
|
1f7dd0ee12 | ||
|
4501d49149 | ||
|
5246a035e9 | ||
|
fbe1ba5578 | ||
|
24cd5774cf | ||
|
307f8a782d | ||
|
bee49c0b29 | ||
|
4b2ca6b38e | ||
|
762c0e7040 | ||
|
0a85e3f331 | ||
|
68f3e40ff7 | ||
|
cc185de9ef | ||
|
e30e225125 | ||
|
d58990f6ac | ||
|
3e3661298c | ||
|
7d92cd315b | ||
|
3931c93628 | ||
|
813de5d6f8 | ||
|
dfc3b0f583 | ||
|
3e39e3132b | ||
|
76ba9d2387 | ||
|
d4918b4305 | ||
|
dcd4faf1c9 | ||
|
7557b3e2eb | ||
|
4b12c5a4e3 | ||
|
ca73dc62cd | ||
|
4147635dfc | ||
|
4e6a477acd | ||
|
169c49055d | ||
|
7b0b95ee53 | ||
|
1785a56934 | ||
|
f2d1cc1a8c | ||
|
8a46f19ece | ||
|
d33cdb84fd | ||
|
69a4e4baa2 | ||
|
2ad422ff4d | ||
|
a8b95783eb | ||
|
4581daea3b | ||
|
77d29cbee9 | ||
|
f90eb74f8d | ||
|
abc772e286 | ||
|
2c2eabb5c0 | ||
|
75637c26ea | ||
|
4e0031b058 | ||
|
0d8d1f0447 | ||
|
029c249e78 | ||
|
8d4d0a840e | ||
|
767b90c5dd | ||
|
a23c076055 | ||
|
e2c2447841 | ||
|
4861c47f2b | ||
|
437038604a | ||
|
4c160ec82a | ||
|
528144a4ad | ||
|
76900de5bb | ||
|
776306026a | ||
|
c4c72e90ab | ||
|
f8c3c9a6f8 | ||
|
39678da196 | ||
|
be8a670b5b | ||
|
4d11895651 | ||
|
bf3fbb7bdf | ||
|
160a5024b4 | ||
|
f36c844f11 | ||
|
732ab97a7e | ||
|
46fbb7d31e | ||
|
44d1a45e98 | ||
|
f23b6cb7dc | ||
|
4d01e48843 | ||
|
90109a5fc5 | ||
|
e8abb98858 | ||
|
56b4eed468 | ||
|
755d1ca559 | ||
|
001ea51fb5 | ||
|
db80e169c7 | ||
|
7757a2d4f6 | ||
|
1a980ed93d | ||
|
528306ccb6 | ||
|
7fe7d87f09 | ||
|
805f2e9252 | ||
|
18f7125892 | ||
|
f993930ee6 | ||
|
2a9e87abea | ||
|
af97ec8ce0 | ||
|
b14430433d | ||
|
f9d1798edb | ||
|
e5da84dc36 | ||
|
75c7644c3d | ||
|
7c7868f4bb | ||
|
d1a8b6bc14 | ||
|
53b02cd0ee | ||
|
36b8b8cc65 | ||
|
13536af59c | ||
|
a6f3bd989e | ||
|
0830db32cd | ||
|
cd7d77fe36 | ||
|
2e9977f4ac | ||
|
a1246b5e92 | ||
|
676dd02663 | ||
|
648db00708 | ||
|
6bfaa3b0a5 | ||
|
cbf7f73313 | ||
|
c896e5cb69 | ||
|
4d65ec9456 | ||
|
d14250ab03 | ||
|
789f5c7c64 | ||
|
69cb47fd36 | ||
|
8450903b5c | ||
|
ffe93505d2 | ||
|
5213d551f8 | ||
|
e61a75f75f | ||
|
7428dd8656 | ||
|
40e84b052b | ||
|
92b2688a74 | ||
|
f7eec766a5 | ||
|
b4e0277488 | ||
|
f54b943bca | ||
|
6138369b4f | ||
|
59fe96c14c | ||
|
afdf5020ff | ||
|
2fc5c88068 | ||
|
ad3de029e7 | ||
|
4ff3984c49 | ||
|
deeaa04aa4 | ||
|
592b853fe4 | ||
|
26f14c2ddd | ||
|
57204d77d9 | ||
|
37e000145f | ||
|
d68ab574f5 | ||
|
469cbe7ed8 | ||
|
1fe141dd3e | ||
|
a3b99d730d | ||
|
de7c2faf80 | ||
|
8b2fd051c9 | ||
|
ede44e4e8f | ||
|
aca614eb8b | ||
|
49d52336e1 | ||
|
17fdb93f55 | ||
|
3f43238b01 | ||
|
59d19c8963 | ||
|
d3ad4e1115 | ||
|
b3f1e5566f | ||
|
c26be86c42 | ||
|
14a3242b92 | ||
|
991bebfee7 | ||
|
0d7a4f0c73 | ||
|
30c1e2757a | ||
|
e55a3a3f43 | ||
|
ca1047528f | ||
|
d53a1b4a17 | ||
|
47facf2571 |
30
README.md
30
README.md
@@ -79,4 +79,32 @@ Contributing
|
||||
|
||||
For information on contributing to Wine-Staging, please see
|
||||
<https://wiki.winehq.org/Wine-Staging_Contributing>. Note that GitHub pull
|
||||
requests are strongly dispreferred, especially for patches.
|
||||
requests are strongly dispreferred, especially for patches.
|
||||
|
||||
Donations
|
||||
---------
|
||||
|
||||
wine-staging is a large set of experimental patches which provide various
|
||||
improvements to WINE, but are not quite suitable for upstreaming. This set of
|
||||
patches has been continuously managed for many years by a small group of
|
||||
volunteers. The way this works is that we often review patches attached to
|
||||
various bug reports found at https://bugs.winehq.org/ which may fix bugs, but
|
||||
may not be quite suitable to be upstreamed due to needing some cleanup or more
|
||||
proper implementation. In the event that this happens, we add the patches to
|
||||
wine-staging instead, and keep them updated and maintained as well as attempt to
|
||||
clean them up to be upstreamed. We also both write and verify patches which fix
|
||||
various bugs that may not have patches, and in turn allow them run better using
|
||||
WINE. This includes testing on various hardware, games, and applications.
|
||||
|
||||
Any expenses for applications, games, or hardware which we do not own comes out
|
||||
of pocket. In order to alleviate these expenses, we are now accepting donations.
|
||||
This in turn allows us to continue to perform testing, provide fixes, and get
|
||||
them upstreamed, ultimately aiming to provide a better experience for all WINE
|
||||
users. All of our work is provided publicly for free and can be found at
|
||||
<https://github.com/wine-staging/wine-staging>. We do not expect to be paid for
|
||||
any of the work provided, nor will donators receive any special benefits or
|
||||
compensation.
|
||||
|
||||
Donations are recieved through Patreon. Anyone interested may donate here:
|
||||
|
||||
https://www.patreon.com/winestaging
|
@@ -1,4 +1,4 @@
|
||||
From 7529755fcc41fda650aac6b27f34438354435d34 Mon Sep 17 00:00:00 2001
|
||||
From b51fdc7e211f676d169c937209bf689e57252c5d Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 21:58:40 +0100
|
||||
Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] dwrite: Avoid implicit cast of interface pointer.
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
|
||||
index 9280b5d32..2f0974a4c 100644
|
||||
index aa51c744297..7cad015480f 100644
|
||||
--- a/dlls/dwrite/font.c
|
||||
+++ b/dlls/dwrite/font.c
|
||||
@@ -1887,7 +1887,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
|
||||
@@ -2130,7 +2130,7 @@ static struct dwrite_font *unsafe_impl_from_IDWriteFont(IDWriteFont *iface)
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (IDWriteFontVtbl*)&dwritefontvtbl);
|
||||
@@ -21,7 +21,7 @@ index 9280b5d32..2f0974a4c 100644
|
||||
}
|
||||
|
||||
struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
|
||||
@@ -1895,7 +1895,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
|
||||
@@ -2138,7 +2138,7 @@ struct dwrite_fontface *unsafe_impl_from_IDWriteFontFace(IDWriteFontFace *iface)
|
||||
if (!iface)
|
||||
return NULL;
|
||||
assert(iface->lpVtbl == (IDWriteFontFaceVtbl*)&dwritefontfacevtbl);
|
||||
@@ -31,10 +31,10 @@ index 9280b5d32..2f0974a4c 100644
|
||||
|
||||
static struct dwrite_fontfacereference *unsafe_impl_from_IDWriteFontFaceReference(IDWriteFontFaceReference *iface)
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index b9321157a..76ea23ba6 100644
|
||||
index 1f6201a6a93..35791d5c22e 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -5895,7 +5895,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
|
||||
@@ -5886,7 +5886,7 @@ static const IDWriteTextFormat3Vtbl dwritetextformatvtbl =
|
||||
static struct dwrite_textformat *unsafe_impl_from_IDWriteTextFormat(IDWriteTextFormat *iface)
|
||||
{
|
||||
return (iface->lpVtbl == (IDWriteTextFormatVtbl*)&dwritetextformatvtbl) ?
|
||||
@@ -42,7 +42,7 @@ index b9321157a..76ea23ba6 100644
|
||||
+ CONTAINING_RECORD((IDWriteTextFormat3 *)iface, struct dwrite_textformat, IDWriteTextFormat3_iface) : NULL;
|
||||
}
|
||||
|
||||
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STYLE style,
|
||||
HRESULT create_textformat(const WCHAR *family_name, IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight,
|
||||
--
|
||||
2.24.0
|
||||
2.29.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 494fc3abe1eddabcf7cede677ee907284e89eea8 Mon Sep 17 00:00:00 2001
|
||||
From a349cc8bdcc3a083ea507dbbdeba9053e3a338e4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 22 Mar 2016 23:08:30 +0100
|
||||
Subject: [PATCH] include: Check element type in CONTAINING_RECORD and similar
|
||||
@@ -11,7 +11,7 @@ Subject: [PATCH] include: Check element type in CONTAINING_RECORD and similar
|
||||
3 files changed, 24 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/wine/list.h b/include/wine/list.h
|
||||
index b4d681fe..287ad394 100644
|
||||
index b4d681fe0f3..287ad394fae 100644
|
||||
--- a/include/wine/list.h
|
||||
+++ b/include/wine/list.h
|
||||
@@ -228,7 +228,13 @@ static inline void list_move_head( struct list *dst, struct list *src )
|
||||
@@ -31,7 +31,7 @@ index b4d681fe..287ad394 100644
|
||||
|
||||
#endif /* __WINE_SERVER_LIST_H */
|
||||
diff --git a/include/wine/rbtree.h b/include/wine/rbtree.h
|
||||
index dc50b5e7..8130deb5 100644
|
||||
index 8aae29c8c10..330b3e8fbc9 100644
|
||||
--- a/include/wine/rbtree.h
|
||||
+++ b/include/wine/rbtree.h
|
||||
@@ -23,8 +23,14 @@
|
||||
@@ -52,10 +52,10 @@ index dc50b5e7..8130deb5 100644
|
||||
struct wine_rb_entry
|
||||
{
|
||||
diff --git a/include/winnt.h b/include/winnt.h
|
||||
index 2b489382..a156efc4 100644
|
||||
index 46e17c546a7..d5c65d2017b 100644
|
||||
--- a/include/winnt.h
|
||||
+++ b/include/winnt.h
|
||||
@@ -760,8 +760,14 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
||||
@@ -793,8 +793,14 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
||||
#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
|
||||
#define RTL_SIZEOF_THROUGH_FIELD(type, field) (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field))
|
||||
|
||||
@@ -70,8 +70,8 @@ index 2b489382..a156efc4 100644
|
||||
+ ((type *)((PCHAR)(address) - offsetof(type, field)))
|
||||
+#endif
|
||||
|
||||
#define ARRAYSIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
#ifdef __WINESRC__
|
||||
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
--
|
||||
2.20.1
|
||||
2.26.2
|
||||
|
||||
|
@@ -1,41 +1,60 @@
|
||||
From 9e585de1f2f28e1ef18c1edca875779c491375cb Mon Sep 17 00:00:00 2001
|
||||
From 0cf6433af95363c5fbba2af482b2ba50b863dfb7 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:44:31 +0200
|
||||
Subject: [PATCH] kernel32: Add winediag message to show warning, that this
|
||||
isn't vanilla wine.
|
||||
Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
branch name and version.
|
||||
|
||||
---
|
||||
dlls/kernel32/process.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
dlls/ntdll/loader.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
|
||||
index 36ed82bff8c..b8a677c5485 100644
|
||||
--- a/dlls/kernel32/process.c
|
||||
+++ b/dlls/kernel32/process.c
|
||||
@@ -65,6 +65,7 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(process);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 20bc3f977d1..c2187a19397 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -44,6 +44,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(snoop);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(loaddll);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(imports);
|
||||
+WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||
|
||||
typedef struct
|
||||
#ifdef _WIN64
|
||||
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
|
||||
@@ -3456,6 +3457,7 @@ static void process_breakpoint(void)
|
||||
__ENDTRY
|
||||
}
|
||||
|
||||
+extern const char * CDECL wine_get_version(void);
|
||||
|
||||
/******************************************************************
|
||||
* LdrInitializeThunk (NTDLL.@)
|
||||
@@ -3465,6 +3467,9 @@ static void process_breakpoint(void)
|
||||
*/
|
||||
void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR unknown3, ULONG_PTR unknown4 )
|
||||
{
|
||||
@@ -997,6 +998,15 @@ void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb )
|
||||
+ OBJECT_ATTRIBUTES staging_event_attr;
|
||||
+ UNICODE_STRING staging_event_string;
|
||||
+ HANDLE staging_event;
|
||||
static int attach_done;
|
||||
int i;
|
||||
NTSTATUS status;
|
||||
@@ -3483,6 +3488,16 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
|
||||
entry = (void **)&context->u.s.X0;
|
||||
#endif
|
||||
|
||||
__TRY
|
||||
{
|
||||
+ if (CreateEventA(0, 0, 0, "__winestaging_warn_event") && GetLastError() != ERROR_ALREADY_EXISTS)
|
||||
+ {
|
||||
+ FIXME_(winediag)("Wine Staging %s is a testing version containing experimental patches.\n", wine_get_version());
|
||||
+ FIXME_(winediag)("Please mention your exact version when filing bug reports on winehq.org.\n");
|
||||
+ }
|
||||
+ else
|
||||
+ WARN_(winediag)("Wine Staging %s is a testing version containing experimental patches.\n", wine_get_version());
|
||||
+ RtlInitUnicodeString( &staging_event_string, L"\\__wine_staging_warn_event" );
|
||||
+ InitializeObjectAttributes( &staging_event_attr, &staging_event_string, OBJ_OPENIF, NULL, NULL );
|
||||
+ if (NtCreateEvent( &staging_event, EVENT_ALL_ACCESS, &staging_event_attr, NotificationEvent, FALSE ) == STATUS_SUCCESS)
|
||||
+ {
|
||||
+ FIXME_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version());
|
||||
+ FIXME_(winediag)("Please mention your exact version when filing bug reports on winehq.org.\n");
|
||||
+ }
|
||||
+ else
|
||||
+ WARN_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version());
|
||||
+
|
||||
+
|
||||
if (!CheckRemoteDebuggerPresent( GetCurrentProcess(), &being_debugged ))
|
||||
being_debugged = FALSE;
|
||||
if (process_detaching) NtTerminateThread( GetCurrentThread(), 0 );
|
||||
|
||||
RtlEnterCriticalSection( &loader_section );
|
||||
--
|
||||
2.23.0
|
||||
2.28.0
|
||||
|
||||
|
@@ -1,25 +1,35 @@
|
||||
From 05ca39b029f8f710ca53aeafc36384fd39fd6b89 Mon Sep 17 00:00:00 2001
|
||||
From ce5e1fc75139e4de9d92dfe27b4a513a96da013c Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:53:46 +0200
|
||||
Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string.
|
||||
|
||||
---
|
||||
libs/wine/Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
Makefile.in | 2 +-
|
||||
dlls/ntdll/Makefile.in | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in
|
||||
index 4833eb5..3cfa4f4 100644
|
||||
--- a/libs/wine/Makefile.in
|
||||
+++ b/libs/wine/Makefile.in
|
||||
@@ -31,7 +31,7 @@ libwine_LDFLAGS = $(LIBWINE_LDFLAGS)
|
||||
libwine_DEPS = $(LIBWINE_DEPENDS)
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 307a95b3b1a..61019fed949 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -116,7 +116,7 @@ install-manpages:: manpages
|
||||
# Rules for generated source files
|
||||
|
||||
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 -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)
|
||||
dlls/ntdll/unix/version.c: dummy
|
||||
- @version=`(GIT_DIR=$(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=$(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
|
||||
programs/winetest/build.rc: dummy
|
||||
@build="STRINGTABLE { 1 \"`GIT_DIR=$(srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || (rm -f $@ && exit 1)
|
||||
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
|
||||
index f39ffb42c6f..67847bb9392 100644
|
||||
--- a/dlls/ntdll/Makefile.in
|
||||
+++ b/dlls/ntdll/Makefile.in
|
||||
@@ -79,3 +79,4 @@ unix_loader_EXTRADEFS = \
|
||||
-DBINDIR=\"${bindir}\" \
|
||||
-DDLL_TO_BINDIR=\"`${MAKEDEP} -R ${dlldir} ${bindir}`\" \
|
||||
-DBIN_TO_DATADIR=\"`${MAKEDEP} -R ${bindir} ${datadir}/wine`\"
|
||||
+
|
||||
--
|
||||
1.9.1
|
||||
2.28.0
|
||||
|
||||
|
@@ -1,150 +0,0 @@
|
||||
From fa73044dd60bae90b9a5ec850205a07579d4db17 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 29 May 2014 23:43:45 +0200
|
||||
Subject: [PATCH] loader: Add commandline option --patches to show the patch
|
||||
list.
|
||||
|
||||
---
|
||||
dlls/ntdll/misc.c | 8 ++++++++
|
||||
dlls/ntdll/ntdll.spec | 1 +
|
||||
include/wine/library.h | 1 +
|
||||
libs/wine/config.c | 6 ++++++
|
||||
libs/wine/wine.map | 1 +
|
||||
loader/main.c | 42 +++++++++++++++++++++++++++++++++++++++++-
|
||||
6 files changed, 58 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
|
||||
index bb75d9c..21e2db6 100644
|
||||
--- a/dlls/ntdll/misc.c
|
||||
+++ b/dlls/ntdll/misc.c
|
||||
@@ -61,6 +61,14 @@ const char * CDECL NTDLL_wine_get_version(void)
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
+ * wine_get_patches (NTDLL.@)
|
||||
+ */
|
||||
+const void * CDECL NTDLL_wine_get_patches(void)
|
||||
+{
|
||||
+ return wine_get_patches();
|
||||
+}
|
||||
+
|
||||
+/*********************************************************************
|
||||
* wine_get_build_id (NTDLL.@)
|
||||
*/
|
||||
const char * CDECL NTDLL_wine_get_build_id(void)
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 292b0f6..fb45a94 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1516,6 +1516,7 @@
|
||||
|
||||
# Version
|
||||
@ cdecl wine_get_version() NTDLL_wine_get_version
|
||||
+@ cdecl wine_get_patches() NTDLL_wine_get_patches
|
||||
@ cdecl wine_get_build_id() NTDLL_wine_get_build_id
|
||||
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
|
||||
|
||||
diff --git a/include/wine/library.h b/include/wine/library.h
|
||||
index 242bb69..fae73fe 100644
|
||||
--- a/include/wine/library.h
|
||||
+++ b/include/wine/library.h
|
||||
@@ -43,6 +43,7 @@ extern const char *wine_get_data_dir(void);
|
||||
extern const char *wine_get_server_dir(void);
|
||||
extern const char *wine_get_user_name(void);
|
||||
extern const char *wine_get_version(void);
|
||||
+extern const void *wine_get_patches(void);
|
||||
extern const char *wine_get_build_id(void);
|
||||
extern void wine_init_argv0_path( const char *argv0 );
|
||||
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
|
||||
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
||||
index 3c9110b..5da6263 100644
|
||||
--- a/libs/wine/config.c
|
||||
+++ b/libs/wine/config.c
|
||||
@@ -522,6 +522,12 @@ const char *wine_get_version(void)
|
||||
return PACKAGE_VERSION;
|
||||
}
|
||||
|
||||
+/* return the applied non-standard patches */
|
||||
+const void *wine_get_patches(void)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
/* return the build id string */
|
||||
const char *wine_get_build_id(void)
|
||||
{
|
||||
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
|
||||
index 2159fac..7cb2918 100644
|
||||
--- a/libs/wine/wine.map
|
||||
+++ b/libs/wine/wine.map
|
||||
@@ -90,6 +90,7 @@ WINE_1.0
|
||||
wine_get_ss;
|
||||
wine_get_user_name;
|
||||
wine_get_version;
|
||||
+ wine_get_patches;
|
||||
wine_init;
|
||||
wine_init_argv0_path;
|
||||
wine_is_dbcs_leadbyte;
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index f197cf8..f662912 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -54,7 +54,8 @@ static void check_command_line( int argc, char *argv[] )
|
||||
static const char usage[] =
|
||||
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
|
||||
" wine --help Display this help and exit\n"
|
||||
- " wine --version Output version information and exit";
|
||||
+ " wine --version Output version information and exit\n"
|
||||
+ " wine --patches Output patch information and exit";
|
||||
|
||||
if (argc <= 1)
|
||||
{
|
||||
@@ -71,6 +72,45 @@ static void check_command_line( int argc, char *argv[] )
|
||||
printf( "%s\n", wine_get_build_id() );
|
||||
exit(0);
|
||||
}
|
||||
+ if (!strcmp( argv[1], "--patches" ))
|
||||
+ {
|
||||
+ const struct
|
||||
+ {
|
||||
+ const char *author;
|
||||
+ const char *subject;
|
||||
+ int revision;
|
||||
+ }
|
||||
+ *next, *cur = wine_get_patches();
|
||||
+
|
||||
+ if (!cur)
|
||||
+ {
|
||||
+ fprintf( stderr, "Patchlist not available.\n" );
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
+ while (cur->author)
|
||||
+ {
|
||||
+ next = cur + 1;
|
||||
+ while (next->author)
|
||||
+ {
|
||||
+ if (strcmp( cur->author, next->author )) break;
|
||||
+ next++;
|
||||
+ }
|
||||
+
|
||||
+ printf( "%s (%d):\n", cur->author, (int)(next - cur) );
|
||||
+ while (cur < next)
|
||||
+ {
|
||||
+ printf( " %s", cur->subject );
|
||||
+ if (cur->revision != 1)
|
||||
+ printf( " [rev %d]", cur->revision );
|
||||
+ printf( "\n" );
|
||||
+ cur++;
|
||||
+ }
|
||||
+ printf( "\n" );
|
||||
+ }
|
||||
+
|
||||
+ exit(0);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1,313 +0,0 @@
|
||||
From 540ee9ebdee96f7c67224bfae699375c8cb4c90c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 28 May 2014 19:50:51 +0200
|
||||
Subject: [PATCH] loader: Add commandline option --check-libs.
|
||||
|
||||
---
|
||||
include/wine/library.h | 2 +
|
||||
libs/wine/config.c | 124 +++++++++++++++++++++++++++++++++++++++++
|
||||
libs/wine/loader.c | 36 ++++++++++++
|
||||
libs/wine/wine.map | 2 +
|
||||
loader/main.c | 50 ++++++++++++++++-
|
||||
5 files changed, 213 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/wine/library.h b/include/wine/library.h
|
||||
index 511bf4722a0..557cec20cf8 100644
|
||||
--- a/include/wine/library.h
|
||||
+++ b/include/wine/library.h
|
||||
@@ -44,6 +44,7 @@ extern "C" {
|
||||
extern const char *wine_get_build_dir(void);
|
||||
extern const char *wine_get_config_dir(void);
|
||||
extern const char *wine_get_data_dir(void);
|
||||
+extern const char **wine_get_libs(void);
|
||||
extern const char *wine_get_server_dir(void);
|
||||
extern const char *wine_get_user_name(void);
|
||||
extern const char *wine_get_version(void);
|
||||
@@ -56,6 +57,7 @@ extern void wine_exec_wine_binary( const char *name, char **argv, const char *en
|
||||
|
||||
typedef void (*load_dll_callback_t)( void *, const char * );
|
||||
|
||||
+extern int wine_dladdr( void *addr, void *info, char *error, size_t errorsize );
|
||||
extern void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize );
|
||||
extern void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize );
|
||||
extern int wine_dlclose( void *handle, char *error, size_t errorsize );
|
||||
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
||||
index 5b66c063db6..e0988513e14 100644
|
||||
--- a/libs/wine/config.c
|
||||
+++ b/libs/wine/config.c
|
||||
@@ -470,6 +470,130 @@ const char *wine_get_build_dir(void)
|
||||
return build_dir;
|
||||
}
|
||||
|
||||
+const char *wine_libs[] = {
|
||||
+#ifdef SONAME_LIBCAIRO
|
||||
+ SONAME_LIBCAIRO,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBCAPI20
|
||||
+ SONAME_LIBCAPI20,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBCUPS
|
||||
+ SONAME_LIBCUPS,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBCURSES
|
||||
+ SONAME_LIBCURSES,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBDBUS_1
|
||||
+ SONAME_LIBDBUS_1,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBFONTCONFIG
|
||||
+ SONAME_LIBFONTCONFIG,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBFREETYPE
|
||||
+ SONAME_LIBFREETYPE,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBGL
|
||||
+ SONAME_LIBGL,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBGNUTLS
|
||||
+ SONAME_LIBGNUTLS,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBGOBJECT_2_0
|
||||
+ SONAME_LIBGOBJECT_2_0,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBGSM
|
||||
+ SONAME_LIBGSM,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBGTK_3
|
||||
+ SONAME_LIBGTK_3,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBHAL
|
||||
+ SONAME_LIBHAL,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBJPEG
|
||||
+ SONAME_LIBJPEG,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBNCURSES
|
||||
+ SONAME_LIBNCURSES,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBNETAPI
|
||||
+ SONAME_LIBNETAPI,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBODBC
|
||||
+ SONAME_LIBODBC,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBOSMESA
|
||||
+ SONAME_LIBOSMESA,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBPCAP
|
||||
+ SONAME_LIBPCAP,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBPNG
|
||||
+ SONAME_LIBPNG,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBSANE
|
||||
+ SONAME_LIBSANE,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBTIFF
|
||||
+ SONAME_LIBTIFF,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBTXC_DXTN
|
||||
+ SONAME_LIBTXC_DXTN,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBV4L1
|
||||
+ SONAME_LIBV4L1,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBVA
|
||||
+ SONAME_LIBVA,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBVA_DRM
|
||||
+ SONAME_LIBVA_DRM,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBVA_X11
|
||||
+ SONAME_LIBVA_X11,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBX11
|
||||
+ SONAME_LIBX11,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBX11_XCB
|
||||
+ SONAME_LIBX11_XCB,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXCOMPOSITE
|
||||
+ SONAME_LIBXCOMPOSITE,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXCURSOR
|
||||
+ SONAME_LIBXCURSOR,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXEXT
|
||||
+ SONAME_LIBXEXT,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXI
|
||||
+ SONAME_LIBXI,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXINERAMA
|
||||
+ SONAME_LIBXINERAMA,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXRANDR
|
||||
+ SONAME_LIBXRANDR,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXRENDER
|
||||
+ SONAME_LIBXRENDER,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXSLT
|
||||
+ SONAME_LIBXSLT,
|
||||
+#endif
|
||||
+#ifdef SONAME_LIBXXF86VM
|
||||
+ SONAME_LIBXXF86VM,
|
||||
+#endif
|
||||
+ NULL
|
||||
+};
|
||||
+
|
||||
+/* return the list of shared libs used by wine */
|
||||
+const char **wine_get_libs(void)
|
||||
+{
|
||||
+ return &wine_libs[0];
|
||||
+}
|
||||
+
|
||||
/* return the full name of the server directory (the one containing the socket) */
|
||||
const char *wine_get_server_dir(void)
|
||||
{
|
||||
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
|
||||
index 2a569f5b739..5f10c3f9d3e 100644
|
||||
--- a/libs/wine/loader.c
|
||||
+++ b/libs/wine/loader.c
|
||||
@@ -1072,6 +1072,42 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/***********************************************************************
|
||||
+ * wine_dladdr
|
||||
+ */
|
||||
+int wine_dladdr( void *addr, void *info, char *error, size_t errorsize )
|
||||
+{
|
||||
+#ifdef HAVE_DLADDR
|
||||
+ int ret;
|
||||
+ const char *s;
|
||||
+ dlerror(); dlerror();
|
||||
+ ret = dladdr( addr, (Dl_info *)info );
|
||||
+ s = dlerror();
|
||||
+ if (error && errorsize)
|
||||
+ {
|
||||
+ if (s)
|
||||
+ {
|
||||
+ size_t len = strlen(s);
|
||||
+ if (len >= errorsize) len = errorsize - 1;
|
||||
+ memcpy( error, s, len );
|
||||
+ error[len] = 0;
|
||||
+ }
|
||||
+ else error[0] = 0;
|
||||
+ }
|
||||
+ dlerror();
|
||||
+ return ret;
|
||||
+#else
|
||||
+ if (error)
|
||||
+ {
|
||||
+ static const char msg[] = "dladdr interface not detected by configure";
|
||||
+ size_t len = min( errorsize, sizeof(msg) );
|
||||
+ memcpy( error, msg, len );
|
||||
+ error[len - 1] = 0;
|
||||
+ }
|
||||
+ return 0;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* wine_dlsym
|
||||
*/
|
||||
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
|
||||
index 5edee0d9235..8e3382168d5 100644
|
||||
--- a/libs/wine/wine.map
|
||||
+++ b/libs/wine/wine.map
|
||||
@@ -16,6 +16,7 @@ WINE_1.0
|
||||
wine_cp_wcstombs;
|
||||
wine_cpsymbol_mbstowcs;
|
||||
wine_cpsymbol_wcstombs;
|
||||
+ wine_dladdr;
|
||||
wine_dlclose;
|
||||
wine_dll_enum_load_path;
|
||||
wine_dll_set_callback;
|
||||
@@ -32,6 +33,7 @@ WINE_1.0
|
||||
wine_get_es;
|
||||
wine_get_fs;
|
||||
wine_get_gs;
|
||||
+ wine_get_libs;
|
||||
wine_get_server_dir;
|
||||
wine_get_sortkey;
|
||||
wine_get_ss;
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index f6629128de1..a2dc40c51cc 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -36,6 +36,12 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
+#ifdef HAVE_DLADDR
|
||||
+# include <dlfcn.h>
|
||||
+#endif
|
||||
+#ifdef HAVE_LINK_H
|
||||
+# include <link.h>
|
||||
+#endif
|
||||
#include <pthread.h>
|
||||
|
||||
#include "wine/library.h"
|
||||
@@ -55,7 +61,8 @@ static void check_command_line( int argc, char *argv[] )
|
||||
"Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n"
|
||||
" wine --help Display this help and exit\n"
|
||||
" wine --version Output version information and exit\n"
|
||||
- " wine --patches Output patch information and exit";
|
||||
+ " wine --patches Output patch information and exit\n"
|
||||
+ " wine --check-libs Checks if shared libs are installed";
|
||||
|
||||
if (argc <= 1)
|
||||
{
|
||||
@@ -111,6 +118,47 @@ static void check_command_line( int argc, char *argv[] )
|
||||
|
||||
exit(0);
|
||||
}
|
||||
+ if (!strcmp( argv[1], "--check-libs" ))
|
||||
+ {
|
||||
+ void* lib_handle;
|
||||
+ int ret = 0;
|
||||
+ const char **wine_libs = wine_get_libs();
|
||||
+
|
||||
+ for(; *wine_libs; wine_libs++)
|
||||
+ {
|
||||
+ lib_handle = wine_dlopen( *wine_libs, RTLD_NOW, NULL, 0 );
|
||||
+ if (lib_handle)
|
||||
+ {
|
||||
+ #ifdef HAVE_DLADDR
|
||||
+ Dl_info libinfo;
|
||||
+ void* symbol;
|
||||
+
|
||||
+ #ifdef HAVE_LINK_H
|
||||
+ struct link_map *lm = (struct link_map *)lib_handle;
|
||||
+ symbol = (void *)lm->l_addr;
|
||||
+ #else
|
||||
+ symbol = wine_dlsym( lib_handle, "_init", NULL, 0 );
|
||||
+ #endif
|
||||
+ if (symbol && wine_dladdr( symbol, &libinfo, NULL, 0 ))
|
||||
+ {
|
||||
+ printf( "%s: %s\n", *wine_libs, libinfo.dli_fname );
|
||||
+ }
|
||||
+ else
|
||||
+ #endif
|
||||
+ {
|
||||
+ printf( "%s: found\n", *wine_libs );
|
||||
+ }
|
||||
+ wine_dlclose( lib_handle, NULL, 0 );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ printf( "%s: missing\n", *wine_libs );
|
||||
+ ret = 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ exit(ret);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,60 +0,0 @@
|
||||
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 | 30 +++++++++++++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index a2dc40c51c..1642fb0965 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -50,6 +50,30 @@
|
||||
/* the preloader will set this variable */
|
||||
const struct wine_preload_info *wine_main_preload_info = NULL;
|
||||
|
||||
+#ifdef __APPLE__
|
||||
+#include <mach-o/dyld.h>
|
||||
+
|
||||
+static const char *get_macho_library_path( const char *libname )
|
||||
+{
|
||||
+ unsigned int path_len, libname_len = strlen( libname );
|
||||
+ uint32_t i, count = _dyld_image_count();
|
||||
+
|
||||
+ for (i = 0; i < count; i++)
|
||||
+ {
|
||||
+ const char *path = _dyld_get_image_name( i );
|
||||
+ if (!path) continue;
|
||||
+
|
||||
+ path_len = strlen( path );
|
||||
+ if (path_len < libname_len + 1) continue;
|
||||
+ if (path[path_len - libname_len - 1] != '/') continue;
|
||||
+ if (strcmp( path + path_len - libname_len, libname )) continue;
|
||||
+
|
||||
+ return path;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/***********************************************************************
|
||||
* check_command_line
|
||||
*
|
||||
@@ -146,7 +170,11 @@ static void check_command_line( int argc, char *argv[] )
|
||||
else
|
||||
#endif
|
||||
{
|
||||
- printf( "%s: found\n", *wine_libs );
|
||||
+ const char *path = NULL;
|
||||
+ #ifdef __APPLE__
|
||||
+ path = get_macho_library_path( *wine_libs );
|
||||
+ #endif
|
||||
+ printf( "%s: %s\n", *wine_libs, path ? path : "found");
|
||||
}
|
||||
wine_dlclose( lib_handle, NULL, 0 );
|
||||
}
|
||||
--
|
||||
2.14.1
|
||||
|
1
patches/Staging/definition
Normal file
1
patches/Staging/definition
Normal file
@@ -0,0 +1 @@
|
||||
#Depends: ntdll-NtAlertThreadByThreadId
|
@@ -1,83 +0,0 @@
|
||||
From e5500b9a3c7d36563725dc7975c2436a02165906 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 15 Nov 2019 15:46:23 +0800
|
||||
Subject: [PATCH] include: Add adserr.h.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
include/Makefile.in | 1 +
|
||||
include/adserr.h | 50 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 51 insertions(+)
|
||||
create mode 100644 include/adserr.h
|
||||
|
||||
diff --git a/include/Makefile.in b/include/Makefile.in
|
||||
index cbad4d604f..2e0a10d650 100644
|
||||
--- a/include/Makefile.in
|
||||
+++ b/include/Makefile.in
|
||||
@@ -7,6 +7,7 @@ SOURCES = \
|
||||
activaut.idl \
|
||||
activdbg.idl \
|
||||
activscp.idl \
|
||||
+ adserr.h \
|
||||
adshlp.h \
|
||||
advpub.h \
|
||||
af_irda.h \
|
||||
diff --git a/include/adserr.h b/include/adserr.h
|
||||
new file mode 100644
|
||||
index 0000000000..83da568763
|
||||
--- /dev/null
|
||||
+++ b/include/adserr.h
|
||||
@@ -0,0 +1,50 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2019 Dmitry Timoshkov
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#ifndef __ADSERR_H
|
||||
+#define __ADSERR_H
|
||||
+
|
||||
+#ifdef RC_INVOKED
|
||||
+#define _HRESULT_TYPEDEF_(x) (x)
|
||||
+#else
|
||||
+#define _HRESULT_TYPEDEF_(x) ((HRESULT)x)
|
||||
+#endif
|
||||
+
|
||||
+#define E_ADS_BAD_PATHNAME _HRESULT_TYPEDEF_(0x80005000)
|
||||
+#define E_ADS_INVALID_DOMAIN_OBJECT _HRESULT_TYPEDEF_(0x80005001)
|
||||
+#define E_ADS_INVALID_USER_OBJECT _HRESULT_TYPEDEF_(0x80005002)
|
||||
+#define E_ADS_INVALID_COMPUTER_OBJECT _HRESULT_TYPEDEF_(0x80005003)
|
||||
+#define E_ADS_UNKNOWN_OBJECT _HRESULT_TYPEDEF_(0x80005004)
|
||||
+#define E_ADS_PROPERTY_NOT_SET _HRESULT_TYPEDEF_(0x80005005)
|
||||
+#define E_ADS_PROPERTY_NOT_SUPPORTED _HRESULT_TYPEDEF_(0x80005006)
|
||||
+#define E_ADS_PROPERTY_INVALID _HRESULT_TYPEDEF_(0x80005007)
|
||||
+#define E_ADS_BAD_PARAMETER _HRESULT_TYPEDEF_(0x80005008)
|
||||
+#define E_ADS_OBJECT_UNBOUND _HRESULT_TYPEDEF_(0x80005009)
|
||||
+#define E_ADS_PROPERTY_NOT_MODIFIED _HRESULT_TYPEDEF_(0x8000500A)
|
||||
+#define E_ADS_PROPERTY_MODIFIED _HRESULT_TYPEDEF_(0x8000500B)
|
||||
+#define E_ADS_CANT_CONVERT_DATATYPE _HRESULT_TYPEDEF_(0x8000500C)
|
||||
+#define E_ADS_PROPERTY_NOT_FOUND _HRESULT_TYPEDEF_(0x8000500D)
|
||||
+#define E_ADS_OBJECT_EXISTS _HRESULT_TYPEDEF_(0x8000500E)
|
||||
+#define E_ADS_SCHEMA_VIOLATION _HRESULT_TYPEDEF_(0x8000500F)
|
||||
+#define E_ADS_COLUMN_NOT_SET _HRESULT_TYPEDEF_(0x80005010)
|
||||
+#define S_ADS_ERRORSOCCURRED _HRESULT_TYPEDEF_(0x00005011)
|
||||
+#define S_ADS_NOMORE_ROWS _HRESULT_TYPEDEF_(0x00005012)
|
||||
+#define S_ADS_NOMORE_COLUMNS _HRESULT_TYPEDEF_(0x00005013)
|
||||
+#define E_ADS_INVALID_FILTER _HRESULT_TYPEDEF_(0x80005014)
|
||||
+
|
||||
+#endif /* __ADSERR_H */
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,161 +0,0 @@
|
||||
From c12e335b0df736fe2a2f2447d0d751de7cc21d37 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 15 Nov 2019 17:37:11 +0800
|
||||
Subject: [PATCH 2/5] activeds: Implement ADsOpenObject.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/activeds/Makefile.in | 1 +
|
||||
dlls/activeds/activeds_main.c | 80 +++++++++++++++++++++++++++++++++--
|
||||
include/iads.idl | 14 ++++++
|
||||
3 files changed, 91 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/activeds/Makefile.in b/dlls/activeds/Makefile.in
|
||||
index 20578a93bc..54f86d661e 100644
|
||||
--- a/dlls/activeds/Makefile.in
|
||||
+++ b/dlls/activeds/Makefile.in
|
||||
@@ -1,5 +1,6 @@
|
||||
MODULE = activeds.dll
|
||||
IMPORTLIB = activeds
|
||||
+IMPORTS = advapi32 ole32 oleaut32
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
diff --git a/dlls/activeds/activeds_main.c b/dlls/activeds/activeds_main.c
|
||||
index 69c5c447dc..8ff587e332 100644
|
||||
--- a/dlls/activeds/activeds_main.c
|
||||
+++ b/dlls/activeds/activeds_main.c
|
||||
@@ -2,6 +2,7 @@
|
||||
* Implementation of the Active Directory Service Interface
|
||||
*
|
||||
* Copyright 2005 Detlef Riekenberg
|
||||
+ * Copyright 2019 Dmitry Timoshkov
|
||||
*
|
||||
* This file contains only stubs to get the printui.dll up and running
|
||||
* activeds.dll is much much more than this
|
||||
@@ -30,8 +31,10 @@
|
||||
#include "winuser.h"
|
||||
|
||||
#include "objbase.h"
|
||||
+#include "initguid.h"
|
||||
#include "iads.h"
|
||||
#include "adshlp.h"
|
||||
+#include "adserr.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
|
||||
@@ -112,11 +115,80 @@ HRESULT WINAPI ADsBuildVarArrayInt(LPDWORD lpdwObjectTypes, DWORD dwObjectTypes,
|
||||
/*****************************************************
|
||||
* ADsOpenObject [ACTIVEDS.9]
|
||||
*/
|
||||
-HRESULT WINAPI ADsOpenObject(LPCWSTR lpszPathName, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwReserved, REFIID riid, VOID** ppObject)
|
||||
+HRESULT WINAPI ADsOpenObject(LPCWSTR path, LPCWSTR user, LPCWSTR password, DWORD reserved, REFIID riid, void **obj)
|
||||
{
|
||||
- FIXME("(%s,%s,%u,%s,%p)!stub\n", debugstr_w(lpszPathName),
|
||||
- debugstr_w(lpszUserName), dwReserved, debugstr_guid(riid), ppObject);
|
||||
- return E_NOTIMPL;
|
||||
+ HRESULT hr;
|
||||
+ HKEY hkey, hprov;
|
||||
+ WCHAR provider[MAX_PATH], progid[MAX_PATH];
|
||||
+ DWORD idx = 0;
|
||||
+
|
||||
+ TRACE("(%s,%s,%u,%s,%p)\n", debugstr_w(path), debugstr_w(user), reserved, debugstr_guid(riid), obj);
|
||||
+
|
||||
+ if (!path || !riid || !obj)
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\ADs\\Providers", 0, KEY_READ, &hkey))
|
||||
+ return E_ADS_BAD_PATHNAME;
|
||||
+
|
||||
+ hr = E_ADS_BAD_PATHNAME;
|
||||
+
|
||||
+ for (;;)
|
||||
+ {
|
||||
+ if (RegEnumKeyW(hkey, idx++, provider, ARRAY_SIZE(provider)))
|
||||
+ break;
|
||||
+
|
||||
+ TRACE("provider %s\n", debugstr_w(provider));
|
||||
+
|
||||
+ if (!wcsnicmp(path, provider, wcslen(provider)) && path[wcslen(provider)] == ':')
|
||||
+ {
|
||||
+ LONG size;
|
||||
+
|
||||
+ if (RegOpenKeyExW(hkey, provider, 0, KEY_READ, &hprov))
|
||||
+ break;
|
||||
+
|
||||
+ size = ARRAY_SIZE(progid);
|
||||
+ if (!RegQueryValueW(hprov, NULL, progid, &size))
|
||||
+ {
|
||||
+ CLSID clsid;
|
||||
+
|
||||
+ if (CLSIDFromProgID(progid, &clsid) == S_OK)
|
||||
+ {
|
||||
+ IADsOpenDSObject *adsopen;
|
||||
+ IDispatch *disp;
|
||||
+
|
||||
+ TRACE("ns %s => clsid %s\n", debugstr_w(progid), wine_dbgstr_guid(&clsid));
|
||||
+ if (CoCreateInstance(&clsid, 0, CLSCTX_INPROC_SERVER, &IID_IADsOpenDSObject, (void **)&adsopen) == S_OK)
|
||||
+ {
|
||||
+ BSTR bpath, buser, bpassword;
|
||||
+
|
||||
+ bpath = SysAllocString(path);
|
||||
+ buser = SysAllocString(user);
|
||||
+ bpassword = SysAllocString(password);
|
||||
+
|
||||
+ hr = IADsOpenDSObject_OpenDSObject(adsopen, bpath, buser, bpassword, reserved, &disp);
|
||||
+ if (hr == S_OK)
|
||||
+ {
|
||||
+ hr = IDispatch_QueryInterface(disp, riid, obj);
|
||||
+ IDispatch_Release(disp);
|
||||
+ }
|
||||
+
|
||||
+ SysFreeString(bpath);
|
||||
+ SysFreeString(buser);
|
||||
+ SysFreeString(bpassword);
|
||||
+
|
||||
+ IADsOpenDSObject_Release(adsopen);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ RegCloseKey(hprov);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ RegCloseKey(hkey);
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
diff --git a/include/iads.idl b/include/iads.idl
|
||||
index 6931b6f734..add52571c7 100644
|
||||
--- a/include/iads.idl
|
||||
+++ b/include/iads.idl
|
||||
@@ -794,6 +794,20 @@ interface IDirectorySearch : IUnknown
|
||||
HRESULT CloseSearchHandle([in] ADS_SEARCH_HANDLE hSearchResult);
|
||||
}
|
||||
|
||||
+/*****************************************************************************
|
||||
+ * IID_IADsOpenDSObject interface
|
||||
+ */
|
||||
+[
|
||||
+ odl,
|
||||
+ uuid(ddf2891e-0f9c-11d0-8ad4-00c04fd8d503),
|
||||
+ dual,
|
||||
+ oleautomation
|
||||
+]
|
||||
+interface IADsOpenDSObject : IDispatch
|
||||
+{
|
||||
+ HRESULT OpenDSObject([in] BSTR path, [in] BSTR user, [in] BSTR password, [in] long reserved, [out,retval] IDispatch **obj);
|
||||
+}
|
||||
+
|
||||
/*****************************************************************************
|
||||
* IADsADSystemInfo interface
|
||||
*/
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,483 +0,0 @@
|
||||
From ba1eb1310db57db3820a3886e374afc507c2b507 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 19 Nov 2019 11:34:13 +0800
|
||||
Subject: [PATCH 3/5] adsldp: Add LDAPNamespace stubs.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/adsldp/Makefile.in | 5 +-
|
||||
dlls/adsldp/adsldp.c | 295 ++++++++++++++++++++++++++++++++++++----
|
||||
dlls/adsldp/adsldp.idl | 9 ++
|
||||
dlls/adsldp/adsldp.rgs | 16 +++
|
||||
dlls/adsldp/rsrc.rc | 20 +++
|
||||
5 files changed, 319 insertions(+), 26 deletions(-)
|
||||
create mode 100644 dlls/adsldp/adsldp.rgs
|
||||
create mode 100644 dlls/adsldp/rsrc.rc
|
||||
|
||||
diff --git a/dlls/adsldp/Makefile.in b/dlls/adsldp/Makefile.in
|
||||
index 4dce14fd0d..7bf07fce2c 100644
|
||||
--- a/dlls/adsldp/Makefile.in
|
||||
+++ b/dlls/adsldp/Makefile.in
|
||||
@@ -1,10 +1,13 @@
|
||||
MODULE = adsldp.dll
|
||||
-IMPORTS = oleaut32 secur32
|
||||
+IMPORTS = oleaut32 secur32 rpcrt4
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
+dlldata_EXTRADEFS = -DENTRY_PREFIX=ADSLDP_
|
||||
|
||||
C_SRCS = \
|
||||
adsldp.c
|
||||
|
||||
IDL_SRCS = \
|
||||
adsldp.idl
|
||||
+
|
||||
+RC_SRCS = rsrc.rc
|
||||
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c
|
||||
index 4fc0de41eb..ef62aad279 100644
|
||||
--- a/dlls/adsldp/adsldp.c
|
||||
+++ b/dlls/adsldp/adsldp.c
|
||||
@@ -31,10 +31,15 @@
|
||||
#define SECURITY_WIN32
|
||||
#include "security.h"
|
||||
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(adsldp);
|
||||
|
||||
+DEFINE_GUID(CLSID_LDAPNamespace,0x228d9a82,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91);
|
||||
+
|
||||
+extern HRESULT WINAPI ADSLDP_DllGetClassObject(REFCLSID,REFIID,void **) DECLSPEC_HIDDEN;
|
||||
+
|
||||
static HMODULE adsldp_hinst;
|
||||
|
||||
typedef struct
|
||||
@@ -235,31 +240,239 @@ static const IADsADSystemInfoVtbl IADsADSystemInfo_vtbl =
|
||||
sysinfo_GetTrees
|
||||
};
|
||||
|
||||
-static HRESULT ADSystemInfo_create(void **obj)
|
||||
+static HRESULT ADSystemInfo_create(REFIID riid, void **obj)
|
||||
{
|
||||
AD_sysinfo *sysinfo;
|
||||
+ HRESULT hr;
|
||||
|
||||
sysinfo = HeapAlloc(GetProcessHeap(), 0, sizeof(*sysinfo));
|
||||
if (!sysinfo) return E_OUTOFMEMORY;
|
||||
|
||||
sysinfo->IADsADSystemInfo_iface.lpVtbl = &IADsADSystemInfo_vtbl;
|
||||
sysinfo->ref = 1;
|
||||
- *obj = &sysinfo->IADsADSystemInfo_iface;
|
||||
|
||||
- TRACE("created %p\n", *obj);
|
||||
+ hr = IADsADSystemInfo_QueryInterface(&sysinfo->IADsADSystemInfo_iface, riid, obj);
|
||||
+ IADsADSystemInfo_Release(&sysinfo->IADsADSystemInfo_iface);
|
||||
|
||||
- return S_OK;
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
+typedef struct
|
||||
+{
|
||||
+ IADs IADs_iface;
|
||||
+ LONG ref;
|
||||
+} LDAP_namespace;
|
||||
+
|
||||
+static inline LDAP_namespace *impl_from_IADs(IADs *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, LDAP_namespace, IADs_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
|
||||
+
|
||||
+ if (!riid || !obj) return E_INVALIDARG;
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDispatch) ||
|
||||
+ IsEqualGUID(riid, &IID_IADs))
|
||||
+ {
|
||||
+ IADs_AddRef(iface);
|
||||
+ *obj = iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("interface %s is not implemented\n", debugstr_guid(riid));
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI ldapns_AddRef(IADs *iface)
|
||||
+{
|
||||
+ LDAP_namespace *ldap = impl_from_IADs(iface);
|
||||
+ return InterlockedIncrement(&ldap->ref);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI ldapns_Release(IADs *iface)
|
||||
+{
|
||||
+ LDAP_namespace *ldap = impl_from_IADs(iface);
|
||||
+ LONG ref = InterlockedDecrement(&ldap->ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ TRACE("destroying %p\n", iface);
|
||||
+ HeapFree(GetProcessHeap(), 0, ldap);
|
||||
+ }
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetTypeInfoCount(IADs *iface, UINT *count)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetTypeInfo(IADs *iface, UINT index, LCID lcid, ITypeInfo **info)
|
||||
+{
|
||||
+ FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetIDsOfNames(IADs *iface, REFIID riid, LPOLESTR *names,
|
||||
+ UINT count, LCID lcid, DISPID *dispid)
|
||||
+{
|
||||
+ FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_Invoke(IADs *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
|
||||
+ DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
|
||||
+{
|
||||
+ FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
|
||||
+ params, result, excepinfo, argerr);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_Name(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_Class(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_GUID(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_ADsPath(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_Parent(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_get_Schema(IADs *iface, BSTR *retval)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, retval);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetInfo(IADs *iface)
|
||||
+{
|
||||
+ FIXME("%p: stub\n", iface);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_SetInfo(IADs *iface)
|
||||
+{
|
||||
+ FIXME("%p: stub\n", iface);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_Get(IADs *iface, BSTR name, VARIANT *prop)
|
||||
+{
|
||||
+ FIXME("%p,%s,%p: stub\n", iface, debugstr_w(name), prop);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_Put(IADs *iface, BSTR name, VARIANT prop)
|
||||
+{
|
||||
+ FIXME("%p,%s,%s: stub\n", iface, debugstr_w(name), wine_dbgstr_variant(&prop));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetEx(IADs *iface, BSTR name, VARIANT *prop)
|
||||
+{
|
||||
+ FIXME("%p,%s,%p: stub\n", iface, debugstr_w(name), prop);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_PutEx(IADs *iface, LONG code, BSTR name, VARIANT prop)
|
||||
+{
|
||||
+ FIXME("%p,%d,%s,%s: stub\n", iface, code, debugstr_w(name), wine_dbgstr_variant(&prop));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ldapns_GetInfoEx(IADs *iface, VARIANT prop, LONG reserved)
|
||||
+{
|
||||
+ FIXME("%p,%s,%d: stub\n", iface, wine_dbgstr_variant(&prop), reserved);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IADsVtbl IADs_vtbl =
|
||||
+{
|
||||
+ ldapns_QueryInterface,
|
||||
+ ldapns_AddRef,
|
||||
+ ldapns_Release,
|
||||
+ ldapns_GetTypeInfoCount,
|
||||
+ ldapns_GetTypeInfo,
|
||||
+ ldapns_GetIDsOfNames,
|
||||
+ ldapns_Invoke,
|
||||
+ ldapns_get_Name,
|
||||
+ ldapns_get_Class,
|
||||
+ ldapns_get_GUID,
|
||||
+ ldapns_get_ADsPath,
|
||||
+ ldapns_get_Parent,
|
||||
+ ldapns_get_Schema,
|
||||
+ ldapns_GetInfo,
|
||||
+ ldapns_SetInfo,
|
||||
+ ldapns_Get,
|
||||
+ ldapns_Put,
|
||||
+ ldapns_GetEx,
|
||||
+ ldapns_PutEx,
|
||||
+ ldapns_GetInfoEx
|
||||
+};
|
||||
+
|
||||
+static HRESULT LDAPNamespace_create(REFIID riid, void **obj)
|
||||
+{
|
||||
+ LDAP_namespace *ldap;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ ldap = heap_alloc(sizeof(*ldap));
|
||||
+ if (!ldap) return E_OUTOFMEMORY;
|
||||
+
|
||||
+ ldap->IADs_iface.lpVtbl = &IADs_vtbl;
|
||||
+ ldap->ref = 1;
|
||||
+
|
||||
+ hr = IADs_QueryInterface(&ldap->IADs_iface, riid, obj);
|
||||
+ IADs_Release(&ldap->IADs_iface);
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static const struct class_info
|
||||
+{
|
||||
+ const CLSID *clsid;
|
||||
+ HRESULT (*constructor)(REFIID, void **);
|
||||
+} class_info[] =
|
||||
+{
|
||||
+ { &CLSID_ADSystemInfo, ADSystemInfo_create },
|
||||
+ { &CLSID_LDAPNamespace, LDAPNamespace_create },
|
||||
+};
|
||||
+
|
||||
typedef struct
|
||||
{
|
||||
IClassFactory IClassFactory_iface;
|
||||
- HRESULT (*constructor)(void **);
|
||||
-} ADSystemInfo_factory;
|
||||
+ LONG ref;
|
||||
+ const struct class_info *info;
|
||||
+} class_factory;
|
||||
|
||||
-static inline ADSystemInfo_factory *impl_from_IClassFactory(IClassFactory *iface)
|
||||
+static inline class_factory *impl_from_IClassFactory(IClassFactory *iface)
|
||||
{
|
||||
- return CONTAINING_RECORD(iface, ADSystemInfo_factory, IClassFactory_iface);
|
||||
+ return CONTAINING_RECORD(iface, class_factory, IClassFactory_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI factory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *obj)
|
||||
@@ -283,19 +496,30 @@ static HRESULT WINAPI factory_QueryInterface(IClassFactory *iface, REFIID riid,
|
||||
|
||||
static ULONG WINAPI factory_AddRef(IClassFactory *iface)
|
||||
{
|
||||
- return 2;
|
||||
+ class_factory *factory = impl_from_IClassFactory(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&factory->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref %u\n", iface, ref);
|
||||
+
|
||||
+ return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI factory_Release(IClassFactory *iface)
|
||||
{
|
||||
- return 1;
|
||||
+ class_factory *factory = impl_from_IClassFactory(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&factory->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref %u\n", iface, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ heap_free(factory);
|
||||
+
|
||||
+ return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj)
|
||||
{
|
||||
- ADSystemInfo_factory *factory = impl_from_IClassFactory(iface);
|
||||
- IUnknown *unknown;
|
||||
- HRESULT hr;
|
||||
+ class_factory *factory = impl_from_IClassFactory(iface);
|
||||
|
||||
TRACE("%p,%s,%p\n", outer, debugstr_guid(riid), obj);
|
||||
|
||||
@@ -304,13 +528,7 @@ static HRESULT WINAPI factory_CreateInstance(IClassFactory *iface, IUnknown *out
|
||||
*obj = NULL;
|
||||
if (outer) return CLASS_E_NOAGGREGATION;
|
||||
|
||||
- hr = factory->constructor((void **)&unknown);
|
||||
- if (hr == S_OK)
|
||||
- {
|
||||
- hr = IUnknown_QueryInterface(unknown, riid, obj);
|
||||
- IUnknown_Release(unknown);
|
||||
- }
|
||||
- return hr;
|
||||
+ return factory->info->constructor(riid, obj);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI factory_LockServer(IClassFactory *iface, BOOL lock)
|
||||
@@ -328,21 +546,48 @@ static const struct IClassFactoryVtbl factory_vtbl =
|
||||
factory_LockServer
|
||||
};
|
||||
|
||||
-static ADSystemInfo_factory ADSystemInfo_cf = { { &factory_vtbl }, ADSystemInfo_create };
|
||||
+static HRESULT factory_constructor(const struct class_info *info, REFIID riid, void **obj)
|
||||
+{
|
||||
+ class_factory *factory;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ factory = heap_alloc(sizeof(*factory));
|
||||
+ if (!factory) return E_OUTOFMEMORY;
|
||||
+
|
||||
+ factory->IClassFactory_iface.lpVtbl = &factory_vtbl;
|
||||
+ factory->ref = 1;
|
||||
+ factory->info = info;
|
||||
+
|
||||
+ hr = IClassFactory_QueryInterface(&factory->IClassFactory_iface, riid, obj);
|
||||
+ IClassFactory_Release(&factory->IClassFactory_iface);
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *obj)
|
||||
{
|
||||
+ const struct class_info *info = NULL;
|
||||
+ int i;
|
||||
+
|
||||
TRACE("%s,%s,%p\n", debugstr_guid(clsid), debugstr_guid(iid), obj);
|
||||
|
||||
if (!clsid || !iid || !obj) return E_INVALIDARG;
|
||||
|
||||
*obj = NULL;
|
||||
|
||||
- if (IsEqualGUID(clsid, &CLSID_ADSystemInfo))
|
||||
- return IClassFactory_QueryInterface(&ADSystemInfo_cf.IClassFactory_iface, iid, obj);
|
||||
+ for (i = 0; i < ARRAY_SIZE(class_info); i++)
|
||||
+ {
|
||||
+ if (IsEqualCLSID(class_info[i].clsid, clsid))
|
||||
+ {
|
||||
+ info = &class_info[i];
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (info)
|
||||
+ return factory_constructor(info, iid, obj);
|
||||
|
||||
- FIXME("class %s/%s is not implemented\n", debugstr_guid(clsid), debugstr_guid(iid));
|
||||
- return CLASS_E_CLASSNOTAVAILABLE;
|
||||
+ return ADSLDP_DllGetClassObject(clsid, iid, obj);
|
||||
}
|
||||
|
||||
HRESULT WINAPI DllCanUnloadNow(void)
|
||||
diff --git a/dlls/adsldp/adsldp.idl b/dlls/adsldp/adsldp.idl
|
||||
index c2f7504d0c..634aa36327 100644
|
||||
--- a/dlls/adsldp/adsldp.idl
|
||||
+++ b/dlls/adsldp/adsldp.idl
|
||||
@@ -18,8 +18,17 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
+#pragma makedep proxy
|
||||
#pragma makedep register
|
||||
|
||||
+[
|
||||
+ helpstring("LDAP Namespace Object"),
|
||||
+ progid("LDAPNamespace"),
|
||||
+ uuid(228d9a82-c302-11cf-9aa4-00aa004a5691),
|
||||
+ threading(both)
|
||||
+]
|
||||
+coclass ADs { }
|
||||
+
|
||||
[
|
||||
helpstring("AD System Info Object"),
|
||||
uuid(50b6327f-afd1-11d2-9cb9-0000f87a369e),
|
||||
diff --git a/dlls/adsldp/adsldp.rgs b/dlls/adsldp/adsldp.rgs
|
||||
new file mode 100644
|
||||
index 0000000000..0da0946832
|
||||
--- /dev/null
|
||||
+++ b/dlls/adsldp/adsldp.rgs
|
||||
@@ -0,0 +1,16 @@
|
||||
+HKLM
|
||||
+{
|
||||
+ NoRemove Software
|
||||
+ {
|
||||
+ NoRemove Microsoft
|
||||
+ {
|
||||
+ NoRemove ADs
|
||||
+ {
|
||||
+ NoRemove Providers
|
||||
+ {
|
||||
+ ForceRemove 'LDAP' = s 'LDAPNamespace'
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/dlls/adsldp/rsrc.rc b/dlls/adsldp/rsrc.rc
|
||||
new file mode 100644
|
||||
index 0000000000..914fe0b2f3
|
||||
--- /dev/null
|
||||
+++ b/dlls/adsldp/rsrc.rc
|
||||
@@ -0,0 +1,20 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Dmitry Timoshkov
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+/* @makedep: adsldp.rgs */
|
||||
+1 WINE_REGISTRY adsldp.rgs
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,156 +0,0 @@
|
||||
From 73b97a7095f833e5323117c1acbb8a64c5e3afcb Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 19 Nov 2019 11:46:50 +0800
|
||||
Subject: [PATCH 4/5] adsldp: Add IADsOpenDSObject stubs.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/adsldp/adsldp.c | 102 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 102 insertions(+)
|
||||
|
||||
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c
|
||||
index ef62aad279..bdce30c143 100644
|
||||
--- a/dlls/adsldp/adsldp.c
|
||||
+++ b/dlls/adsldp/adsldp.c
|
||||
@@ -260,6 +260,7 @@ static HRESULT ADSystemInfo_create(REFIID riid, void **obj)
|
||||
typedef struct
|
||||
{
|
||||
IADs IADs_iface;
|
||||
+ IADsOpenDSObject IADsOpenDSObject_iface;
|
||||
LONG ref;
|
||||
} LDAP_namespace;
|
||||
|
||||
@@ -270,6 +271,8 @@ static inline LDAP_namespace *impl_from_IADs(IADs *iface)
|
||||
|
||||
static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj)
|
||||
{
|
||||
+ LDAP_namespace *ldap = impl_from_IADs(iface);
|
||||
+
|
||||
TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
|
||||
|
||||
if (!riid || !obj) return E_INVALIDARG;
|
||||
@@ -283,6 +286,13 @@ static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+ if (IsEqualGUID(riid, &IID_IADsOpenDSObject))
|
||||
+ {
|
||||
+ IADs_AddRef(iface);
|
||||
+ *obj = &ldap->IADsOpenDSObject_iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
FIXME("interface %s is not implemented\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
@@ -436,6 +446,97 @@ static const IADsVtbl IADs_vtbl =
|
||||
ldapns_GetInfoEx
|
||||
};
|
||||
|
||||
+static inline LDAP_namespace *impl_from_IADsOpenDSObject(IADsOpenDSObject *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, LDAP_namespace, IADsOpenDSObject_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_QueryInterface(IADsOpenDSObject *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj);
|
||||
+
|
||||
+ if (!riid || !obj) return E_INVALIDARG;
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IADsOpenDSObject) ||
|
||||
+ IsEqualGUID(riid, &IID_IDispatch) ||
|
||||
+ IsEqualGUID(riid, &IID_IUnknown))
|
||||
+ {
|
||||
+ IADsOpenDSObject_AddRef(iface);
|
||||
+ *obj = iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("interface %s is not implemented\n", debugstr_guid(riid));
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI openobj_AddRef(IADsOpenDSObject *iface)
|
||||
+{
|
||||
+ LDAP_namespace *ldap = impl_from_IADsOpenDSObject(iface);
|
||||
+ return InterlockedIncrement(&ldap->ref);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI openobj_Release(IADsOpenDSObject *iface)
|
||||
+{
|
||||
+ LDAP_namespace *ldap = impl_from_IADsOpenDSObject(iface);
|
||||
+ LONG ref = InterlockedDecrement(&ldap->ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ TRACE("destroying %p\n", iface);
|
||||
+ HeapFree(GetProcessHeap(), 0, ldap);
|
||||
+ }
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_GetTypeInfoCount(IADsOpenDSObject *iface, UINT *count)
|
||||
+{
|
||||
+ FIXME("%p,%p: stub\n", iface, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_GetTypeInfo(IADsOpenDSObject *iface, UINT index, LCID lcid, ITypeInfo **info)
|
||||
+{
|
||||
+ FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_GetIDsOfNames(IADsOpenDSObject *iface, REFIID riid, LPOLESTR *names,
|
||||
+ UINT count, LCID lcid, DISPID *dispid)
|
||||
+{
|
||||
+ FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_Invoke(IADsOpenDSObject *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
|
||||
+ DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
|
||||
+{
|
||||
+ FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
|
||||
+ params, result, excepinfo, argerr);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, BSTR user, BSTR password,
|
||||
+ LONG reserved, IDispatch **obj)
|
||||
+{
|
||||
+ FIXME("%p,%s,%s,%s,%d,%p: stub\n", iface, debugstr_w(path), debugstr_w(user), debugstr_w(password),
|
||||
+ reserved, obj);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IADsOpenDSObjectVtbl IADsOpenDSObject_vtbl =
|
||||
+{
|
||||
+ openobj_QueryInterface,
|
||||
+ openobj_AddRef,
|
||||
+ openobj_Release,
|
||||
+ openobj_GetTypeInfoCount,
|
||||
+ openobj_GetTypeInfo,
|
||||
+ openobj_GetIDsOfNames,
|
||||
+ openobj_Invoke,
|
||||
+ openobj_OpenDSObject
|
||||
+};
|
||||
+
|
||||
static HRESULT LDAPNamespace_create(REFIID riid, void **obj)
|
||||
{
|
||||
LDAP_namespace *ldap;
|
||||
@@ -445,6 +546,7 @@ static HRESULT LDAPNamespace_create(REFIID riid, void **obj)
|
||||
if (!ldap) return E_OUTOFMEMORY;
|
||||
|
||||
ldap->IADs_iface.lpVtbl = &IADs_vtbl;
|
||||
+ ldap->IADsOpenDSObject_iface.lpVtbl = &IADsOpenDSObject_vtbl;
|
||||
ldap->ref = 1;
|
||||
|
||||
hr = IADs_QueryInterface(&ldap->IADs_iface, riid, obj);
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,123 +0,0 @@
|
||||
From 488afac28472b0563c67cfad8c02a82f489c2c04 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 19 Nov 2019 12:12:27 +0800
|
||||
Subject: [PATCH 5/5] adsldp/tests: Add some tests for LDAPNamespace.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/adsldp/tests/Makefile.in | 1 +
|
||||
dlls/adsldp/tests/ldap.c | 78 +++++++++++++++++++++++++++++++++++
|
||||
dlls/adsldp/tests/sysinfo.c | 2 +
|
||||
3 files changed, 81 insertions(+)
|
||||
create mode 100644 dlls/adsldp/tests/ldap.c
|
||||
|
||||
diff --git a/dlls/adsldp/tests/Makefile.in b/dlls/adsldp/tests/Makefile.in
|
||||
index 777d2aa9de..52141139d5 100644
|
||||
--- a/dlls/adsldp/tests/Makefile.in
|
||||
+++ b/dlls/adsldp/tests/Makefile.in
|
||||
@@ -2,4 +2,5 @@ TESTDLL = adsldp.dll
|
||||
IMPORTS = ole32 oleaut32 secur32 advapi32 uuid
|
||||
|
||||
C_SRCS = \
|
||||
+ ldap.c \
|
||||
sysinfo.c
|
||||
diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c
|
||||
new file mode 100644
|
||||
index 0000000000..36b128da20
|
||||
--- /dev/null
|
||||
+++ b/dlls/adsldp/tests/ldap.c
|
||||
@@ -0,0 +1,78 @@
|
||||
+/*
|
||||
+ * LDAPNamespace Tests
|
||||
+ *
|
||||
+ * Copyright 2019 Dmitry Timoshkov
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#define COBJMACROS
|
||||
+
|
||||
+#include "windef.h"
|
||||
+#include "winbase.h"
|
||||
+#include "objbase.h"
|
||||
+#include "iads.h"
|
||||
+
|
||||
+#include "wine/test.h"
|
||||
+
|
||||
+#include "initguid.h"
|
||||
+DEFINE_GUID(CLSID_LDAPNamespace,0x228d9a82,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91);
|
||||
+
|
||||
+static void test_LDAP(void)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ IUnknown *unk;
|
||||
+ IADs *ads;
|
||||
+ IADsOpenDSObject *ads_open;
|
||||
+ IDispatch *disp;
|
||||
+
|
||||
+ hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IADs, (void **)&ads);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+ IADs_Release(ads);
|
||||
+
|
||||
+ hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+
|
||||
+ hr = IUnknown_QueryInterface(unk, &IID_IDispatch, (void **)&disp);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+ IDispatch_Release(disp);
|
||||
+
|
||||
+ hr = IUnknown_QueryInterface(unk, &IID_IADsOpenDSObject, (void **)&ads_open);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+ IADsOpenDSObject_Release(ads_open);
|
||||
+
|
||||
+ hr = IADsOpenDSObject_OpenDSObject(ads_open, (BSTR)L"LDAP:", NULL, NULL, ADS_SECURE_AUTHENTICATION, &disp);
|
||||
+todo_wine
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+if (hr == S_OK)
|
||||
+ IDispatch_Release(disp);
|
||||
+
|
||||
+ IUnknown_Release(unk);
|
||||
+}
|
||||
+
|
||||
+START_TEST(ldap)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ hr = CoInitialize(NULL);
|
||||
+ ok(hr == S_OK, "got %#x\n", hr);
|
||||
+
|
||||
+ test_LDAP();
|
||||
+
|
||||
+ CoUninitialize();
|
||||
+}
|
||||
diff --git a/dlls/adsldp/tests/sysinfo.c b/dlls/adsldp/tests/sysinfo.c
|
||||
index db982aa82f..cb250190f1 100644
|
||||
--- a/dlls/adsldp/tests/sysinfo.c
|
||||
+++ b/dlls/adsldp/tests/sysinfo.c
|
||||
@@ -216,4 +216,6 @@ START_TEST(sysinfo)
|
||||
test_ComputerName();
|
||||
test_UserName();
|
||||
test_sysinfo();
|
||||
+
|
||||
+ CoUninitialize();
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,2 +0,0 @@
|
||||
Fixes: [40649] activeds: Implement ADsOpenObject.
|
||||
#Fixes: [42885] ADsOpenObject to bind to user's account/computer. (related)
|
@@ -1,315 +0,0 @@
|
||||
From 1eb8acd819f9eee8fdf154d0ef43881008265916 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Aug 2017 02:33:14 +0200
|
||||
Subject: ntdll: Implement NtFilterToken.
|
||||
|
||||
---
|
||||
dlls/ntdll/nt.c | 59 ++++++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/ntdll.spec | 2 +-
|
||||
include/winnt.h | 5 +++
|
||||
include/winternl.h | 1 +
|
||||
server/process.c | 2 +-
|
||||
server/protocol.def | 10 ++++++
|
||||
server/security.h | 4 ++-
|
||||
server/token.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
8 files changed, 162 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index c3f5df3..59a08de 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -119,6 +119,65 @@ NTSTATUS WINAPI NtDuplicateToken(
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
+ * NtFilterToken [NTDLL.@]
|
||||
+ * ZwFilterToken [NTDLL.@]
|
||||
+ */
|
||||
+NTSTATUS WINAPI NtFilterToken( HANDLE token, ULONG flags, TOKEN_GROUPS *disable_sids,
|
||||
+ TOKEN_PRIVILEGES *privileges, TOKEN_GROUPS *restrict_sids,
|
||||
+ HANDLE *new_token )
|
||||
+{
|
||||
+ data_size_t privileges_len = 0;
|
||||
+ data_size_t sids_len = 0;
|
||||
+ SID *sids = NULL;
|
||||
+ NTSTATUS status;
|
||||
+
|
||||
+ TRACE( "(%p, 0x%08x, %p, %p, %p, %p)\n", token, flags, disable_sids, privileges,
|
||||
+ restrict_sids, new_token );
|
||||
+
|
||||
+ if (flags)
|
||||
+ FIXME( "flags %x unsupported\n", flags );
|
||||
+
|
||||
+ if (restrict_sids)
|
||||
+ FIXME( "support for restricting sids not yet implemented\n" );
|
||||
+
|
||||
+ if (privileges)
|
||||
+ privileges_len = privileges->PrivilegeCount * sizeof(LUID_AND_ATTRIBUTES);
|
||||
+
|
||||
+ if (disable_sids)
|
||||
+ {
|
||||
+ DWORD len, i;
|
||||
+ BYTE *tmp;
|
||||
+
|
||||
+ for (i = 0; i < disable_sids->GroupCount; i++)
|
||||
+ sids_len += RtlLengthSid( disable_sids->Groups[i].Sid );
|
||||
+
|
||||
+ sids = RtlAllocateHeap( GetProcessHeap(), 0, sids_len );
|
||||
+ if (!sids) return STATUS_NO_MEMORY;
|
||||
+
|
||||
+ for (i = 0, tmp = (BYTE *)sids; i < disable_sids->GroupCount; i++, tmp += len)
|
||||
+ {
|
||||
+ len = RtlLengthSid( disable_sids->Groups[i].Sid );
|
||||
+ memcpy( tmp, disable_sids->Groups[i].Sid, len );
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ SERVER_START_REQ( filter_token )
|
||||
+ {
|
||||
+ req->handle = wine_server_obj_handle( token );
|
||||
+ req->flags = flags;
|
||||
+ req->privileges_size = privileges_len;
|
||||
+ wine_server_add_data( req, privileges->Privileges, privileges_len );
|
||||
+ wine_server_add_data( req, sids, sids_len );
|
||||
+ status = wine_server_call( req );
|
||||
+ if (!status) *new_token = wine_server_ptr_handle( reply->new_handle );
|
||||
+ }
|
||||
+ SERVER_END_REQ;
|
||||
+
|
||||
+ RtlFreeHeap( GetProcessHeap(), 0, sids );
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
+/******************************************************************************
|
||||
* NtOpenProcessToken [NTDLL.@]
|
||||
* ZwOpenProcessToken [NTDLL.@]
|
||||
*/
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index c260b0d..3c5e69c 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -176,7 +176,7 @@
|
||||
# @ stub NtEnumerateSystemEnvironmentValuesEx
|
||||
@ stdcall NtEnumerateValueKey(long long long ptr long ptr)
|
||||
@ stub NtExtendSection
|
||||
-# @ stub NtFilterToken
|
||||
+@ stdcall NtFilterToken(long long ptr ptr ptr ptr)
|
||||
@ stdcall NtFindAtom(ptr long ptr)
|
||||
@ stdcall NtFlushBuffersFile(long ptr)
|
||||
@ stdcall NtFlushInstructionCache(long ptr long)
|
||||
diff --git a/include/winnt.h b/include/winnt.h
|
||||
index 16d96d8..4e238f9 100644
|
||||
--- a/include/winnt.h
|
||||
+++ b/include/winnt.h
|
||||
@@ -3904,6 +3904,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
|
||||
TOKEN_ADJUST_SESSIONID | \
|
||||
TOKEN_ADJUST_DEFAULT )
|
||||
|
||||
+#define DISABLE_MAX_PRIVILEGE 0x1
|
||||
+#define SANDBOX_INERT 0x2
|
||||
+#define LUA_TOKEN 0x4
|
||||
+#define WRITE_RESTRICTED 0x8
|
||||
+
|
||||
#ifndef _SECURITY_DEFINED
|
||||
#define _SECURITY_DEFINED
|
||||
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index c84e6d7..288f93e 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -2303,6 +2303,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
|
||||
NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
|
||||
NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
|
||||
NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
|
||||
+NTSYSAPI NTSTATUS WINAPI NtFilterToken(HANDLE,ULONG,TOKEN_GROUPS*,TOKEN_PRIVILEGES*,TOKEN_GROUPS*,HANDLE*);
|
||||
NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
|
||||
NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
|
||||
NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index f8739d0..71d9d6d 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -566,7 +566,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
|
||||
: 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 */
|
||||
- process->token = token_duplicate( parent->token, TRUE, 0, NULL );
|
||||
+ process->token = token_duplicate( parent->token, TRUE, 0, NULL, NULL, 0, NULL, 0 );
|
||||
process->affinity = parent->affinity;
|
||||
}
|
||||
if (!process->handles || !process->token) goto error;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 35824ae..6ee6d28 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3356,6 +3356,16 @@ enum caret_state
|
||||
obj_handle_t new_handle; /* duplicated handle */
|
||||
@END
|
||||
|
||||
+@REQ(filter_token)
|
||||
+ obj_handle_t handle; /* handle to the token to duplicate */
|
||||
+ unsigned int flags; /* flags */
|
||||
+ data_size_t privileges_size; /* size of privileges */
|
||||
+ VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
|
||||
+ VARARG(disable_sids,SID); /* array of groups to remove from new token */
|
||||
+@REPLY
|
||||
+ obj_handle_t new_handle; /* filtered handle */
|
||||
+@END
|
||||
+
|
||||
@REQ(access_check)
|
||||
obj_handle_t handle; /* handle to the token */
|
||||
unsigned int desired_access; /* desired access to the object */
|
||||
diff --git a/server/security.h b/server/security.h
|
||||
index 873bbc6..bc4a8f6 100644
|
||||
--- a/server/security.h
|
||||
+++ b/server/security.h
|
||||
@@ -55,7 +55,9 @@ extern const PSID security_high_label_sid;
|
||||
extern struct token *token_create_admin(void);
|
||||
extern int token_assign_label( struct token *token, PSID label );
|
||||
extern struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
- int impersonation_level, const struct security_descriptor *sd );
|
||||
+ int impersonation_level, const struct security_descriptor *sd,
|
||||
+ const LUID_AND_ATTRIBUTES *filter_privileges, unsigned int priv_count,
|
||||
+ const SID *filter_groups, unsigned int group_count );
|
||||
extern int token_check_privileges( struct token *token, int all_required,
|
||||
const LUID_AND_ATTRIBUTES *reqprivs,
|
||||
unsigned int count, LUID_AND_ATTRIBUTES *usedprivs);
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 0810a61..2f6a467 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -276,6 +276,19 @@ static int acl_is_valid( const ACL *acl, data_size_t size )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+static unsigned int get_sid_count( const SID *sid, data_size_t size )
|
||||
+{
|
||||
+ unsigned int count;
|
||||
+
|
||||
+ for (count = 0; size >= sizeof(SID) && security_sid_len( sid ) <= size; count++)
|
||||
+ {
|
||||
+ size -= security_sid_len( sid );
|
||||
+ sid = (const SID *)((char *)sid + security_sid_len( sid ));
|
||||
+ }
|
||||
+
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
/* checks whether all members of a security descriptor fit inside the size
|
||||
* of memory specified */
|
||||
int sd_is_valid( const struct security_descriptor *sd, data_size_t size )
|
||||
@@ -619,8 +632,36 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
return token;
|
||||
}
|
||||
|
||||
+static int filter_group( struct group *group, const SID *filter, unsigned int count )
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < count; i++)
|
||||
+ {
|
||||
+ if (security_equal_sid( &group->sid, filter )) return 1;
|
||||
+ filter = (const SID *)((char *)filter + security_sid_len( filter ));
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBUTES *filter, unsigned int count )
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < count; i++)
|
||||
+ {
|
||||
+ if (!memcmp( &privilege->luid, &filter[i].Luid, sizeof(LUID) ))
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
- int impersonation_level, const struct security_descriptor *sd )
|
||||
+ int impersonation_level, const struct security_descriptor *sd,
|
||||
+ const LUID_AND_ATTRIBUTES *filter_privileges, unsigned int priv_count,
|
||||
+ const SID *filter_groups, unsigned int group_count)
|
||||
{
|
||||
const luid_t *modified_id =
|
||||
primary || (impersonation_level == src_token->impersonation_level) ?
|
||||
@@ -656,6 +697,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
return NULL;
|
||||
}
|
||||
memcpy( newgroup, group, size );
|
||||
+ if (filter_group( group, filter_groups, group_count ))
|
||||
+ {
|
||||
+ newgroup->enabled = 0;
|
||||
+ newgroup->def = 0;
|
||||
+ newgroup->deny_only = 1;
|
||||
+ }
|
||||
list_add_tail( &token->groups, &newgroup->entry );
|
||||
if (src_token->primary_group == &group->sid)
|
||||
{
|
||||
@@ -667,11 +714,14 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
|
||||
/* copy privileges */
|
||||
LIST_FOR_EACH_ENTRY( privilege, &src_token->privileges, struct privilege, entry )
|
||||
+ {
|
||||
+ if (filter_privilege( privilege, filter_privileges, priv_count )) continue;
|
||||
if (!privilege_add( token, &privilege->luid, privilege->enabled ))
|
||||
{
|
||||
release_object( token );
|
||||
return NULL;
|
||||
}
|
||||
+ }
|
||||
|
||||
if (sd) default_set_sd( &token->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
|
||||
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
|
||||
@@ -1304,7 +1354,7 @@ DECL_HANDLER(duplicate_token)
|
||||
TOKEN_DUPLICATE,
|
||||
&token_ops )))
|
||||
{
|
||||
- struct token *token = token_duplicate( src_token, req->primary, req->impersonation_level, sd );
|
||||
+ struct token *token = token_duplicate( src_token, req->primary, req->impersonation_level, sd, NULL, 0, NULL, 0 );
|
||||
if (token)
|
||||
{
|
||||
reply->new_handle = alloc_handle_no_access_check( current->process, token, req->access, objattr->attributes );
|
||||
@@ -1314,6 +1364,36 @@ DECL_HANDLER(duplicate_token)
|
||||
}
|
||||
}
|
||||
|
||||
+/* creates a restricted version of a token */
|
||||
+DECL_HANDLER(filter_token)
|
||||
+{
|
||||
+ struct token *src_token;
|
||||
+
|
||||
+ if ((src_token = (struct token *)get_handle_obj( current->process, req->handle,
|
||||
+ TOKEN_DUPLICATE,
|
||||
+ &token_ops )))
|
||||
+ {
|
||||
+ const LUID_AND_ATTRIBUTES *filter_privileges = get_req_data();
|
||||
+ unsigned int priv_count, group_count;
|
||||
+ const SID *filter_groups;
|
||||
+ struct token *token;
|
||||
+
|
||||
+ priv_count = min( req->privileges_size, get_req_data_size() ) / sizeof(LUID_AND_ATTRIBUTES);
|
||||
+ filter_groups = (const SID *)((char *)filter_privileges + priv_count * sizeof(LUID_AND_ATTRIBUTES));
|
||||
+ group_count = get_sid_count( filter_groups, get_req_data_size() - priv_count * sizeof(LUID_AND_ATTRIBUTES) );
|
||||
+
|
||||
+ token = token_duplicate( src_token, src_token->primary, src_token->impersonation_level, NULL,
|
||||
+ filter_privileges, priv_count, filter_groups, group_count );
|
||||
+ if (token)
|
||||
+ {
|
||||
+ unsigned int access = get_handle_access( current->process, req->handle );
|
||||
+ reply->new_handle = alloc_handle_no_access_check( current->process, token, access, 0 );
|
||||
+ release_object( token );
|
||||
+ }
|
||||
+ release_object( src_token );
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* checks the specified privileges are held by the token */
|
||||
DECL_HANDLER(check_token_privileges)
|
||||
{
|
||||
--
|
||||
2.7.4
|
||||
|
@@ -1,132 +0,0 @@
|
||||
From 3c1f5962482e7acf531f57f49d923d9c4e5278b1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Aug 2017 02:51:57 +0200
|
||||
Subject: [PATCH] advapi32: Implement CreateRestrictedToken.
|
||||
|
||||
---
|
||||
dlls/kernelbase/security.c | 103 ++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 84 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernelbase/security.c b/dlls/kernelbase/security.c
|
||||
index 2e75e81ed77..97f6ee6a2fd 100644
|
||||
--- a/dlls/kernelbase/security.c
|
||||
+++ b/dlls/kernelbase/security.c
|
||||
@@ -592,31 +592,96 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static BOOL allocate_groups(TOKEN_GROUPS **groups_ret, SID_AND_ATTRIBUTES *sids, DWORD count)
|
||||
+{
|
||||
+ TOKEN_GROUPS *groups;
|
||||
+ DWORD i;
|
||||
+
|
||||
+ if (!count)
|
||||
+ {
|
||||
+ *groups_ret = NULL;
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+
|
||||
+ groups = (TOKEN_GROUPS *)heap_alloc(FIELD_OFFSET(TOKEN_GROUPS, Groups) +
|
||||
+ count * sizeof(SID_AND_ATTRIBUTES));
|
||||
+ if (!groups)
|
||||
+ {
|
||||
+ SetLastError(ERROR_OUTOFMEMORY);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ groups->GroupCount = count;
|
||||
+ for (i = 0; i < count; i++)
|
||||
+ groups->Groups[i] = sids[i];
|
||||
+
|
||||
+ *groups_ret = groups;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static BOOL allocate_privileges(TOKEN_PRIVILEGES **privileges_ret, LUID_AND_ATTRIBUTES *privs, DWORD count)
|
||||
+{
|
||||
+ TOKEN_PRIVILEGES *privileges;
|
||||
+ DWORD i;
|
||||
+
|
||||
+ if (!count)
|
||||
+ {
|
||||
+ *privileges_ret = NULL;
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+
|
||||
+ privileges = (TOKEN_PRIVILEGES *)heap_alloc(FIELD_OFFSET(TOKEN_PRIVILEGES, Privileges) +
|
||||
+ count * sizeof(LUID_AND_ATTRIBUTES));
|
||||
+ if (!privileges)
|
||||
+ {
|
||||
+ SetLastError(ERROR_OUTOFMEMORY);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ privileges->PrivilegeCount = count;
|
||||
+ for (i = 0; i < count; i++)
|
||||
+ privileges->Privileges[i] = privs[i];
|
||||
+
|
||||
+ *privileges_ret = privileges;
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
/*************************************************************************
|
||||
* CreateRestrictedToken (kernelbase.@)
|
||||
*/
|
||||
-BOOL WINAPI CreateRestrictedToken( HANDLE token, DWORD flags,
|
||||
- DWORD disable_count, PSID_AND_ATTRIBUTES disable_sids,
|
||||
- DWORD delete_count, PLUID_AND_ATTRIBUTES delete_privs,
|
||||
- DWORD restrict_count, PSID_AND_ATTRIBUTES restrict_sids, PHANDLE ret )
|
||||
+BOOL WINAPI CreateRestrictedToken( HANDLE baseToken, DWORD flags,
|
||||
+ DWORD nDisableSids, PSID_AND_ATTRIBUTES disableSids,
|
||||
+ DWORD nDeletePrivs, PLUID_AND_ATTRIBUTES deletePrivs,
|
||||
+ DWORD nRestrictSids, PSID_AND_ATTRIBUTES restrictSids, PHANDLE newToken )
|
||||
{
|
||||
- TOKEN_TYPE type;
|
||||
- SECURITY_IMPERSONATION_LEVEL level = SecurityAnonymous;
|
||||
- DWORD size;
|
||||
+ TOKEN_PRIVILEGES *delete_privs = NULL;
|
||||
+ TOKEN_GROUPS *disable_groups = NULL;
|
||||
+ TOKEN_GROUPS *restrict_sids = NULL;
|
||||
+ BOOL ret = FALSE;
|
||||
|
||||
- FIXME("(%p, 0x%x, %u, %p, %u, %p, %u, %p, %p): stub\n",
|
||||
- token, flags, disable_count, disable_sids, delete_count, delete_privs,
|
||||
- restrict_count, restrict_sids, ret );
|
||||
+ TRACE("(%p, 0x%x, %u, %p, %u, %p, %u, %p, %p)\n",
|
||||
+ baseToken, flags, nDisableSids, disableSids,
|
||||
+ nDeletePrivs, deletePrivs,
|
||||
+ nRestrictSids, restrictSids,
|
||||
+ newToken);
|
||||
+
|
||||
+ if (!allocate_groups(&disable_groups, disableSids, nDisableSids))
|
||||
+ goto done;
|
||||
+
|
||||
+ if (!allocate_privileges(&delete_privs, deletePrivs, nDeletePrivs))
|
||||
+ goto done;
|
||||
+
|
||||
+ if (!allocate_groups(&restrict_sids, restrictSids, nRestrictSids))
|
||||
+ goto done;
|
||||
+
|
||||
+ ret = set_ntstatus(NtFilterToken(baseToken, flags, disable_groups, delete_privs, restrict_sids, newToken));
|
||||
+
|
||||
+done:
|
||||
+ heap_free(disable_groups);
|
||||
+ heap_free(delete_privs);
|
||||
+ heap_free(restrict_sids);
|
||||
+ return ret;
|
||||
|
||||
- size = sizeof(type);
|
||||
- if (!GetTokenInformation( token, TokenType, &type, size, &size )) return FALSE;
|
||||
- if (type == TokenImpersonation)
|
||||
- {
|
||||
- size = sizeof(level);
|
||||
- if (!GetTokenInformation( token, TokenImpersonationLevel, &level, size, &size ))
|
||||
- return FALSE;
|
||||
- }
|
||||
- return DuplicateTokenEx( token, MAXIMUM_ALLOWED, NULL, level, type, ret );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [25834] Implement advapi32.CreateRestrictedToken
|
@@ -1,38 +1,39 @@
|
||||
From c8dc0ec6406e8449b59c219ede2e9bd88d8a56fa Mon Sep 17 00:00:00 2001
|
||||
From d2e98b2054a5af671fd81ded32f2cf60a062312c 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: [PATCH] server: Implement token elevation information.
|
||||
|
||||
---
|
||||
dlls/ntdll/nt.c | 16 ++++++++++++----
|
||||
server/protocol.def | 8 ++++++++
|
||||
server/token.c | 22 +++++++++++++++++++---
|
||||
dlls/ntdll/unix/security.c | 16 ++++++++++++----
|
||||
server/protocol.def | 8 ++++++++
|
||||
server/token.c | 22 +++++++++++++++++++---
|
||||
3 files changed, 39 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index cd271fde9c..b1dd999cf5 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -625,18 +625,26 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
SERVER_END_REQ;
|
||||
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c
|
||||
index d063d43d6d4..03a81afa46e 100644
|
||||
--- a/dlls/ntdll/unix/security.c
|
||||
+++ b/dlls/ntdll/unix/security.c
|
||||
@@ -390,19 +390,27 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
|
||||
break;
|
||||
|
||||
case TokenElevationType:
|
||||
+ SERVER_START_REQ( get_token_elevation_type )
|
||||
{
|
||||
TOKEN_ELEVATION_TYPE *elevation_type = tokeninfo;
|
||||
TOKEN_ELEVATION_TYPE *type = info;
|
||||
- FIXME("QueryInformationToken( ..., TokenElevationType, ...) semi-stub\n");
|
||||
- *elevation_type = TokenElevationTypeFull;
|
||||
- *type = TokenElevationTypeFull;
|
||||
+ req->handle = wine_server_obj_handle( token );
|
||||
+ status = wine_server_call( req );
|
||||
+ if (status == STATUS_SUCCESS)
|
||||
+ *elevation_type = reply->elevation;
|
||||
+ *type = reply->elevation;
|
||||
}
|
||||
+ SERVER_END_REQ;
|
||||
break;
|
||||
|
||||
case TokenElevation:
|
||||
+ SERVER_START_REQ( get_token_elevation_type )
|
||||
{
|
||||
TOKEN_ELEVATION *elevation = tokeninfo;
|
||||
TOKEN_ELEVATION *elevation = info;
|
||||
- FIXME("QueryInformationToken( ..., TokenElevation, ...) semi-stub\n");
|
||||
- elevation->TokenIsElevated = TRUE;
|
||||
+ req->handle = wine_server_obj_handle( token );
|
||||
@@ -42,13 +43,13 @@ index cd271fde9c..b1dd999cf5 100644
|
||||
}
|
||||
+ SERVER_END_REQ;
|
||||
break;
|
||||
|
||||
case TokenSessionId:
|
||||
{
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 90af9df7f4..93afaabca1 100644
|
||||
index ee07b1eca14..84f0b577d72 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3643,6 +3643,14 @@ struct handle_info
|
||||
@@ -3566,6 +3566,14 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@@ -64,10 +65,10 @@ index 90af9df7f4..93afaabca1 100644
|
||||
@REQ(create_completion)
|
||||
unsigned int access; /* desired access to a port */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 6d193603b4..64f20e1b57 100644
|
||||
index 38a4c203d54..14343637af5 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -112,6 +112,7 @@ struct token
|
||||
@@ -110,6 +110,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 +76,7 @@ index 6d193603b4..64f20e1b57 100644
|
||||
};
|
||||
|
||||
struct privilege
|
||||
@@ -545,7 +546,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -552,7 +553,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 +85,7 @@ index 6d193603b4..64f20e1b57 100644
|
||||
{
|
||||
struct token *token = alloc_object( &token_ops );
|
||||
if (token)
|
||||
@@ -567,6 +568,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -574,6 +575,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 +93,7 @@ index 6d193603b4..64f20e1b57 100644
|
||||
|
||||
/* copy user */
|
||||
token->user = memdup( user, security_sid_len( user ));
|
||||
@@ -682,7 +684,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
@@ -689,7 +691,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,7 +103,7 @@ index 6d193603b4..64f20e1b57 100644
|
||||
if (!token) return token;
|
||||
|
||||
/* copy groups */
|
||||
@@ -888,7 +891,7 @@ struct token *token_create_admin( void )
|
||||
@@ -895,7 +898,7 @@ struct token *token_create_admin( void )
|
||||
static const TOKEN_SOURCE admin_source = {"SeMgr", {0, 0}};
|
||||
token = create_token( TRUE, user_sid, admin_groups, ARRAY_SIZE( admin_groups ),
|
||||
admin_privs, ARRAY_SIZE( admin_privs ), default_dacl,
|
||||
@@ -111,7 +112,7 @@ index 6d193603b4..64f20e1b57 100644
|
||||
/* we really need a primary group */
|
||||
assert( token->primary_group );
|
||||
}
|
||||
@@ -1627,6 +1630,19 @@ DECL_HANDLER(get_token_statistics)
|
||||
@@ -1634,6 +1637,19 @@ DECL_HANDLER(get_token_statistics)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,5 +133,5 @@ index 6d193603b4..64f20e1b57 100644
|
||||
{
|
||||
struct token *token;
|
||||
--
|
||||
2.19.1
|
||||
2.27.0
|
||||
|
||||
|
@@ -1,19 +1,19 @@
|
||||
From ae503e8e7eb8f4fcb9bf3e642458c2a1bba6ccaa Mon Sep 17 00:00:00 2001
|
||||
From 6dc1b7d9e533379133857629bb9c09e1045a9020 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.
|
||||
|
||||
---
|
||||
dlls/ntdll/nt.c | 23 ++++++++++++++---------
|
||||
server/protocol.def | 7 +++++++
|
||||
server/token.c | 30 +++++++++++++++++++++++++++---
|
||||
dlls/ntdll/unix/security.c | 23 ++++++++++++++---------
|
||||
server/protocol.def | 7 +++++++
|
||||
server/token.c | 30 +++++++++++++++++++++++++++---
|
||||
3 files changed, 48 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index ca26ab15..8aab0a48 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -400,7 +400,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c
|
||||
index 03a81afa46e..f0057116dee 100644
|
||||
--- a/dlls/ntdll/unix/security.c
|
||||
+++ b/dlls/ntdll/unix/security.c
|
||||
@@ -172,7 +172,7 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
|
||||
0, /* TokenAccessInformation */
|
||||
0, /* TokenVirtualizationAllowed */
|
||||
sizeof(DWORD), /* TokenVirtualizationEnabled */
|
||||
@@ -22,9 +22,9 @@ index ca26ab15..8aab0a48 100644
|
||||
0, /* TokenUIAccess */
|
||||
0, /* TokenMandatoryPolicy */
|
||||
0, /* TokenLogonSid */
|
||||
@@ -659,18 +659,23 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
}
|
||||
@@ -428,18 +428,23 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
|
||||
break;
|
||||
|
||||
case TokenIntegrityLevel:
|
||||
+ SERVER_START_REQ( get_token_integrity )
|
||||
{
|
||||
@@ -32,14 +32,14 @@ index ca26ab15..8aab0a48 100644
|
||||
- static const SID high_level = {SID_REVISION, 1, {SECURITY_MANDATORY_LABEL_AUTHORITY},
|
||||
- {SECURITY_MANDATORY_HIGH_RID}};
|
||||
-
|
||||
TOKEN_MANDATORY_LABEL *tml = tokeninfo;
|
||||
TOKEN_MANDATORY_LABEL *tml = info;
|
||||
- PSID psid = tml + 1;
|
||||
+ PSID sid = tml + 1;
|
||||
+ DWORD sid_len = tokeninfolength < sizeof(*tml) ? 0 : tokeninfolength - sizeof(*tml);
|
||||
+ DWORD sid_len = length < sizeof(*tml) ? 0 : length - sizeof(*tml);
|
||||
|
||||
- tml->Label.Sid = psid;
|
||||
- tml->Label.Attributes = SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED;
|
||||
- memcpy(psid, &high_level, sizeof(SID));
|
||||
- memcpy( psid, &high_level, sizeof(SID) );
|
||||
+ req->handle = wine_server_obj_handle( token );
|
||||
+ wine_server_set_reply( req, sid, sid_len );
|
||||
+ status = wine_server_call( req );
|
||||
@@ -52,13 +52,13 @@ index ca26ab15..8aab0a48 100644
|
||||
}
|
||||
+ SERVER_END_REQ;
|
||||
break;
|
||||
|
||||
case TokenAppContainerSid:
|
||||
{
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 11221d7d..1bfe3234 100644
|
||||
index 84f0b577d72..4d37a0df348 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3405,6 +3405,13 @@ enum caret_state
|
||||
@@ -3296,6 +3296,13 @@ enum caret_state
|
||||
VARARG(sid,SID); /* the sid specified by which_sid from the token */
|
||||
@END
|
||||
|
||||
@@ -73,10 +73,10 @@ index 11221d7d..1bfe3234 100644
|
||||
obj_handle_t handle; /* handle to the token */
|
||||
@REPLY
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index ccde0c2d..2d81118a 100644
|
||||
index 7c510fbdad9..d267991f751 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -113,6 +113,7 @@ struct token
|
||||
@@ -111,6 +111,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 ccde0c2d..2d81118a 100644
|
||||
};
|
||||
|
||||
struct privilege
|
||||
@@ -546,7 +547,8 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -553,7 +554,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 ccde0c2d..2d81118a 100644
|
||||
{
|
||||
struct token *token = alloc_object( &token_ops );
|
||||
if (token)
|
||||
@@ -630,6 +632,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -637,6 +639,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
}
|
||||
|
||||
token->source = source;
|
||||
@@ -102,7 +102,7 @@ index ccde0c2d..2d81118a 100644
|
||||
}
|
||||
return token;
|
||||
}
|
||||
@@ -685,7 +688,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
@@ -692,7 +695,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,7 +112,7 @@ index ccde0c2d..2d81118a 100644
|
||||
if (!token) return token;
|
||||
|
||||
/* copy groups */
|
||||
@@ -890,7 +894,7 @@ struct token *token_create_admin( void )
|
||||
@@ -898,7 +902,7 @@ struct token *token_create_admin( void )
|
||||
static const TOKEN_SOURCE admin_source = {"SeMgr", {0, 0}};
|
||||
token = create_token( TRUE, user_sid, admin_groups, ARRAY_SIZE( admin_groups ),
|
||||
admin_privs, ARRAY_SIZE( admin_privs ), default_dacl,
|
||||
@@ -121,7 +121,7 @@ index ccde0c2d..2d81118a 100644
|
||||
/* we really need a primary group */
|
||||
assert( token->primary_group );
|
||||
}
|
||||
@@ -1524,6 +1528,26 @@ DECL_HANDLER(get_token_sid)
|
||||
@@ -1532,6 +1536,26 @@ DECL_HANDLER(get_token_sid)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,5 +149,5 @@ index ccde0c2d..2d81118a 100644
|
||||
DECL_HANDLER(get_token_groups)
|
||||
{
|
||||
--
|
||||
2.19.1
|
||||
2.27.0
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user