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
123 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7c95fad661 | ||
|
67cc61ffca | ||
|
0df720506a | ||
|
68c91b3113 | ||
|
ac36f88de1 | ||
|
9fcd7e7113 | ||
|
903a8e54d4 | ||
|
3de6b17d8a | ||
|
74bd451363 | ||
|
22a1e1ff59 | ||
|
c781d177e1 | ||
|
f13c0f3cd8 | ||
|
9ebbbcfc9f | ||
|
d886426f50 | ||
|
d30bfe1a41 | ||
|
30825c59a9 | ||
|
7d03df647f | ||
|
a046f03792 | ||
|
b744f3d37b | ||
|
c52df465c1 | ||
|
09bfdcb009 | ||
|
2f449562d1 | ||
|
3c6c730333 | ||
|
809ee539f3 | ||
|
339892ffe6 | ||
|
2e7f83fbf8 | ||
|
9043eadbcb | ||
|
5386c7843d | ||
|
0675620019 | ||
|
552b6acf97 | ||
|
86c9842e64 | ||
|
d0e9447fb6 | ||
|
47ddb3a6d1 | ||
|
5a4ba9a546 | ||
|
b51c16c86a | ||
|
c1edf8d5c4 | ||
|
ebf2fb3d7d | ||
|
ca1e83ef3f | ||
|
054930fd52 | ||
|
56fd91825e | ||
|
a6b295029c | ||
|
ddf6dd7f6a | ||
|
524c64dd2a | ||
|
e470b33f7c | ||
|
556aa9335e | ||
|
0817bd1a57 | ||
|
2f7523bffe | ||
|
9fd0a6eb9d | ||
|
f5f50d333c | ||
|
2d3f9334f8 | ||
|
9466f14d52 | ||
|
79c4f4391e | ||
|
820cc2e861 | ||
|
29d69db459 | ||
|
7642c422ed | ||
|
d56138d8ec | ||
|
b5687dc502 | ||
|
7a15599a3a | ||
|
7e5038e76c | ||
|
30f3d023d5 | ||
|
a7a1f83013 | ||
|
53053927fd | ||
|
35cab4ef93 | ||
|
43b0d84ae9 | ||
|
825145217c | ||
|
99c6fe660f | ||
|
4a69f63a78 | ||
|
39fa530c33 | ||
|
564f8aeafc | ||
|
e77f05ee52 | ||
|
f352182c20 | ||
|
7bb4be5d03 | ||
|
ef956caf59 | ||
|
8e45d4c99f | ||
|
004109b3bd | ||
|
dd5b1514b2 | ||
|
34a6c25071 | ||
|
6dc4078d74 | ||
|
6fcc7f732d | ||
|
997c04f7f8 | ||
|
658fe4e3ae | ||
|
40aaeb61f8 | ||
|
6274002623 | ||
|
24af73d1d2 | ||
|
155a364280 | ||
|
9c1492069b | ||
|
c3d5bcab99 | ||
|
c3052d2e31 | ||
|
87fd81b9d8 | ||
|
062426558b | ||
|
1c6aeef3b4 | ||
|
f7de528788 | ||
|
8d45dc126d | ||
|
1a0d969d12 | ||
|
a926ab3deb | ||
|
d31a32b073 | ||
|
c21aa8beb3 | ||
|
67079f94ae | ||
|
c1dccff70a | ||
|
7b41306c4b | ||
|
2d7390de4b | ||
|
28bbb866f2 | ||
|
fc5a6b8c45 | ||
|
7398e80556 | ||
|
25bf8fbc02 | ||
|
b741e7191b | ||
|
aa76a0b8d2 | ||
|
d38c90ec2a | ||
|
44bba738bb | ||
|
264b4b3cab | ||
|
e63f3b7958 | ||
|
545aaf4153 | ||
|
6eb246a811 | ||
|
cd9fa06fcb | ||
|
33b3e62fc1 | ||
|
5808f78d07 | ||
|
8fa329cfe2 | ||
|
6cc7c450bf | ||
|
2aa8fe4524 | ||
|
3c0f6ef05f | ||
|
5a6af8c89c | ||
|
4c9309d05a | ||
|
5583aa9cc7 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*~
|
15
README.md
15
README.md
@@ -2,3 +2,18 @@ wine-compholio-daily
|
||||
====================
|
||||
|
||||
Daily updates for the Wine "Compholio" Edition.
|
||||
|
||||
Current patches include:
|
||||
* Support for interface change notifications (http://bugs.winehq.org/show_bug.cgi?id=32328)
|
||||
* Support for stored file ACLs (http://bugs.winehq.org/show_bug.cgi?id=31858)
|
||||
* Support for inherited file ACLs (http://bugs.winehq.org/show_bug.cgi?id=34406)
|
||||
* Support for Junction Points (http://bugs.winehq.org/show_bug.cgi?id=12401)
|
||||
* Support for TransmitFile (http://bugs.winehq.org/show_bug.cgi?id=5048)
|
||||
* Support for GetVolumePathName
|
||||
* Implement an Arial replacement font (http://bugs.winehq.org/show_bug.cgi?id=32323)
|
||||
* Allow CompareStringEx flag NORM_LINGUISTIC_CASING (http://bugs.winehq.org/show_bug.cgi?id=34269)
|
||||
* Workaround for TransactNamedPipe not being supported (http://bugs.winehq.org/show_bug.cgi?id=17273)
|
||||
* XEMBED support for embedding Wine windows inside Linux applications
|
||||
* Reduced SetTimer minimum value from 15 ms to 5 ms (improves Silverlight framerates)
|
||||
* Workaround for shlwapi URLs with relative paths
|
||||
* Support for PulseAudio backend for audio
|
||||
|
94
debian/changelog
vendored
94
debian/changelog
vendored
@@ -1,8 +1,100 @@
|
||||
wine-compholio (1.7.16-1) unstable; urgency=low
|
||||
* Fix build failure caused by dynamic unwind functions.
|
||||
* Dropped liblcms2-dev dependency for old Ubuntu versions.
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Sat, 05 Apr 2014 03:48:25 +0200
|
||||
|
||||
wine-compholio (1.7.16) unstable; urgency=low
|
||||
* Add stub for RtlInstallFunctionTableCallback.
|
||||
* Further split out the SIO_ADDRESS_LIST_CHANGE patches.
|
||||
* Add proper implementation for dynamic unwind functions, removed stub implementation.
|
||||
* Fix lcms dependency (Wine requires lcms2 instead of lcms1), add build dependency to libsane-dev.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 04 Apr 2014 17:27:52 -0600
|
||||
|
||||
wine-compholio (1.7.15-1) unstable; urgency=low
|
||||
* Build 64 bit version of Wine.
|
||||
* First SIO_ADDRESS_LIST_CHANGE patch accepted upstream.
|
||||
* Added stub dll for DirectX Video Acceleration (dxva2.dll).
|
||||
* Update DXVA2 patches (additional implementation details, parts accepted upstream).
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Tue, 25 Mar 2014 06:08:01 +0100
|
||||
|
||||
wine-compholio (1.7.15) unstable; urgency=low
|
||||
* Fixed build dependencies for Debian Sid.
|
||||
* Fixed free() of a const variable (Bug #1).
|
||||
* Removed get_dir_unix_fd (no longer used, fixes compiling with "-Werror").
|
||||
* Removed 'register user administrative tools shell folder' patch (accepted upstream).
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Sun, 23 Mar 2014 12:53:32 +0100
|
||||
|
||||
wine-compholio (1.7.14) unstable; urgency=low
|
||||
* Minor updates to the ACL patches.
|
||||
* Added Liberation Sans (SIL Open Font License) as an Arial replacement.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 07 Mar 2014 13:59:11 -0700
|
||||
|
||||
wine-compholio (1.7.13-1) unstable; urgency=low
|
||||
* Fixed a typo in the configure check for extended attributes.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 21 Feb 2014 09:00:00 -0700
|
||||
|
||||
wine-compholio (1.7.13) unstable; urgency=low
|
||||
* Added support for inherited file ACLs.
|
||||
* Further separated the file ACL patches.
|
||||
* Updated linguistic casing patches to include tests.
|
||||
* Updated the patch list template to be compatible with 'git am'.
|
||||
* Moved the patching code out of the debian rules into a Makefile.
|
||||
* Removed the named pipe security access patch (accepted upstream).
|
||||
* Explicitly run configure with '--with-xattr' when building debian packages.
|
||||
* Will now fail on configure when '--with-xattr' is passed and xattr.h cannot be found.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Thu, 20 Feb 2014 18:48:03 -0700
|
||||
|
||||
wine-compholio (1.7.12-1) unstable; urgency=low
|
||||
* Fixed PulseAudio patches to apply with 'git am'.
|
||||
* Fixed PulseAudio driver configure file for upstream Wine 1.7.12.
|
||||
* Fixed PulseAudio driver pthread dependency for upstream Wine 1.7.12.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 07 Feb 2014 17:52:32 -0700
|
||||
|
||||
wine-compholio (1.7.12) unstable; urgency=low
|
||||
* Added new patches to support GetVolumePathName.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 07 Feb 2014 14:57:33 -0700
|
||||
|
||||
wine-compholio (1.7.11) unstable; urgency=low
|
||||
* Added SRWLock patch.
|
||||
* Added new patches to support TransmitFile.
|
||||
* Added new patches to support Junction Points.
|
||||
* Moved pipelight-specific patches to a separate folder.
|
||||
* Removed SRWLock patch included in upstream Wine 1.7.11.
|
||||
* Reduced SetTimer minimum limitation from 15 ms to 5 ms.
|
||||
* Added support for security access parameters for named pipes.
|
||||
* Added WINE_STRICT_DRAW_ORDERING command line environment variable.
|
||||
* Fixed a path length bug in the ACL inheritance patch (assumed DOS limitation).
|
||||
* Added some workarounds for shlwapi url functions not handling relative paths well.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 17 Jan 2014 12:27:32 -0700
|
||||
|
||||
wine-compholio (1.7.10) unstable; urgency=low
|
||||
* Removed monitor enumeration patch included in upstream Wine 1.7.10.
|
||||
* Updated SIO_ADDRESS_LIST_CHANGE patch with latest proposed version.
|
||||
* Added new patch to support linux windowlessmode (required for Qt5 browsers).
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 03 Jan 2014 12:19:14 -0700
|
||||
|
||||
wine-compholio (1.7.9) unstable; urgency=low
|
||||
* Added a new patch for windowless mode for Qt5 browsers.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 27 Dec 2013 12:03:22 -0700
|
||||
|
||||
wine-compholio (1.7.8-1) unstable; urgency=low
|
||||
* Fixed several build problems.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Sat, 07 Dec 2013 10:49:03 -0700
|
||||
|
||||
wine-compholio (1.7.8) unstable; urgency=low
|
||||
* Added PulseAudio support patches.
|
||||
* Updated SIO_ADDRESS_LIST_CHANGE patches.
|
||||
* Separated out patches into logical subfolders.
|
||||
* Updated XEMBED patch to work with latest upstream Wine.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 06 Dec 2013 13:26:24 -0700
|
||||
|
||||
wine-compholio (1.7.7) unstable; urgency=low
|
||||
* Remove patches included in upstream Wine 1.7.7.
|
||||
* Rebase ACL extended attribute patches against upstream Wine 1.7.7.
|
||||
* Rebase SIO_ADDRESS_LIST_CHANGE patches against upstream Wine 1.7.7.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 22 Nov 2013 10:35:07 -0700
|
||||
* Added the ability to return the list of patches with "wine --patches".
|
||||
* Added a patch to workaround a Silverlight issue with multiple monitors.
|
||||
-- Erich E. Hoover <erich.e.hoover@gmail.com> Fri, 22 Nov 2013 14:24:53 -0700
|
||||
|
||||
wine-compholio (1.7.6-1) unstable; urgency=low
|
||||
* Work around a build problem with Wine 1.7.6.
|
||||
|
179
debian/control
vendored
179
debian/control
vendored
@@ -5,27 +5,21 @@ Maintainer: Erich E. Hoover <ehoover@mines.edu>
|
||||
XSBC-Original-Maintainer: Scott Ritchie <scottritchie@ubuntu.com>
|
||||
Build-Depends: autotools-dev,
|
||||
autoconf,
|
||||
bind9-host,
|
||||
bison,
|
||||
bsdmainutils,
|
||||
coreutils,
|
||||
debhelper (>= 7),
|
||||
docbook-to-man,
|
||||
docbook-utils,
|
||||
docbook-xsl,
|
||||
flex,
|
||||
fontforge,
|
||||
gawk,
|
||||
gcc-4.5 | gcc-4.7 | ubuntu-desktop (<< 1.207),
|
||||
gcc-4.5-multilib [amd64] | ubuntu-desktop (<< 1.207) [amd64],
|
||||
gcc-multilib [amd64],
|
||||
gettext,
|
||||
ia32-libs [amd64],
|
||||
ia32-libs-dev [amd64] | ubuntu-desktop (<< 1.267) [amd64],
|
||||
ia32-libs-multiarch [amd64] | ubuntu-desktop (<< 1.267) [amd64],
|
||||
lib32asound2-dev [amd64],
|
||||
lib32ncurses5-dev [amd64],
|
||||
lib32z1-dev [amd64],
|
||||
gzip,
|
||||
libacl1-dev,
|
||||
libasound2-dev [i386 lpia],
|
||||
libc6-dev-i386 [amd64],
|
||||
libasound2-dev,
|
||||
libcapi20-dev,
|
||||
libcups2-dev,
|
||||
libdbus-1-dev,
|
||||
@@ -38,22 +32,23 @@ Build-Depends: autotools-dev,
|
||||
libglu1-mesa-dev | libglu-dev,
|
||||
libgnutls-dev,
|
||||
libgphoto2-dev | libgphoto2-6-dev | libgphoto2-2-dev (>= 2.4.6),
|
||||
libgphoto2port-dev | ubuntu-desktop (>= 1.245) | debian-edu-config,
|
||||
libgsm1-dev,
|
||||
libgstreamer-plugins-base0.10-dev,
|
||||
libgstreamer0.10-dev,
|
||||
libice-dev,
|
||||
libjpeg-dev,
|
||||
liblcms1-dev, liblcms-dev,
|
||||
liblcms2-dev | ubuntu-desktop (<< 1.267),
|
||||
libldap2-dev, libldap-dev,
|
||||
libmpg123-dev,
|
||||
libncurses5-dev [i386] | libncurses-dev [i386],
|
||||
libncurses5-dev | libncurses-dev,
|
||||
libopenal-dev (>= 1:1.12) | ubuntu-desktop (<< 1.207),
|
||||
libpng12-dev,
|
||||
libpulse-dev,
|
||||
libsane-dev,
|
||||
libssl-dev,
|
||||
libstdc++6-4.5-dev | libstdc++-dev,
|
||||
libtiff4-dev,
|
||||
libv4l-dev [i386],
|
||||
libtiff5-dev | libtiff4-dev | libtiff-dev,
|
||||
libv4l-dev,
|
||||
libx11-dev,
|
||||
libxcomposite-dev,
|
||||
libxcursor-dev,
|
||||
@@ -68,14 +63,14 @@ Build-Depends: autotools-dev,
|
||||
libxxf86vm-dev,
|
||||
linux-kernel-headers,
|
||||
linux-libc-dev,
|
||||
prelink [i386 amd64],
|
||||
prelink,
|
||||
quilt (>= 0.46-7~),
|
||||
sharutils,
|
||||
unixodbc-dev,
|
||||
x11proto-xinerama-dev
|
||||
Standards-Version: 3.9.2
|
||||
|
||||
Package: wine-compholio
|
||||
Package: wine-compholio-i386
|
||||
Architecture: i386
|
||||
Multi-Arch: foreign
|
||||
Pre-Depends: dpkg (>= 1.14.12ubuntu3), ${misc:Pre-Depends}
|
||||
@@ -91,7 +86,7 @@ Recommends: gettext,
|
||||
libgif4,
|
||||
libgnutls26,
|
||||
libgphoto2-6 | libgphoto2-2 (>= 2.4.6),
|
||||
libgphoto2-port0 (>= 2.4.6),
|
||||
libgphoto2-port10 | libgphoto2-port0 (>= 2.4.6),
|
||||
libjpeg8,
|
||||
libopenal1 (>= 1:1.12),
|
||||
libosmesa6,
|
||||
@@ -99,7 +94,7 @@ Recommends: gettext,
|
||||
libpulse0,
|
||||
libsane,
|
||||
libssl1.0.0,
|
||||
libtiff4,
|
||||
libtiff5 | libtiff4,
|
||||
libv4l-0,
|
||||
libxcomposite1,
|
||||
libxcursor1,
|
||||
@@ -111,7 +106,95 @@ Recommends: gettext,
|
||||
libxt6,
|
||||
libxxf86vm1,
|
||||
unixodbc
|
||||
Provides: wine-compholio
|
||||
Section: otherosfs
|
||||
Priority: optional
|
||||
Replaces: wine-compholio (<< 1.7.15-1~)
|
||||
Breaks: wine-compholio (<< 1.7.15-1~)
|
||||
Description: The Compholio Edition is a special build of the popular Wine software
|
||||
with patches representing my current staging tree for Wine.
|
||||
Currently these patches fix:
|
||||
* Netflix on Firefox hangs with loading bar at 100% (Bug 31993).
|
||||
* Netflix on Firefox fails with Internet Connection Problem when loading bar is
|
||||
at 99% (Bug 31858).
|
||||
.
|
||||
Microsoft Windows Compatibility Layer (Binary Emulator and Library)
|
||||
Wine is a compatibility layer for running Windows applications on Linux.
|
||||
Applications are run at full speed without the need of cpu emulation. Wine
|
||||
does not require Microsoft Windows, however it can use native system dll
|
||||
files in place of its own if they are available.
|
||||
.
|
||||
This package provides support for loading 32-bit x86 Windows applications
|
||||
.
|
||||
This package is based on a recent Wine beta. While many more applications will
|
||||
work, there may be some loss of functionality compared with the stable release
|
||||
provided by the regular wine package.
|
||||
|
||||
Package: wine-compholio-amd64
|
||||
Architecture: amd64
|
||||
Multi-Arch: foreign
|
||||
Pre-Depends: dpkg (>= 1.14.12ubuntu3), ${misc:Pre-Depends}
|
||||
Depends: ${shlibs:Depends},
|
||||
libasound2-plugins,
|
||||
libncurses5
|
||||
Recommends: gettext,
|
||||
libcapi20-3,
|
||||
libcups2,
|
||||
libdbus-1-3,
|
||||
libfontconfig1 | libfontconfig,
|
||||
libfreetype6,
|
||||
libgif4,
|
||||
libgnutls26,
|
||||
libgphoto2-6 | libgphoto2-2 (>= 2.4.6),
|
||||
libgphoto2-port10 | libgphoto2-port0 (>= 2.4.6),
|
||||
libjpeg8,
|
||||
libopenal1 (>= 1:1.12),
|
||||
libosmesa6,
|
||||
libpng12-0,
|
||||
libpulse0,
|
||||
libsane,
|
||||
libssl1.0.0,
|
||||
libtiff5 | libtiff4,
|
||||
libv4l-0,
|
||||
libxcomposite1,
|
||||
libxcursor1,
|
||||
libxi6,
|
||||
libxinerama1,
|
||||
libxrandr2,
|
||||
libxrender1,
|
||||
libxslt1.1,
|
||||
libxt6,
|
||||
libxxf86vm1,
|
||||
unixodbc
|
||||
Section: otherosfs
|
||||
Priority: optional
|
||||
Replaces: wine-compholio (<< 1.7.15-1~)
|
||||
Breaks: wine-compholio (<< 1.7.15-1~)
|
||||
Description: The Compholio Edition is a special build of the popular Wine software
|
||||
with patches representing my current staging tree for Wine.
|
||||
Currently these patches fix:
|
||||
* Netflix on Firefox hangs with loading bar at 100% (Bug 31993).
|
||||
* Netflix on Firefox fails with Internet Connection Problem when loading bar is
|
||||
at 99% (Bug 31858).
|
||||
.
|
||||
Microsoft Windows Compatibility Layer (Binary Emulator and Library)
|
||||
Wine is a compatibility layer for running Windows applications on Linux.
|
||||
Applications are run at full speed without the need of cpu emulation. Wine
|
||||
does not require Microsoft Windows, however it can use native system dll
|
||||
files in place of its own if they are available.
|
||||
.
|
||||
This package provides support for loading 64-bit x86 Windows applications
|
||||
.
|
||||
This package is based on a recent Wine beta. While many more applications will
|
||||
work, there may be some loss of functionality compared with the stable release
|
||||
provided by the regular wine package.
|
||||
|
||||
Package: wine-compholio
|
||||
Architecture: i386 amd64
|
||||
Multi-Arch: foreign
|
||||
Pre-Depends: dpkg (>= 1.14.12ubuntu3), ${misc:Pre-Depends}
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends},
|
||||
wine-compholio-i386 (= ${binary:Version}) [i386 amd64],
|
||||
wine-compholio-amd64 (= ${binary:Version}) [amd64],
|
||||
Section: otherosfs
|
||||
Priority: optional
|
||||
Description: The Compholio Edition is a special build of the popular Wine software
|
||||
@@ -134,3 +217,57 @@ Description: The Compholio Edition is a special build of the popular Wine softwa
|
||||
This package is based on a recent Wine beta. While many more applications will
|
||||
work, there may be some loss of functionality compared with the stable release
|
||||
provided by the regular wine package.
|
||||
|
||||
Package: wine-compholio-dev
|
||||
Architecture: i386 amd64
|
||||
Pre-Depends: dpkg (>= 1.14.12ubuntu3), ${misc:Pre-Depends}
|
||||
Depends: libc6-dev,
|
||||
${shlibs:Depends},
|
||||
wine-compholio-i386 (= ${binary:Version}) [i386 amd64],
|
||||
wine-compholio-amd64 (= ${binary:Version}) [amd64],
|
||||
Section: libdevel
|
||||
Priority: optional
|
||||
Replaces: wine-compholio (<< 1.7.15-1~)
|
||||
Breaks: wine-compholio (<< 1.7.15-1~)
|
||||
Description: The Compholio Edition is a special build of the popular Wine software
|
||||
with patches representing my current staging tree for Wine.
|
||||
Currently these patches fix:
|
||||
* Netflix on Firefox hangs with loading bar at 100% (Bug 31993).
|
||||
* Netflix on Firefox fails with Internet Connection Problem when loading bar is
|
||||
at 99% (Bug 31858).
|
||||
.
|
||||
Microsoft Windows Compatibility Layer (Binary Emulator and Library)
|
||||
Wine is a compatibility layer for running Windows applications on Linux.
|
||||
Applications are run at full speed without the need of cpu emulation. Wine
|
||||
does not require Microsoft Windows, however it can use native system dll
|
||||
files in place of its own if they are available.
|
||||
.
|
||||
This package consists of the development files needed to compile programs
|
||||
using wine's free version of the Microsoft Windows API.
|
||||
|
||||
Package: wine-compholio-dbg
|
||||
Architecture: i386 amd64
|
||||
Multi-Arch: same
|
||||
Pre-Depends: dpkg (>= 1.14.12ubuntu3), ${misc:Pre-Depends}
|
||||
Depends: ${shlibs:Depends},
|
||||
wine-compholio-i386 (= ${binary:Version}) [i386 amd64],
|
||||
wine-compholio-amd64 (= ${binary:Version}) [amd64],
|
||||
Section: debug
|
||||
Priority: optional
|
||||
Replaces: wine-compholio (<< 1.7.15-1~)
|
||||
Breaks: wine-compholio (<< 1.7.15-1~)
|
||||
Description: The Compholio Edition is a special build of the popular Wine software
|
||||
with patches representing my current staging tree for Wine.
|
||||
Currently these patches fix:
|
||||
* Netflix on Firefox hangs with loading bar at 100% (Bug 31993).
|
||||
* Netflix on Firefox fails with Internet Connection Problem when loading bar is
|
||||
at 99% (Bug 31858).
|
||||
.
|
||||
Microsoft Windows Compatibility Layer (Binary Emulator and Library)
|
||||
Wine is a compatibility layer for running Windows applications on Linux.
|
||||
Applications are run at full speed without the need of cpu emulation. Wine
|
||||
does not require Microsoft Windows, however it can use native system dll
|
||||
files in place of its own if they are available.
|
||||
.
|
||||
This package includes debugging symbols useful for reporting crashes and other
|
||||
failures.
|
||||
|
165
debian/rules
vendored
165
debian/rules
vendored
@@ -1,36 +1,4 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
|
||||
CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
|
||||
else
|
||||
CROSS= --build $(DEB_BUILD_GNU_TYPE)
|
||||
endif
|
||||
|
||||
|
||||
# Apparently it's important to have an empty LDFLAGS, see:
|
||||
# http://www.winehq.org/pipermail/wine-bugs/2007-July/062505.html
|
||||
# For Wine 1.1.44 it's also important not to compile at -O0
|
||||
LDFLAGS =
|
||||
CFLAGS = -Wall -g -O2
|
||||
|
||||
# On amd64 the 32-bit libraries are in lib32 instead of lib
|
||||
ifeq ($(DEB_BUILD_ARCH), amd64)
|
||||
CONFFLAGS += --libdir=\$${prefix}/lib32
|
||||
endif
|
||||
|
||||
# Use gcc-4.5 if it's available
|
||||
ifeq ($(shell which gcc-4.5),)
|
||||
@@ -39,113 +7,40 @@ else
|
||||
CC = gcc-4.5
|
||||
endif
|
||||
|
||||
# Support passing of parallel=<n> in build options
|
||||
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
MAKEFLAGS += -j$(NUMJOBS)
|
||||
endif
|
||||
%:
|
||||
dh $@ --parallel
|
||||
|
||||
configure:
|
||||
# Unpack the original Wine version
|
||||
tar -xjvf wine-*.tar.bz2
|
||||
mv wine-*/* .
|
||||
rm wine-*/.* || true
|
||||
rm wine-*.tar.bz2
|
||||
rmdir wine-*
|
||||
override_dh_auto_configure:
|
||||
|
||||
config.status: configure
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
||||
cp -f /usr/share/misc/config.sub config.sub
|
||||
endif
|
||||
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
||||
cp -f /usr/share/misc/config.guess config.guess
|
||||
endif
|
||||
# Apply our patches, reconfigure, and update the wineserver protocol request data
|
||||
make -C "$(CURDIR)/patches/" DESTDIR="$(CURDIR)" install
|
||||
|
||||
# Apply our patches to Wine
|
||||
for FILE in `ls $(CURDIR)/patches`; do \
|
||||
patch -N -p0 --strip=1 < $(CURDIR)/patches/$$FILE || exit 1; \
|
||||
done
|
||||
|
||||
# Update the configure script
|
||||
autoreconf
|
||||
|
||||
# Configure
|
||||
CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/opt/wine-compholio --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info $(CONFFLAGS)
|
||||
|
||||
|
||||
|
||||
build: build-stamp
|
||||
|
||||
build-stamp: config.status
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
$(MAKE) depend
|
||||
$(MAKE) $(MAKEFLAGS)
|
||||
#docbook-to-man debian/wine-compholio.sgml > wine-compholio.1
|
||||
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
[ ! -f Makefile ] || $(MAKE) distclean
|
||||
rm -f config.sub config.guess
|
||||
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/wine-compholio.
|
||||
$(MAKE) DESTDIR=$(CURDIR)/debian/wine-compholio install
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
# dh_installchangelogs ChangeLog
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
# dh_install
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_python
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
dh_installman
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
dh_makeshlibs
|
||||
dh_installdeb
|
||||
ifeq ($(DEB_BUILD_ARCH), amd64)
|
||||
dh_gencontrol -- -V"shlibs:Depends= ia32-libs (>= 1.6), lib32asound2 (>> 1.0.14), libc6-i386 (>= 2.6-1), lib32nss-mdns (>= 0.10-3)"
|
||||
./configure --prefix=/opt/wine-compholio --libdir=\$${prefix}/lib64 --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-win64 --with-xattr $(CONFFLAGS)
|
||||
else
|
||||
LD_LIBRARY_PATH="$(CURDIR)/debian/wine-compholio/opt/wine-compholio/lib:${LD_LIBRARY_PATH}" dh_shlibdeps -L wine-compholio -l debian/wine-compholio/opt/wine-compholio/lib
|
||||
dh_gencontrol
|
||||
./configure --prefix=/opt/wine-compholio --libdir=\$${prefix}/lib --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-xattr $(CONFFLAGS)
|
||||
endif
|
||||
dh_md5sums
|
||||
dh_builddeb -- -Z lzma
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
||||
override_dh_auto_test:
|
||||
# Wine's test suite does not pass on build daemons, skip it for now
|
||||
|
||||
override_dh_installdocs:
|
||||
dh_installdocs --link-doc=wine-compholio
|
||||
|
||||
override_dh_install:
|
||||
dh_install --fail-missing
|
||||
# These files will end up in multiple packages otherwise
|
||||
rm -f debian/wine-compholio/opt/wine-compholio/bin/wine
|
||||
rm -f debian/wine-compholio/opt/wine-compholio/bin/wine-preloader
|
||||
rm -f debian/wine-compholio/opt/wine-compholio/bin/wine64
|
||||
rm -f debian/wine-compholio/opt/wine-compholio/bin/wine64-preloader
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip -Xwine-pthread -Xwine-kthread --dbg-package=wine-compholio-dbg
|
||||
|
||||
override_dh_shlibdeps:
|
||||
ifeq ($(DEB_HOST_ARCH),amd64)
|
||||
dh_shlibdeps -l $(CURDIR)/debian/tmp/opt/wine-compholio/lib64/
|
||||
else
|
||||
dh_shlibdeps -l $(CURDIR)/debian/tmp/opt/wine-compholio/lib/
|
||||
endif
|
||||
|
166
debian/tools/generate-patchlist.sh
vendored
Executable file
166
debian/tools/generate-patchlist.sh
vendored
Executable file
@@ -0,0 +1,166 @@
|
||||
#!/bin/sh
|
||||
PATCH_DATA="";
|
||||
|
||||
for FILE in patches/*/*.def; do
|
||||
UUID=$(echo "${FILE}" | sed -e 's|^.*/||g' -e 's|\.def$||g');
|
||||
REVISION=$(cat "${FILE}" | sed -n 's|Revision: \(.*\)|\1|p');
|
||||
AUTHOR=$(cat "${FILE}" | sed -n 's|Author: \(.*\)|\1|p');
|
||||
TITLE=$(cat "${FILE}" | sed -n 's|Title: \(.*\)|\1|p');
|
||||
if [ "${AUTHOR}" = "" ] && [ "${TITLE}" = "" ]; then
|
||||
continue;
|
||||
fi
|
||||
if [ "${PATCH_DATA}" != "" ]; then
|
||||
PATCH_DATA="${PATCH_DATA}
|
||||
";
|
||||
fi
|
||||
PATCH_DATA="${PATCH_DATA}+ { \"${UUID}:${REVISION}\", \"${AUTHOR}\", \"${TITLE}\" },";
|
||||
done
|
||||
|
||||
PATCH_LINES=$(echo "${PATCH_DATA}" | wc -l);
|
||||
PATCH_LINES=$((${PATCH_LINES}+20));
|
||||
PATCH_DATA=$(echo "${PATCH_DATA}" | sed ':a;N;$!ba;s/\n/\\n/g');
|
||||
|
||||
cat <<EOF | sed -e "s|##PATCH_LINES##|${PATCH_LINES}|" \
|
||||
-e "s|##PATCH_DATA##|${PATCH_DATA}|"
|
||||
From: "FDS-Team" <webmaster@fds-team.de>
|
||||
Subject: Autogenerated patch list.
|
||||
|
||||
---
|
||||
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
|
||||
index 8bd4eb7..4b4c318 100644
|
||||
--- a/dlls/ntdll/misc.c
|
||||
+++ b/dlls/ntdll/misc.c
|
||||
@@ -60,6 +60,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 70bf94f..42eddcf 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1410,6 +1410,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/libs/wine/config.c b/libs/wine/config.c
|
||||
index a273502..5fa0cd5 100644
|
||||
--- a/libs/wine/config.c
|
||||
+++ b/libs/wine/config.c
|
||||
@@ -478,6 +478,##PATCH_LINES## @@ const char *wine_get_version(void)
|
||||
return PACKAGE_VERSION;
|
||||
}
|
||||
|
||||
+struct wine_patch {
|
||||
+ const char *hash;
|
||||
+ const char *author;
|
||||
+ const char *title;
|
||||
+} wine_patch_data[] = {
|
||||
##PATCH_DATA##
|
||||
+ { NULL, NULL, NULL }
|
||||
+};
|
||||
+
|
||||
+/* return the applied non-standard patches */
|
||||
+const void * wine_get_patches(void)
|
||||
+{
|
||||
+ return &wine_patch_data[0];
|
||||
+}
|
||||
+
|
||||
/* return the build id string */
|
||||
const char *wine_get_build_id(void)
|
||||
{
|
||||
diff --git a/libs/wine/wine.def b/libs/wine/wine.def
|
||||
index ed315bd..5b42029 100644
|
||||
--- a/libs/wine/wine.def
|
||||
+++ b/libs/wine/wine.def
|
||||
@@ -83,6 +83,7 @@ EXPORTS
|
||||
wine_get_sortkey
|
||||
wine_get_user_name
|
||||
wine_get_version
|
||||
+ wine_get_patches
|
||||
wine_init
|
||||
wine_init_argv0_path
|
||||
wine_is_dbcs_leadbyte
|
||||
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 ac67290..516fd82 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -79,6 +79,12 @@ static inline void reserve_area( void *addr, size_t size )
|
||||
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
+struct wine_patch {
|
||||
+ const char *hash;
|
||||
+ const char *author;
|
||||
+ const char *title;
|
||||
+};
|
||||
+
|
||||
/***********************************************************************
|
||||
* check_command_line
|
||||
*
|
||||
@@ -89,7 +96,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)
|
||||
{
|
||||
@@ -106,6 +114,16 @@ 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 wine_patch *wine_patch_data = wine_get_patches();
|
||||
+ for(; wine_patch_data->hash != NULL; wine_patch_data++)
|
||||
+ {
|
||||
+ printf( "%s :: %s :: %s\n", wine_patch_data->hash, wine_patch_data->author,
|
||||
+ wine_patch_data->title );
|
||||
+ }
|
||||
+ exit(0);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
diff --git a/include/wine/library.h b/include/wine/library.h
|
||||
index 242bb69..aa9e585 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 );
|
||||
EOF
|
572
debian/tools/gitapply.sh
vendored
Executable file
572
debian/tools/gitapply.sh
vendored
Executable file
File diff suppressed because it is too large
Load Diff
4
debian/wine-compholio-amd64.install
vendored
Normal file
4
debian/wine-compholio-amd64.install
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/opt/wine-compholio/lib64/libwine.so*
|
||||
/opt/wine-compholio/lib64/wine
|
||||
/opt/wine-compholio/bin/wine64
|
||||
/opt/wine-compholio/bin/wine64-preloader
|
1
debian/wine-compholio-dev.install
vendored
Normal file
1
debian/wine-compholio-dev.install
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/opt/wine-compholio/include
|
4
debian/wine-compholio-i386.install
vendored
Normal file
4
debian/wine-compholio-i386.install
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/opt/wine-compholio/lib/libwine.so*
|
||||
/opt/wine-compholio/lib/wine
|
||||
/opt/wine-compholio/bin/wine
|
||||
/opt/wine-compholio/bin/wine-preloader
|
4
debian/wine-compholio.docs
vendored
Normal file
4
debian/wine-compholio.docs
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
documentation/README.*
|
||||
ANNOUNCE
|
||||
AUTHORS
|
||||
README
|
2
debian/wine-compholio.install
vendored
Normal file
2
debian/wine-compholio.install
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/opt/wine-compholio/bin
|
||||
/opt/wine-compholio/share
|
@@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
PATCH_DATA="";
|
||||
for FILE in patches/*.patch; do
|
||||
MD5SUM=$(md5sum "${FILE}" | sed 's| .*||g');
|
||||
AUTHOR=$(cat "${FILE}" | sed -n 's|From: \([^<]*\).*|\1|p' | sed -e 's|"||g' -e 's| $||g');
|
||||
TITLE=$(cat "${FILE}" | sed -n '1!N; s|Subject: \(.*\)\n|\1|p');
|
||||
if [ "${PATCH_DATA}" != "" ]; then
|
||||
PATCH_DATA="${PATCH_DATA}
|
||||
";
|
||||
fi
|
||||
PATCH_DATA="${PATCH_DATA}+ { \"${MD5SUM}\", \"${AUTHOR}\", \"${TITLE}\" },";
|
||||
done
|
||||
PATCH_LINES=$(echo "${PATCH_DATA}" | grep -c '\n');
|
||||
PATCH_LINES=$((${PATCH_LINES}+20));
|
||||
PATCH_DATA=$(echo "${PATCH_DATA}" | sed ':a;N;$!ba;s/\n/\\n/g');
|
||||
cat patch-list-template.diff | sed \
|
||||
-e "s|##PATCH_LINES##|${PATCH_LINES}|" \
|
||||
-e "s|##PATCH_DATA##|${PATCH_DATA}|"
|
||||
#
|
@@ -1,95 +0,0 @@
|
||||
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
||||
index a273502..751a9e7 100644
|
||||
--- a/libs/wine/config.c
|
||||
+++ b/libs/wine/config.c
|
||||
@@ -478,6 +478,##PATCH_LINES## @@ const char *wine_get_version(void)
|
||||
return PACKAGE_VERSION;
|
||||
}
|
||||
|
||||
+struct wine_patch {
|
||||
+ const char *hash;
|
||||
+ const char *author;
|
||||
+ const char *title;
|
||||
+} wine_patch_data[] = {
|
||||
##PATCH_DATA##
|
||||
+ { NULL, NULL, NULL }
|
||||
+};
|
||||
+
|
||||
+/* return the applied non-standard patches */
|
||||
+const struct wine_patch * wine_get_patches(void)
|
||||
+{
|
||||
+ return &wine_patch_data[0];
|
||||
+}
|
||||
+
|
||||
/* return the build id string */
|
||||
const char *wine_get_build_id(void)
|
||||
{
|
||||
diff --git a/libs/wine/wine.def b/libs/wine/wine.def
|
||||
index ed315bd..5b42029 100644
|
||||
--- a/libs/wine/wine.def
|
||||
+++ b/libs/wine/wine.def
|
||||
@@ -83,6 +83,7 @@ EXPORTS
|
||||
wine_get_sortkey
|
||||
wine_get_user_name
|
||||
wine_get_version
|
||||
+ wine_get_patches
|
||||
wine_init
|
||||
wine_init_argv0_path
|
||||
wine_is_dbcs_leadbyte
|
||||
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 ac67290..516fd82 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -79,6 +79,13 @@ static inline void reserve_area( void *addr, size_t size )
|
||||
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
+struct wine_patch {
|
||||
+ const char *hash;
|
||||
+ const char *author;
|
||||
+ const char *title;
|
||||
+};
|
||||
+extern void * CDECL wine_get_patches(void);
|
||||
+
|
||||
/***********************************************************************
|
||||
* check_command_line
|
||||
*
|
||||
@@ -89,7 +96,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)
|
||||
{
|
||||
@@ -106,6 +114,16 @@ static void check_command_line( int argc, char *argv[] )
|
||||
printf( "%s\n", wine_get_build_id() );
|
||||
exit(0);
|
||||
}
|
||||
+ if (!strcmp( argv[1], "--patches" ))
|
||||
+ {
|
||||
+ struct wine_patch *wine_patch_data = wine_get_patches();
|
||||
+ for(; wine_patch_data->hash != NULL; wine_patch_data++)
|
||||
+ {
|
||||
+ printf( "%s :: %s :: %s\n", wine_patch_data->hash, wine_patch_data->author,
|
||||
+ wine_patch_data->title );
|
||||
+ }
|
||||
+ exit(0);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
@@ -1,84 +0,0 @@
|
||||
From c1f305f001257ac6bc215abd34c1577e7d9bf7f2 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Fri, 4 Oct 2013 08:10:20 -0600
|
||||
Subject: ws2_32: Ask the server to process unsupported WSAIoctl operations.
|
||||
|
||||
---
|
||||
dlls/ws2_32/socket.c | 47 ++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 44 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
|
||||
index 679258b..44a9093 100644
|
||||
--- a/dlls/ws2_32/socket.c
|
||||
+++ b/dlls/ws2_32/socket.c
|
||||
@@ -3608,6 +3608,36 @@ static const char *debugstr_wsaioctl(DWORD ioctl)
|
||||
(USHORT)(ioctl & 0xffff));
|
||||
}
|
||||
|
||||
+/* do an ioctl call through the server */
|
||||
+static DWORD server_ioctl_sock( SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size,
|
||||
+ LPVOID out_buff, DWORD out_size, LPDWORD ret_size,
|
||||
+ LPWSAOVERLAPPED overlapped,
|
||||
+ LPWSAOVERLAPPED_COMPLETION_ROUTINE completion )
|
||||
+{
|
||||
+ HANDLE event = overlapped ? overlapped->hEvent : 0;
|
||||
+ HANDLE handle = SOCKET2HANDLE( s );
|
||||
+ struct ws2_async *wsa;
|
||||
+ NTSTATUS status;
|
||||
+ PIO_STATUS_BLOCK io;
|
||||
+
|
||||
+ if (!(wsa = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*wsa) )))
|
||||
+ return WSA_NOT_ENOUGH_MEMORY;
|
||||
+ wsa->hSocket = handle;
|
||||
+ wsa->user_overlapped = overlapped;
|
||||
+ wsa->completion_func = completion;
|
||||
+ io = (overlapped ? (PIO_STATUS_BLOCK)overlapped : &wsa->local_iosb);
|
||||
+
|
||||
+ status = NtDeviceIoControlFile( handle, event, (PIO_APC_ROUTINE)ws2_async_apc, wsa, io, code,
|
||||
+ in_buff, in_size, out_buff, out_size );
|
||||
+ if (status == STATUS_NOT_SUPPORTED)
|
||||
+ FIXME("Unsupported ioctl %x (device=%x access=%x func=%x method=%x)\n",
|
||||
+ code, code >> 16, (code >> 14) & 3, (code >> 2) & 0xfff, code & 3);
|
||||
+
|
||||
+ if (status != STATUS_PENDING) RtlFreeHeap( GetProcessHeap(), 0, wsa );
|
||||
+
|
||||
+ return NtStatusToWSAError( status );
|
||||
+}
|
||||
+
|
||||
/**********************************************************************
|
||||
* WSAIoctl (WS2_32.50)
|
||||
*
|
||||
@@ -3800,9 +3830,8 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
|
||||
}
|
||||
|
||||
case WS_SIO_ADDRESS_LIST_CHANGE:
|
||||
- FIXME("-> SIO_ADDRESS_LIST_CHANGE request: stub\n");
|
||||
- /* FIXME: error and return code depend on whether socket was created
|
||||
- * with WSA_FLAG_OVERLAPPED, but there is no easy way to get this */
|
||||
+ TRACE("-> SIO_ADDRESS_LIST_CHANGE request\n");
|
||||
+ status = WSAEOPNOTSUPP; /* this operation needs to be handled by the server */
|
||||
break;
|
||||
|
||||
case WS_SIO_ADDRESS_LIST_QUERY:
|
||||
@@ -4045,6 +4074,18 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (status == WSAEOPNOTSUPP)
|
||||
+ {
|
||||
+ status = server_ioctl_sock(s, code, in_buff, in_size, out_buff, out_size, ret_size,
|
||||
+ overlapped, completion);
|
||||
+ if (status != WSAEOPNOTSUPP)
|
||||
+ {
|
||||
+ /* overlapped and completion operations will be handled by the server */
|
||||
+ completion = NULL;
|
||||
+ overlapped = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (completion)
|
||||
{
|
||||
FIXME( "completion routine %p not supported\n", completion );
|
||||
--
|
||||
1.7.9.5
|
||||
|
@@ -1,440 +0,0 @@
|
||||
From aa5c2e5b4bf9716af3ea2065a3d3de10c840f59b Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Mon, 18 Nov 2013 17:22:04 -0700
|
||||
Subject: server: Implement an interface change notification object.
|
||||
|
||||
---
|
||||
server/event.c | 13 +++
|
||||
server/named_pipe.c | 13 ---
|
||||
server/object.h | 1 +
|
||||
server/sock.c | 289 ++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
4 files changed, 301 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/server/event.c b/server/event.c
|
||||
index b8515af..e8a3888 100644
|
||||
--- a/server/event.c
|
||||
+++ b/server/event.c
|
||||
@@ -124,6 +124,19 @@ struct event *create_event( struct directory *root, const struct unicode_str *na
|
||||
return event;
|
||||
}
|
||||
|
||||
+obj_handle_t alloc_wait_event( struct process *process )
|
||||
+{
|
||||
+ obj_handle_t handle = 0;
|
||||
+ struct event *event = create_event( NULL, NULL, 0, 1, 0, NULL );
|
||||
+
|
||||
+ if (event)
|
||||
+ {
|
||||
+ handle = alloc_handle( process, event, EVENT_ALL_ACCESS, 0 );
|
||||
+ release_object( event );
|
||||
+ }
|
||||
+ return handle;
|
||||
+}
|
||||
+
|
||||
struct event *get_event_obj( struct process *process, obj_handle_t handle, unsigned int access )
|
||||
{
|
||||
return (struct event *)get_handle_obj( process, handle, access, &event_ops );
|
||||
diff --git a/server/named_pipe.c b/server/named_pipe.c
|
||||
index 4c85104..6ba2145 100644
|
||||
--- a/server/named_pipe.c
|
||||
+++ b/server/named_pipe.c
|
||||
@@ -587,19 +587,6 @@ static enum server_fd_type pipe_client_get_fd_type( struct fd *fd )
|
||||
return FD_TYPE_PIPE;
|
||||
}
|
||||
|
||||
-static obj_handle_t alloc_wait_event( struct process *process )
|
||||
-{
|
||||
- obj_handle_t handle = 0;
|
||||
- struct event *event = create_event( NULL, NULL, 0, 1, 0, NULL );
|
||||
-
|
||||
- if (event)
|
||||
- {
|
||||
- handle = alloc_handle( process, event, EVENT_ALL_ACCESS, 0 );
|
||||
- release_object( event );
|
||||
- }
|
||||
- return handle;
|
||||
-}
|
||||
-
|
||||
static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async_data,
|
||||
int blocking, const void *data, data_size_t size )
|
||||
{
|
||||
diff --git a/server/object.h b/server/object.h
|
||||
index bb3ff21..bad162f 100644
|
||||
--- a/server/object.h
|
||||
+++ b/server/object.h
|
||||
@@ -159,6 +159,7 @@ extern struct event *create_event( struct directory *root, const struct unicode_
|
||||
const struct security_descriptor *sd );
|
||||
extern struct keyed_event *create_keyed_event( struct directory *root, const struct unicode_str *name,
|
||||
unsigned int attr, const struct security_descriptor *sd );
|
||||
+extern obj_handle_t alloc_wait_event( struct process *process );
|
||||
extern struct event *get_event_obj( struct process *process, obj_handle_t handle, unsigned int access );
|
||||
extern struct keyed_event *get_keyed_event_obj( struct process *process, obj_handle_t handle, unsigned int access );
|
||||
extern void pulse_event( struct event *event );
|
||||
diff --git a/server/sock.c b/server/sock.c
|
||||
index 1a3a8f7..4e41b72 100644
|
||||
--- a/server/sock.c
|
||||
+++ b/server/sock.c
|
||||
@@ -44,11 +44,17 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+#ifdef HAVE_LINUX_RTNETLINK_H
|
||||
+# include <linux/rtnetlink.h>
|
||||
+#endif
|
||||
+
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#include "windef.h"
|
||||
#include "winternl.h"
|
||||
#include "winerror.h"
|
||||
+#define USE_WS_PREFIX
|
||||
+#include "winsock2.h"
|
||||
|
||||
#include "process.h"
|
||||
#include "file.h"
|
||||
@@ -107,8 +113,12 @@ struct sock
|
||||
struct sock *deferred; /* socket that waits for a deferred accept */
|
||||
struct async_queue *read_q; /* queue for asynchronous reads */
|
||||
struct async_queue *write_q; /* queue for asynchronous writes */
|
||||
+ struct async_queue *ifchange_q; /* queue for interface change notifications */
|
||||
+ struct list ifchange_entry; /* entry in ifchange notification list */
|
||||
};
|
||||
|
||||
+static int sock_add_ifchange( struct sock *sock, const async_data_t *async_data );
|
||||
+
|
||||
static void sock_dump( struct object *obj, int verbose );
|
||||
static int sock_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
static struct fd *sock_get_fd( struct object *obj );
|
||||
@@ -117,6 +127,8 @@ static void sock_destroy( struct object *obj );
|
||||
static int sock_get_poll_events( struct fd *fd );
|
||||
static void sock_poll_event( struct fd *fd, int event );
|
||||
static enum server_fd_type sock_get_fd_type( struct fd *fd );
|
||||
+static obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async,
|
||||
+ int blocking, const void *data, data_size_t size );
|
||||
static void sock_queue_async( struct fd *fd, const async_data_t *data, int type, int count );
|
||||
static void sock_reselect_async( struct fd *fd, struct async_queue *queue );
|
||||
static void sock_cancel_async( struct fd *fd, struct process *process, struct thread *thread, client_ptr_t iosb );
|
||||
@@ -151,12 +163,15 @@ static const struct fd_ops sock_fd_ops =
|
||||
sock_poll_event, /* poll_event */
|
||||
no_flush, /* flush */
|
||||
sock_get_fd_type, /* get_fd_type */
|
||||
- default_fd_ioctl, /* ioctl */
|
||||
+ sock_ioctl, /* ioctl */
|
||||
sock_queue_async, /* queue_async */
|
||||
sock_reselect_async, /* reselect_async */
|
||||
sock_cancel_async /* cancel_async */
|
||||
};
|
||||
|
||||
+/* only keep one ifchange object around, all sockets waiting for wakeups will look to it */
|
||||
+static struct object *ifchange_object = NULL;
|
||||
+
|
||||
|
||||
/* Permutation of 0..FD_MAX_EVENTS - 1 representing the order in which
|
||||
* we post messages if there are multiple events. Used to send
|
||||
@@ -518,6 +533,39 @@ static enum server_fd_type sock_get_fd_type( struct fd *fd )
|
||||
return FD_TYPE_SOCKET;
|
||||
}
|
||||
|
||||
+obj_handle_t sock_ioctl( struct fd *fd, ioctl_code_t code, const async_data_t *async_data,
|
||||
+ int blocking, const void *data, data_size_t size )
|
||||
+{
|
||||
+ struct sock *sock = get_fd_user( fd );
|
||||
+ obj_handle_t wait_handle = 0;
|
||||
+ async_data_t new_data;
|
||||
+
|
||||
+ assert( sock->obj.ops == &sock_ops );
|
||||
+
|
||||
+ if (blocking)
|
||||
+ {
|
||||
+ if (!(wait_handle = alloc_wait_event( current->process ))) return 0;
|
||||
+ new_data = *async_data;
|
||||
+ new_data.event = wait_handle;
|
||||
+ async_data = &new_data;
|
||||
+ }
|
||||
+ switch(code)
|
||||
+ {
|
||||
+ case WS_SIO_ADDRESS_LIST_CHANGE:
|
||||
+ if (sock_add_ifchange( sock, async_data ))
|
||||
+ {
|
||||
+ set_error( STATUS_PENDING );
|
||||
+ return wait_handle;
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ close_handle( current->process, wait_handle );
|
||||
+ return default_fd_ioctl(fd, code, async_data, blocking, data, size);
|
||||
+ }
|
||||
+ close_handle( current->process, wait_handle );
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void sock_queue_async( struct fd *fd, const async_data_t *data, int type, int count )
|
||||
{
|
||||
struct sock *sock = get_fd_user( fd );
|
||||
@@ -587,11 +635,17 @@ static void sock_destroy( struct object *obj )
|
||||
|
||||
/* FIXME: special socket shutdown stuff? */
|
||||
|
||||
- if ( sock->deferred )
|
||||
+ if (sock->deferred)
|
||||
release_object( sock->deferred );
|
||||
|
||||
free_async_queue( sock->read_q );
|
||||
free_async_queue( sock->write_q );
|
||||
+ if (sock->ifchange_q)
|
||||
+ {
|
||||
+ free_async_queue( sock->ifchange_q );
|
||||
+ list_remove( &sock->ifchange_entry );
|
||||
+ release_object( ifchange_object );
|
||||
+ }
|
||||
if (sock->event) release_object( sock->event );
|
||||
if (sock->fd)
|
||||
{
|
||||
@@ -618,6 +672,7 @@ static void init_sock(struct sock *sock)
|
||||
sock->deferred = NULL;
|
||||
sock->read_q = NULL;
|
||||
sock->write_q = NULL;
|
||||
+ sock->ifchange_q = NULL;
|
||||
memset( sock->errors, 0, sizeof(sock->errors) );
|
||||
}
|
||||
|
||||
@@ -906,6 +961,236 @@ static void sock_set_error(void)
|
||||
set_error( sock_get_ntstatus( errno ) );
|
||||
}
|
||||
|
||||
+static void ifchange_dump( struct object *obj, int verbose );
|
||||
+static struct fd *ifchange_get_fd( struct object *obj );
|
||||
+static void ifchange_destroy( struct object *obj );
|
||||
+
|
||||
+static int ifchange_get_poll_events( struct fd *fd );
|
||||
+static void ifchange_poll_event( struct fd *fd, int event );
|
||||
+static void ifchange_reselect_async( struct fd *fd, struct async_queue *queue );
|
||||
+
|
||||
+struct ifchange
|
||||
+{
|
||||
+ struct object obj; /* object header */
|
||||
+ struct fd *fd; /* interface change file descriptor */
|
||||
+ struct list sockets; /* list of sockets to send interface change notifications */
|
||||
+};
|
||||
+
|
||||
+static const struct object_ops ifchange_ops =
|
||||
+{
|
||||
+ sizeof(struct ifchange), /* size */
|
||||
+ ifchange_dump, /* dump */
|
||||
+ no_get_type, /* get_type */
|
||||
+ add_queue, /* add_queue */
|
||||
+ NULL, /* remove_queue */
|
||||
+ NULL, /* signaled */
|
||||
+ no_satisfied, /* satisfied */
|
||||
+ no_signal, /* signal */
|
||||
+ ifchange_get_fd, /* get_fd */
|
||||
+ default_fd_map_access, /* map_access */
|
||||
+ default_get_sd, /* get_sd */
|
||||
+ default_set_sd, /* set_sd */
|
||||
+ no_lookup_name, /* lookup_name */
|
||||
+ no_open_file, /* open_file */
|
||||
+ no_close_handle, /* close_handle */
|
||||
+ ifchange_destroy /* destroy */
|
||||
+};
|
||||
+
|
||||
+static const struct fd_ops ifchange_fd_ops =
|
||||
+{
|
||||
+ ifchange_get_poll_events, /* get_poll_events */
|
||||
+ ifchange_poll_event, /* poll_event */
|
||||
+ NULL, /* flush */
|
||||
+ NULL, /* get_fd_type */
|
||||
+ NULL, /* ioctl */
|
||||
+ NULL, /* queue_async */
|
||||
+ ifchange_reselect_async, /* reselect_async */
|
||||
+ NULL /* cancel_async */
|
||||
+};
|
||||
+
|
||||
+static int init_ifchange( struct ifchange *ifchange )
|
||||
+{
|
||||
+#if defined(NETLINK_ROUTE)
|
||||
+ struct sockaddr_nl addr;
|
||||
+ int unix_fd;
|
||||
+
|
||||
+ list_init( &ifchange->sockets );
|
||||
+ unix_fd = socket( PF_NETLINK, SOCK_RAW, NETLINK_ROUTE );
|
||||
+ if (unix_fd == -1)
|
||||
+ {
|
||||
+ sock_set_error();
|
||||
+ return 0;
|
||||
+ }
|
||||
+ fcntl( unix_fd, F_SETFL, O_NONBLOCK ); /* make socket nonblocking */
|
||||
+ memset( &addr, 0, sizeof(addr) );
|
||||
+ addr.nl_family = AF_NETLINK;
|
||||
+ addr.nl_groups = RTMGRP_IPV4_IFADDR;
|
||||
+ /* bind the socket to the special netlink kernel interface */
|
||||
+ if (bind( unix_fd, (struct sockaddr *)&addr, sizeof(addr) ) == -1)
|
||||
+ {
|
||||
+ sock_set_error();
|
||||
+ close( unix_fd );
|
||||
+ return 0;
|
||||
+ }
|
||||
+ if (!(ifchange->fd = create_anonymous_fd( &ifchange_fd_ops, unix_fd, &ifchange->obj, 0 )))
|
||||
+ {
|
||||
+ close( unix_fd );
|
||||
+ return 0;
|
||||
+ }
|
||||
+ /* enable read wakeup on the file descriptor */
|
||||
+ set_fd_events( ifchange->fd, POLLIN );
|
||||
+ return 1;
|
||||
+#else
|
||||
+ fprintf(stderr, "Interface change notification is not supported on this platform.\n");
|
||||
+ set_error( STATUS_NOT_SUPPORTED );
|
||||
+ return 0;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+/* create a new ifchange notifier or, if one already exists, reuse the existing one */
|
||||
+static struct object *create_ifchange( void )
|
||||
+{
|
||||
+ struct ifchange *ifchange;
|
||||
+
|
||||
+ /* we only need one of these interface notification objects, all of the sockets dependent upon
|
||||
+ * it will wake up when a notification event occurs */
|
||||
+ if (ifchange_object)
|
||||
+ return grab_object( ifchange_object );
|
||||
+ if (!(ifchange = alloc_object( &ifchange_ops )))
|
||||
+ return NULL;
|
||||
+ if (!init_ifchange( ifchange ))
|
||||
+ {
|
||||
+ release_object( ifchange );
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ ifchange_object = &ifchange->obj;
|
||||
+ return ifchange_object;
|
||||
+}
|
||||
+
|
||||
+/* add a socket to the interface change notification's list of sockets */
|
||||
+void ifchange_add_sock( struct object *obj, struct sock *sock )
|
||||
+{
|
||||
+ struct ifchange *ifchange = (struct ifchange *)obj;
|
||||
+
|
||||
+ list_add_tail( &ifchange->sockets, &sock->ifchange_entry );
|
||||
+}
|
||||
+
|
||||
+/* wake up an ifchange notification queue for a socket and decrement the ifchange object refcount */
|
||||
+void sock_ifchange_wake_up( struct sock *sock, unsigned int status )
|
||||
+{
|
||||
+ assert( sock->ifchange_q );
|
||||
+ async_wake_up( sock->ifchange_q, status );
|
||||
+ free_async_queue( sock->ifchange_q );
|
||||
+ sock->ifchange_q = NULL;
|
||||
+ list_remove( &sock->ifchange_entry );
|
||||
+ release_object( ifchange_object );
|
||||
+}
|
||||
+
|
||||
+/* add interface change notification to a socket */
|
||||
+int sock_add_ifchange( struct sock *sock, const async_data_t *async_data )
|
||||
+{
|
||||
+ struct object *ifchange = ifchange_object;
|
||||
+ struct async *async;
|
||||
+ struct fd *fd;
|
||||
+
|
||||
+ if (!sock->ifchange_q)
|
||||
+ {
|
||||
+ /* associate this socket with the interface change object */
|
||||
+ ifchange = create_ifchange();
|
||||
+ if (!ifchange) return FALSE;
|
||||
+ ifchange_add_sock( ifchange, sock ); /* add this socket to the change notification list */
|
||||
+ if (!(fd = ifchange_get_fd( ifchange ))) goto fail;
|
||||
+ sock->ifchange_q = create_async_queue( fd );
|
||||
+ release_object( fd );
|
||||
+ if (!sock->ifchange_q) goto fail;
|
||||
+ }
|
||||
+ if (!(async = create_async( current, sock->ifchange_q, async_data ))) goto fail;
|
||||
+ release_object( async );
|
||||
+ return TRUE;
|
||||
+
|
||||
+fail:
|
||||
+ free_async_queue( sock->ifchange_q );
|
||||
+ sock->ifchange_q = NULL;
|
||||
+ release_object( ifchange );
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+static void ifchange_dump( struct object *obj, int verbose )
|
||||
+{
|
||||
+ assert( obj->ops == &ifchange_ops );
|
||||
+ printf( "ifchange\n" );
|
||||
+}
|
||||
+
|
||||
+static struct fd *ifchange_get_fd( struct object *obj )
|
||||
+{
|
||||
+ struct ifchange *ifchange = (struct ifchange *)obj;
|
||||
+ return (struct fd *)grab_object( ifchange->fd );
|
||||
+}
|
||||
+
|
||||
+static void ifchange_destroy( struct object *obj )
|
||||
+{
|
||||
+ struct ifchange *ifchange = (struct ifchange *)obj;
|
||||
+ assert( obj->ops == &ifchange_ops );
|
||||
+
|
||||
+ /* reset the global ifchange object so that it will be recreated if it is needed again */
|
||||
+ ifchange_object = NULL;
|
||||
+ /* shut the socket down to force pending poll() calls in the client to return */
|
||||
+ shutdown( get_unix_fd(ifchange->fd), SHUT_RDWR );
|
||||
+ release_object( ifchange->fd );
|
||||
+}
|
||||
+
|
||||
+static int ifchange_get_poll_events( struct fd *fd )
|
||||
+{
|
||||
+ return POLLIN;
|
||||
+}
|
||||
+
|
||||
+/* wake up all the sockets waiting for a change notification event */
|
||||
+static void ifchange_wake_up( struct object *obj, unsigned int status )
|
||||
+{
|
||||
+ struct ifchange *ifchange = (struct ifchange *) obj;
|
||||
+ struct list *ptr, *next;
|
||||
+
|
||||
+ assert( obj->ops == &ifchange_ops );
|
||||
+ LIST_FOR_EACH_SAFE( ptr, next, &ifchange->sockets )
|
||||
+ {
|
||||
+ struct sock *sock = LIST_ENTRY( ptr, struct sock, ifchange_entry );
|
||||
+
|
||||
+ sock_ifchange_wake_up( sock, status );
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void ifchange_poll_event( struct fd *fd, int event )
|
||||
+{
|
||||
+ struct object *ifchange = get_fd_user( fd );
|
||||
+ int r, unix_fd, wakeup = FALSE;
|
||||
+ char buffer[0x1000];
|
||||
+
|
||||
+ unix_fd = get_unix_fd( fd );
|
||||
+ r = recv( unix_fd, buffer, sizeof(buffer), 0 );
|
||||
+ if (r < 0)
|
||||
+ {
|
||||
+ fprintf(stderr,"ifchange_poll_event(): ifchange read failed!\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ else if (r != 0)
|
||||
+ {
|
||||
+#if defined(NETLINK_ROUTE)
|
||||
+ struct nlmsghdr *nlh;
|
||||
+
|
||||
+ nlh = (struct nlmsghdr*) buffer;
|
||||
+ if (NLMSG_OK(nlh, r) && (nlh->nlmsg_type == RTM_NEWADDR || nlh->nlmsg_type == RTM_DELADDR))
|
||||
+ wakeup = TRUE;
|
||||
+#endif
|
||||
+ }
|
||||
+ if (wakeup)
|
||||
+ ifchange_wake_up( ifchange, STATUS_SUCCESS );
|
||||
+}
|
||||
+
|
||||
+static void ifchange_reselect_async( struct fd *fd, struct async_queue *queue )
|
||||
+{
|
||||
+ /* do nothing, this object is about to disappear */
|
||||
+}
|
||||
+
|
||||
/* create a socket */
|
||||
DECL_HANDLER(create_socket)
|
||||
{
|
||||
--
|
||||
1.7.9.5
|
||||
|
@@ -1,499 +0,0 @@
|
||||
From 78a5ebb94f3717bedd77f7c096e8fce1e9a640d1 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Mon, 18 Nov 2013 18:12:05 -0700
|
||||
Subject: server: Store and return security attributes with extended file
|
||||
attributes.
|
||||
|
||||
---
|
||||
configure.ac | 6 ++
|
||||
dlls/advapi32/tests/security.c | 25 +++---
|
||||
server/change.c | 11 ++-
|
||||
server/fd.c | 68 +++++++++++++++-
|
||||
server/file.c | 176 +++++++++++++++++++++++++++++++++++++++-
|
||||
server/file.h | 5 +-
|
||||
6 files changed, 269 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 98a73f2..bb03667 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -71,6 +71,7 @@ AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthrea
|
||||
AC_ARG_WITH(sane, AS_HELP_STRING([--without-sane],[do not use SANE (scanner support)]))
|
||||
AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff],[do not use TIFF]))
|
||||
AC_ARG_WITH(v4l, AS_HELP_STRING([--without-v4l],[do not use v4l1 (v4l support)]))
|
||||
+AC_ARG_WITH(xattr, AS_HELP_STRING([--without-xattr],[do not use xattr (security attributes support)]))
|
||||
AC_ARG_WITH(xcomposite,AS_HELP_STRING([--without-xcomposite],[do not use the Xcomposite extension]),
|
||||
[if test "x$withval" = "xno"; then ac_cv_header_X11_extensions_Xcomposite_h=no; fi])
|
||||
AC_ARG_WITH(xcursor, AS_HELP_STRING([--without-xcursor],[do not use the Xcursor extension]),
|
||||
@@ -666,6 +667,11 @@ AC_CHECK_HEADERS([libprocstat.h],,,
|
||||
#include <sys/socket.h>
|
||||
#endif])
|
||||
|
||||
+if test "x$with_xattr" != "xno"
|
||||
+then
|
||||
+ AC_CHECK_HEADERS(attr/xattr.h)
|
||||
+fi
|
||||
+
|
||||
dnl **** Check for working dll ****
|
||||
|
||||
AC_SUBST(dlldir,"\${libdir}/wine")
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index fe31b5c..7d28c05 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -3088,10 +3088,10 @@ static void test_CreateDirectoryA(void)
|
||||
bret = pGetAce(pDacl, 0, (VOID **)&ace);
|
||||
ok(bret, "Failed to get Current User ACE.\n");
|
||||
bret = EqualSid(&ace->SidStart, user_sid);
|
||||
- todo_wine ok(bret, "Current User ACE != Current User SID.\n");
|
||||
- todo_wine ok(((ACE_HEADER *)ace)->AceFlags == (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE),
|
||||
- "Current User ACE has unexpected flags (0x%x != 0x03)\n",
|
||||
- ((ACE_HEADER *)ace)->AceFlags);
|
||||
+ ok(bret, "Current User ACE != Current User SID.\n");
|
||||
+ ok(((ACE_HEADER *)ace)->AceFlags == (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE),
|
||||
+ "Current User ACE has unexpected flags (0x%x != 0x03)\n",
|
||||
+ ((ACE_HEADER *)ace)->AceFlags);
|
||||
ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n",
|
||||
ace->Mask);
|
||||
}
|
||||
@@ -3100,10 +3100,10 @@ static void test_CreateDirectoryA(void)
|
||||
bret = pGetAce(pDacl, 1, (VOID **)&ace);
|
||||
ok(bret, "Failed to get Administators Group ACE.\n");
|
||||
bret = EqualSid(&ace->SidStart, admin_sid);
|
||||
- todo_wine ok(bret, "Administators Group ACE != Administators Group SID.\n");
|
||||
- todo_wine ok(((ACE_HEADER *)ace)->AceFlags == (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE),
|
||||
- "Administators Group ACE has unexpected flags (0x%x != 0x03)\n",
|
||||
- ((ACE_HEADER *)ace)->AceFlags);
|
||||
+ ok(bret, "Administators Group ACE != Administators Group SID.\n");
|
||||
+ ok(((ACE_HEADER *)ace)->AceFlags == (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE),
|
||||
+ "Administators Group ACE has unexpected flags (0x%x != 0x03)\n",
|
||||
+ ((ACE_HEADER *)ace)->AceFlags);
|
||||
ok(ace->Mask == 0x1f01ff, "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n",
|
||||
ace->Mask);
|
||||
}
|
||||
@@ -3277,7 +3277,7 @@ static void test_GetNamedSecurityInfoA(void)
|
||||
bret = pGetAce(pDacl, 0, (VOID **)&ace);
|
||||
ok(bret, "Failed to get Current User ACE.\n");
|
||||
bret = EqualSid(&ace->SidStart, user_sid);
|
||||
- todo_wine ok(bret, "Current User ACE != Current User SID.\n");
|
||||
+ ok(bret, "Current User ACE != Current User SID.\n");
|
||||
ok(((ACE_HEADER *)ace)->AceFlags == 0,
|
||||
"Current User ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
|
||||
ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n",
|
||||
@@ -3288,8 +3288,7 @@ static void test_GetNamedSecurityInfoA(void)
|
||||
bret = pGetAce(pDacl, 1, (VOID **)&ace);
|
||||
ok(bret, "Failed to get Administators Group ACE.\n");
|
||||
bret = EqualSid(&ace->SidStart, admin_sid);
|
||||
- todo_wine ok(bret || broken(!bret) /* win2k */,
|
||||
- "Administators Group ACE != Administators Group SID.\n");
|
||||
+ ok(bret || broken(!bret) /* win2k */, "Administators Group ACE != Administators Group SID.\n");
|
||||
ok(((ACE_HEADER *)ace)->AceFlags == 0,
|
||||
"Administators Group ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
|
||||
ok(ace->Mask == 0x1f01ff || broken(ace->Mask == GENERIC_ALL) /* win2k */,
|
||||
@@ -3943,7 +3942,7 @@ static void test_GetSecurityInfo(void)
|
||||
bret = pGetAce(pDacl, 0, (VOID **)&ace);
|
||||
ok(bret, "Failed to get Current User ACE.\n");
|
||||
bret = EqualSid(&ace->SidStart, user_sid);
|
||||
- todo_wine ok(bret, "Current User ACE != Current User SID.\n");
|
||||
+ ok(bret, "Current User ACE != Current User SID.\n");
|
||||
ok(((ACE_HEADER *)ace)->AceFlags == 0,
|
||||
"Current User ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
|
||||
ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n",
|
||||
@@ -3954,7 +3953,7 @@ static void test_GetSecurityInfo(void)
|
||||
bret = pGetAce(pDacl, 1, (VOID **)&ace);
|
||||
ok(bret, "Failed to get Administators Group ACE.\n");
|
||||
bret = EqualSid(&ace->SidStart, admin_sid);
|
||||
- todo_wine ok(bret, "Administators Group ACE != Administators Group SID.\n");
|
||||
+ ok(bret, "Administators Group ACE != Administators Group SID.\n");
|
||||
ok(((ACE_HEADER *)ace)->AceFlags == 0,
|
||||
"Administators Group ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
|
||||
ok(ace->Mask == 0x1f01ff, "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n",
|
||||
diff --git a/server/change.c b/server/change.c
|
||||
index f6d56b0..022c780 100644
|
||||
--- a/server/change.c
|
||||
+++ b/server/change.c
|
||||
@@ -286,6 +286,7 @@ static int get_dir_unix_fd( struct dir *dir )
|
||||
static struct security_descriptor *dir_get_sd( struct object *obj )
|
||||
{
|
||||
struct dir *dir = (struct dir *)obj;
|
||||
+ const SID *user, *group;
|
||||
int unix_fd;
|
||||
struct stat st;
|
||||
struct security_descriptor *sd;
|
||||
@@ -302,9 +303,11 @@ static struct security_descriptor *dir_get_sd( struct object *obj )
|
||||
(st.st_uid == dir->uid))
|
||||
return obj->sd;
|
||||
|
||||
- sd = mode_to_sd( st.st_mode,
|
||||
- security_unix_uid_to_sid( st.st_uid ),
|
||||
- token_get_primary_group( current->process->token ));
|
||||
+ user = security_unix_uid_to_sid( st.st_uid );
|
||||
+ group = token_get_primary_group( current->process->token );
|
||||
+ sd = get_file_acls( unix_fd, user, group );
|
||||
+ if (!sd)
|
||||
+ sd = mode_to_sd( st.st_mode, user, group );
|
||||
if (!sd) return obj->sd;
|
||||
|
||||
dir->mode = st.st_mode;
|
||||
@@ -353,6 +356,8 @@ static int dir_set_sd( struct object *obj, const struct security_descriptor *sd,
|
||||
mode = st.st_mode & (S_ISUID|S_ISGID|S_ISVTX);
|
||||
mode |= sd_to_mode( sd, owner );
|
||||
|
||||
+ set_file_acls( unix_fd, sd );
|
||||
+
|
||||
if (((st.st_mode ^ mode) & (S_IRWXU|S_IRWXG|S_IRWXO)) && fchmod( unix_fd, mode ) == -1)
|
||||
{
|
||||
file_set_error();
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index fa8874c..98e3eca 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -91,6 +91,9 @@
|
||||
#ifdef HAVE_SYS_SYSCALL_H
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
+#ifdef HAVE_ATTR_XATTR_H
|
||||
+#include <attr/xattr.h>
|
||||
+#endif
|
||||
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
@@ -99,6 +102,7 @@
|
||||
#include "handle.h"
|
||||
#include "process.h"
|
||||
#include "request.h"
|
||||
+#include "security.h"
|
||||
|
||||
#include "winternl.h"
|
||||
#include "winioctl.h"
|
||||
@@ -1726,9 +1730,69 @@ static char *dup_fd_name( struct fd *root, const char *name )
|
||||
return ret;
|
||||
}
|
||||
|
||||
+void set_file_acls( int fd, const struct security_descriptor *sd )
|
||||
+{
|
||||
+#ifdef HAVE_ATTR_XATTR_H
|
||||
+ char buffer[XATTR_SIZE_MAX], *p = buffer;
|
||||
+ const ACE_HEADER *ace;
|
||||
+ int present, i, j, n;
|
||||
+ const ACL *dacl;
|
||||
+
|
||||
+ if (!sd) return;
|
||||
+ dacl = sd_get_dacl( sd, &present );
|
||||
+ if (!present || !dacl) return;
|
||||
+ ace = (const ACE_HEADER *)(dacl + 1);
|
||||
+
|
||||
+ for (i = 0; i < dacl->AceCount; i++, ace = ace_next( ace ))
|
||||
+ {
|
||||
+ BYTE type = ace->AceType, flags;
|
||||
+ const ACCESS_ALLOWED_ACE *aaa;
|
||||
+ const ACCESS_DENIED_ACE *ada;
|
||||
+ char sidtxt[100], *s;
|
||||
+ const SID *sid;
|
||||
+ DWORD mask;
|
||||
+
|
||||
+ if (type & INHERIT_ONLY_ACE) continue;
|
||||
+
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case ACCESS_DENIED_ACE_TYPE:
|
||||
+ ada = (const ACCESS_DENIED_ACE *)ace;
|
||||
+ flags = ada->Header.AceFlags;
|
||||
+ mask = ada->Mask;
|
||||
+ sid = (const SID *)&ada->SidStart;
|
||||
+ break;
|
||||
+ case ACCESS_ALLOWED_ACE_TYPE:
|
||||
+ aaa = (const ACCESS_ALLOWED_ACE *)ace;
|
||||
+ flags = aaa->Header.AceFlags;
|
||||
+ mask = aaa->Mask;
|
||||
+ sid = (const SID *)&aaa->SidStart;
|
||||
+ break;
|
||||
+ default:
|
||||
+ continue;
|
||||
+ }
|
||||
+ n = sprintf( sidtxt, "S-%u-%d", sid->Revision,
|
||||
+ MAKELONG(
|
||||
+ MAKEWORD( sid->IdentifierAuthority.Value[5],
|
||||
+ sid->IdentifierAuthority.Value[4] ),
|
||||
+ MAKEWORD( sid->IdentifierAuthority.Value[3],
|
||||
+ sid->IdentifierAuthority.Value[2] )
|
||||
+ ) );
|
||||
+ s = sidtxt + n;
|
||||
+ for( j=0; j<sid->SubAuthorityCount; j++ )
|
||||
+ s += sprintf( s, "-%u", sid->SubAuthority[j] );
|
||||
+
|
||||
+ p += snprintf( p, XATTR_SIZE_MAX-(p-buffer), "%s%x,%x,%x,%s",
|
||||
+ (p != buffer ? ";" : ""), type, flags, mask, sidtxt );
|
||||
+ }
|
||||
+
|
||||
+ fsetxattr( fd, "user.wine.acl", buffer, p-buffer, 0 );
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
/* open() wrapper that returns a struct fd with no fd user set */
|
||||
struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode, unsigned int access,
|
||||
- unsigned int sharing, unsigned int options )
|
||||
+ unsigned int sharing, unsigned int options, const struct security_descriptor *sd )
|
||||
{
|
||||
struct stat st;
|
||||
struct closed_fd *closed_fd;
|
||||
@@ -1804,6 +1868,8 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
|
||||
}
|
||||
}
|
||||
|
||||
+ set_file_acls( fd->unix_fd, sd );
|
||||
+
|
||||
closed_fd->unix_fd = fd->unix_fd;
|
||||
closed_fd->unlink[0] = 0;
|
||||
fstat( fd->unix_fd, &st );
|
||||
diff --git a/server/file.c b/server/file.c
|
||||
index cceb8ad..9ac9188 100644
|
||||
--- a/server/file.c
|
||||
+++ b/server/file.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
+#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_UTIME_H
|
||||
#include <utime.h>
|
||||
@@ -39,6 +40,9 @@
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
#endif
|
||||
+#ifdef HAVE_ATTR_XATTR_H
|
||||
+#include <attr/xattr.h>
|
||||
+#endif
|
||||
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
@@ -237,7 +241,7 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
|
||||
access = generic_file_map_access( access );
|
||||
|
||||
/* FIXME: should set error to STATUS_OBJECT_NAME_COLLISION if file existed before */
|
||||
- fd = open_fd( root, name, flags | O_NONBLOCK | O_LARGEFILE, &mode, access, sharing, options );
|
||||
+ fd = open_fd( root, name, flags | O_NONBLOCK | O_LARGEFILE, &mode, access, sharing, options, sd );
|
||||
if (!fd) goto done;
|
||||
|
||||
if (S_ISDIR(mode))
|
||||
@@ -424,9 +428,169 @@ struct security_descriptor *mode_to_sd( mode_t mode, const SID *user, const SID
|
||||
return sd;
|
||||
}
|
||||
|
||||
+struct security_descriptor *get_file_acls( int fd, const SID *user, const SID *group )
|
||||
+{
|
||||
+#ifdef HAVE_ATTR_XATTR_H
|
||||
+ int ace_count = 0, dacl_size = sizeof(ACL), i, n;
|
||||
+ char buffer[XATTR_SIZE_MAX], *p = buffer, *pn;
|
||||
+ struct security_descriptor *sd;
|
||||
+ ACE_HEADER *current_ace;
|
||||
+ ACCESS_ALLOWED_ACE *aaa;
|
||||
+ ACCESS_DENIED_ACE *ada;
|
||||
+ int type, flags, mask;
|
||||
+ ACL *dacl;
|
||||
+ char *ptr;
|
||||
+
|
||||
+ n = fgetxattr( fd, "user.wine.acl", buffer, sizeof(buffer) );
|
||||
+ if (n == -1) return NULL;
|
||||
+ buffer[n] = 0;
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ int sub_authority_count = 0;
|
||||
+
|
||||
+ pn = strchr(p, ';');
|
||||
+ if (pn) pn++;
|
||||
+ sscanf(p, "%x", &type);
|
||||
+ do
|
||||
+ {
|
||||
+ p = strchr(p, '-');
|
||||
+ if (p) p++;
|
||||
+ sub_authority_count++;
|
||||
+ }
|
||||
+ while(p && (!pn || p < pn));
|
||||
+ sub_authority_count -= 3; /* Revision and IdentifierAuthority don't count */
|
||||
+
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case ACCESS_DENIED_ACE_TYPE:
|
||||
+ dacl_size += FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart) +
|
||||
+ FIELD_OFFSET(SID, SubAuthority[sub_authority_count]);
|
||||
+ break;
|
||||
+ case ACCESS_ALLOWED_ACE_TYPE:
|
||||
+ dacl_size += FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart) +
|
||||
+ FIELD_OFFSET(SID, SubAuthority[sub_authority_count]);
|
||||
+ break;
|
||||
+ default:
|
||||
+ continue;
|
||||
+ }
|
||||
+ ace_count++;
|
||||
+ p = pn;
|
||||
+ }
|
||||
+ while(p);
|
||||
+
|
||||
+ sd = mem_alloc( sizeof(struct security_descriptor) +
|
||||
+ FIELD_OFFSET(SID, SubAuthority[user->SubAuthorityCount]) +
|
||||
+ FIELD_OFFSET(SID, SubAuthority[group->SubAuthorityCount]) +
|
||||
+ dacl_size );
|
||||
+
|
||||
+ sd->control = SE_DACL_PRESENT;
|
||||
+ sd->owner_len = FIELD_OFFSET(SID, SubAuthority[user->SubAuthorityCount]);
|
||||
+ sd->group_len = FIELD_OFFSET(SID, SubAuthority[group->SubAuthorityCount]);
|
||||
+ sd->sacl_len = 0;
|
||||
+ sd->dacl_len = dacl_size;
|
||||
+
|
||||
+ ptr = (char *)(sd + 1);
|
||||
+ memcpy( ptr, user, sd->owner_len );
|
||||
+ ptr += sd->owner_len;
|
||||
+ memcpy( ptr, group, sd->group_len );
|
||||
+ ptr += sd->group_len;
|
||||
+
|
||||
+ dacl = (ACL *)ptr;
|
||||
+ dacl->AclRevision = ACL_REVISION;
|
||||
+ dacl->Sbz1 = 0;
|
||||
+ dacl->AclSize = dacl_size;
|
||||
+ dacl->AceCount = ace_count;
|
||||
+ dacl->Sbz2 = 0;
|
||||
+ aaa = (ACCESS_ALLOWED_ACE *)(dacl + 1);
|
||||
+ current_ace = &aaa->Header;
|
||||
+
|
||||
+ p = buffer;
|
||||
+ for(i=0; i<ace_count; i++)
|
||||
+ {
|
||||
+ char b[sizeof(SID) + sizeof(ULONG) * SID_MAX_SUB_AUTHORITIES];
|
||||
+ int sub_authority_count = 0;
|
||||
+ SID *sid = (SID *)&b[0];
|
||||
+ char sidtxt[100];
|
||||
+ int rev, ia, sa;
|
||||
+
|
||||
+ if (i != 0)
|
||||
+ {
|
||||
+ aaa = (ACCESS_ALLOWED_ACE *)ace_next( current_ace );
|
||||
+ current_ace = &aaa->Header;
|
||||
+ }
|
||||
+ pn = strchr(p, ';');
|
||||
+ if (pn) pn++;
|
||||
+ sscanf(p, "%x,%x,%x,%[^;]", &type, &flags, &mask, sidtxt);
|
||||
+ sscanf(sidtxt, "S-%u-%d", &rev, &ia);
|
||||
+ sid->Revision = rev;
|
||||
+ sid->IdentifierAuthority.Value[0] = 0;
|
||||
+ sid->IdentifierAuthority.Value[1] = 0;
|
||||
+ sid->IdentifierAuthority.Value[2] = HIBYTE(HIWORD(ia));
|
||||
+ sid->IdentifierAuthority.Value[3] = LOBYTE(HIWORD(ia));
|
||||
+ sid->IdentifierAuthority.Value[4] = HIBYTE(LOWORD(ia));
|
||||
+ sid->IdentifierAuthority.Value[5] = LOBYTE(LOWORD(ia));
|
||||
+ p = strchr(sidtxt, '-')+1;
|
||||
+ p = strchr(p, '-')+1; /* Revision doesn't count */
|
||||
+ p = strchr(p, '-')+1; /* IdentifierAuthority doesn't count */
|
||||
+ do
|
||||
+ {
|
||||
+ sscanf(p, "%u", &sa);
|
||||
+ sid->SubAuthority[sub_authority_count] = sa;
|
||||
+ p = strchr(p, '-');
|
||||
+ if (p) p++;
|
||||
+ sub_authority_count++;
|
||||
+ }
|
||||
+ while(p);
|
||||
+ sid->SubAuthorityCount = sub_authority_count;
|
||||
+
|
||||
+ /* Convert generic rights into standard access rights */
|
||||
+ if (mask & GENERIC_ALL)
|
||||
+ mask |= WRITE_DAC | WRITE_OWNER | DELETE | FILE_DELETE_CHILD;
|
||||
+ if (mask & (GENERIC_ALL|GENERIC_READ))
|
||||
+ mask |= FILE_GENERIC_READ;
|
||||
+ if (mask & (GENERIC_ALL|GENERIC_WRITE))
|
||||
+ mask |= FILE_GENERIC_WRITE;
|
||||
+ if (mask & (GENERIC_ALL|GENERIC_EXECUTE))
|
||||
+ mask |= FILE_GENERIC_EXECUTE;
|
||||
+ mask &= 0x0FFFFFFF;
|
||||
+
|
||||
+ /* Handle the specific ACE */
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case ACCESS_DENIED_ACE_TYPE:
|
||||
+ ada = (ACCESS_DENIED_ACE *)aaa;
|
||||
+ ada->Header.AceType = type;
|
||||
+ ada->Header.AceFlags = flags;
|
||||
+ ada->Header.AceSize = FIELD_OFFSET(ACCESS_DENIED_ACE, SidStart) +
|
||||
+ FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
|
||||
+ ada->Mask = mask;
|
||||
+ memcpy( &ada->SidStart, sid, FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) );
|
||||
+ break;
|
||||
+ case ACCESS_ALLOWED_ACE_TYPE:
|
||||
+ aaa->Header.AceType = type;
|
||||
+ aaa->Header.AceFlags = flags;
|
||||
+ aaa->Header.AceSize = FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart) +
|
||||
+ FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]);
|
||||
+ aaa->Mask = mask;
|
||||
+ memcpy( &aaa->SidStart, sid, FIELD_OFFSET(SID, SubAuthority[sid->SubAuthorityCount]) );
|
||||
+ break;
|
||||
+ default:
|
||||
+ continue;
|
||||
+ }
|
||||
+ p = pn;
|
||||
+ }
|
||||
+
|
||||
+ return sd;
|
||||
+#else
|
||||
+ return NULL;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
static struct security_descriptor *file_get_sd( struct object *obj )
|
||||
{
|
||||
struct file *file = (struct file *)obj;
|
||||
+ const SID *user, *group;
|
||||
struct stat st;
|
||||
int unix_fd;
|
||||
struct security_descriptor *sd;
|
||||
@@ -443,9 +607,11 @@ static struct security_descriptor *file_get_sd( struct object *obj )
|
||||
(st.st_uid == file->uid))
|
||||
return obj->sd;
|
||||
|
||||
- sd = mode_to_sd( st.st_mode,
|
||||
- security_unix_uid_to_sid( st.st_uid ),
|
||||
- token_get_primary_group( current->process->token ));
|
||||
+ user = security_unix_uid_to_sid( st.st_uid );
|
||||
+ group = token_get_primary_group( current->process->token );
|
||||
+ sd = get_file_acls( unix_fd, user, group );
|
||||
+ if (!sd)
|
||||
+ sd = mode_to_sd( st.st_mode, user, group);
|
||||
if (!sd) return obj->sd;
|
||||
|
||||
file->mode = st.st_mode;
|
||||
@@ -575,6 +741,8 @@ static int file_set_sd( struct object *obj, const struct security_descriptor *sd
|
||||
mode = st.st_mode & (S_ISUID|S_ISGID|S_ISVTX);
|
||||
mode |= sd_to_mode( sd, owner );
|
||||
|
||||
+ set_file_acls( unix_fd, sd );
|
||||
+
|
||||
if (((st.st_mode ^ mode) & (S_IRWXU|S_IRWXG|S_IRWXO)) && fchmod( unix_fd, mode ) == -1)
|
||||
{
|
||||
file_set_error();
|
||||
diff --git a/server/file.h b/server/file.h
|
||||
index 493d30b..721c087 100644
|
||||
--- a/server/file.h
|
||||
+++ b/server/file.h
|
||||
@@ -56,7 +56,8 @@ extern struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct obje
|
||||
unsigned int options );
|
||||
extern void set_no_fd_status( struct fd *fd, unsigned int status );
|
||||
extern struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
|
||||
- unsigned int access, unsigned int sharing, unsigned int options );
|
||||
+ unsigned int access, unsigned int sharing, unsigned int options,
|
||||
+ const struct security_descriptor *sd );
|
||||
extern struct fd *create_anonymous_fd( const struct fd_ops *fd_user_ops,
|
||||
int unix_fd, struct object *user, unsigned int options );
|
||||
extern struct fd *dup_fd_object( struct fd *orig, unsigned int access, unsigned int sharing,
|
||||
@@ -122,6 +123,8 @@ extern struct file *create_file_for_fd_obj( struct fd *fd, unsigned int access,
|
||||
extern void file_set_error(void);
|
||||
extern struct security_descriptor *mode_to_sd( mode_t mode, const SID *user, const SID *group );
|
||||
extern mode_t sd_to_mode( const struct security_descriptor *sd, const SID *owner );
|
||||
+extern void set_file_acls( int fd, const struct security_descriptor *sd );
|
||||
+extern struct security_descriptor *get_file_acls( int fd, const SID *user, const SID *group );
|
||||
|
||||
/* file mapping functions */
|
||||
|
||||
--
|
||||
1.7.9.5
|
||||
|
@@ -1,180 +0,0 @@
|
||||
From 5e49f53a4bd591e67c9b7c4fdaf46933e319f9aa Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Mon, 18 Nov 2013 18:15:20 -0700
|
||||
Subject: ntdll: Inherit security attributes from parent directories.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/security.c | 40 ++++++++++++++++++-
|
||||
dlls/ntdll/file.c | 85 +++++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 123 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index 7d28c05..a8d136b 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -3013,10 +3013,11 @@ static void test_CreateDirectoryA(void)
|
||||
ACL_SIZE_INFORMATION acl_size;
|
||||
ACCESS_ALLOWED_ACE *ace;
|
||||
SECURITY_ATTRIBUTES sa;
|
||||
+ char tmpfile[MAX_PATH];
|
||||
char tmpdir[MAX_PATH];
|
||||
+ HANDLE token, hTemp;
|
||||
struct _SID *owner;
|
||||
BOOL bret = TRUE;
|
||||
- HANDLE token;
|
||||
DWORD error;
|
||||
PACL pDacl;
|
||||
|
||||
@@ -3108,6 +3109,43 @@ static void test_CreateDirectoryA(void)
|
||||
ace->Mask);
|
||||
}
|
||||
|
||||
+ /* Test inheritance of ACLs */
|
||||
+ strcpy(tmpfile, tmpdir);
|
||||
+ lstrcatA(tmpfile, "/tmpfile");
|
||||
+ hTemp = CreateFileA(tmpfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW,
|
||||
+ FILE_FLAG_DELETE_ON_CLOSE, NULL);
|
||||
+ error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT,
|
||||
+ OWNER_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, (PSID*)&owner,
|
||||
+ NULL, &pDacl, NULL, &pSD);
|
||||
+ ok(error == ERROR_SUCCESS, "Failed to get permissions on file.\n");
|
||||
+ bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
|
||||
+ ok(bret, "GetAclInformation failed\n");
|
||||
+ ok(acl_size.AceCount == 2, "GetAclInformation returned unexpected entry count (%d != 2).\n",
|
||||
+ acl_size.AceCount);
|
||||
+ if (acl_size.AceCount > 0)
|
||||
+ {
|
||||
+ bret = pGetAce(pDacl, 0, (VOID **)&ace);
|
||||
+ ok(bret, "Inherited Failed to get Current User ACE.\n");
|
||||
+ bret = EqualSid(&ace->SidStart, user_sid);
|
||||
+ ok(bret, "Inherited Current User ACE != Current User SID.\n");
|
||||
+ ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE,
|
||||
+ "Inherited Current User ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags);
|
||||
+ ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n",
|
||||
+ ace->Mask);
|
||||
+ }
|
||||
+ if (acl_size.AceCount > 1)
|
||||
+ {
|
||||
+ bret = pGetAce(pDacl, 1, (VOID **)&ace);
|
||||
+ ok(bret, "Inherited Failed to get Administators Group ACE.\n");
|
||||
+ bret = EqualSid(&ace->SidStart, admin_sid);
|
||||
+ ok(bret, "Inherited Administators Group ACE != Administators Group SID.\n");
|
||||
+ ok(((ACE_HEADER *)ace)->AceFlags == INHERITED_ACE,
|
||||
+ "Inherited Administators Group ACE has unexpected flags (0x%x != 0x10)\n", ((ACE_HEADER *)ace)->AceFlags);
|
||||
+ ok(ace->Mask == 0x1f01ff, "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n",
|
||||
+ ace->Mask);
|
||||
+ }
|
||||
+ CloseHandle(hTemp);
|
||||
+
|
||||
done:
|
||||
HeapFree(GetProcessHeap(), 0, user);
|
||||
bret = RemoveDirectoryA(tmpdir);
|
||||
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
|
||||
index 1de2c61..8948bb7 100644
|
||||
--- a/dlls/ntdll/file.c
|
||||
+++ b/dlls/ntdll/file.c
|
||||
@@ -103,6 +103,81 @@ mode_t FILE_umask = 0;
|
||||
|
||||
static const WCHAR ntfsW[] = {'N','T','F','S'};
|
||||
|
||||
+static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATTRIBUTES attr,
|
||||
+ PIO_STATUS_BLOCK io, PLARGE_INTEGER alloc_size,
|
||||
+ ULONG attributes, ULONG sharing, ULONG disposition,
|
||||
+ ULONG options, PVOID ea_buffer, ULONG ea_length );
|
||||
+
|
||||
+struct security_descriptor *FILE_get_parent_sd(UNICODE_STRING *filenameW)
|
||||
+{
|
||||
+ SECURITY_INFORMATION info = OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION
|
||||
+ |DACL_SECURITY_INFORMATION|SACL_SECURITY_INFORMATION;
|
||||
+ PSECURITY_DESCRIPTOR parentsd = NULL;
|
||||
+ ACL_SIZE_INFORMATION acl_size;
|
||||
+ BOOLEAN present, defaulted;
|
||||
+ WCHAR *p, parent[MAX_PATH];
|
||||
+ OBJECT_ATTRIBUTES pattr;
|
||||
+ UNICODE_STRING parentW;
|
||||
+ IO_STATUS_BLOCK io;
|
||||
+ NTSTATUS status;
|
||||
+ HANDLE hparent;
|
||||
+ ULONG n1, n2;
|
||||
+ PACL pDacl;
|
||||
+ int i;
|
||||
+
|
||||
+ parentW.Buffer = parent;
|
||||
+ parentW.Length = filenameW->Length;
|
||||
+ memcpy(parentW.Buffer, filenameW->Buffer, filenameW->Length);
|
||||
+ if ((p = strrchrW(parent, '\\')) != NULL)
|
||||
+ {
|
||||
+ p[0] = 0;
|
||||
+ parentW.Length = (p-parent)*sizeof(WCHAR);
|
||||
+ }
|
||||
+ memset(&pattr, 0x0, sizeof(pattr));
|
||||
+ pattr.Length = sizeof(pattr);
|
||||
+ pattr.Attributes = OBJ_CASE_INSENSITIVE;
|
||||
+ pattr.ObjectName = &parentW;
|
||||
+ status = FILE_CreateFile( &hparent, READ_CONTROL|ACCESS_SYSTEM_SECURITY, &pattr, &io, NULL,
|
||||
+ FILE_FLAG_BACKUP_SEMANTICS,
|
||||
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, FILE_OPEN,
|
||||
+ FILE_OPEN_FOR_BACKUP_INTENT, NULL, 0 );
|
||||
+ if (status == STATUS_SUCCESS)
|
||||
+ status = NtQuerySecurityObject( hparent, info, NULL, 0, &n1 );
|
||||
+ if (status == STATUS_BUFFER_TOO_SMALL && (parentsd = RtlAllocateHeap( GetProcessHeap(), 0, n1 )) != NULL)
|
||||
+ status = NtQuerySecurityObject( hparent, info, parentsd, n1, &n2 );
|
||||
+ if (status == STATUS_SUCCESS)
|
||||
+ status = NtQuerySecurityObject( hparent, info, parentsd, n1, &n2 );
|
||||
+ if (hparent != INVALID_HANDLE_VALUE)
|
||||
+ NtClose( hparent );
|
||||
+ if (status != STATUS_SUCCESS) return NULL;
|
||||
+ status = RtlGetDaclSecurityDescriptor(parentsd, &present, &pDacl, &defaulted);
|
||||
+ if (status != STATUS_SUCCESS || !present) return NULL;
|
||||
+ status = RtlQueryInformationAcl(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
|
||||
+ if (status != STATUS_SUCCESS) return NULL;
|
||||
+
|
||||
+ for (i=acl_size.AceCount-1; i>=0; i--)
|
||||
+ {
|
||||
+ DWORD inheritance_mask = INHERIT_ONLY_ACE|OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE;
|
||||
+ ACE_HEADER *ace;
|
||||
+
|
||||
+ status = RtlGetAce(pDacl, i, (VOID **)&ace);
|
||||
+ if (status != STATUS_SUCCESS || !(ace->AceFlags & inheritance_mask))
|
||||
+ {
|
||||
+ RtlDeleteAce(pDacl, i);
|
||||
+ acl_size.AceCount--;
|
||||
+ }
|
||||
+ else
|
||||
+ ace->AceFlags = (ace->AceFlags & ~inheritance_mask) | INHERITED_ACE;
|
||||
+ }
|
||||
+
|
||||
+ if (!acl_size.AceCount)
|
||||
+ {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ return parentsd;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/**************************************************************************
|
||||
* FILE_CreateFile (internal)
|
||||
* Open a file.
|
||||
@@ -161,10 +236,18 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
|
||||
{
|
||||
struct security_descriptor *sd;
|
||||
struct object_attributes objattr;
|
||||
+ PSECURITY_DESCRIPTOR parentsd = NULL, psd;
|
||||
|
||||
objattr.rootdir = wine_server_obj_handle( attr->RootDirectory );
|
||||
objattr.name_len = 0;
|
||||
- io->u.Status = NTDLL_create_struct_sd( attr->SecurityDescriptor, &sd, &objattr.sd_len );
|
||||
+ psd = attr->SecurityDescriptor;
|
||||
+ if (!psd && (disposition == FILE_CREATE||disposition == FILE_OVERWRITE_IF))
|
||||
+ parentsd = FILE_get_parent_sd( attr->ObjectName );
|
||||
+ if (parentsd)
|
||||
+ psd = parentsd;
|
||||
+ io->u.Status = NTDLL_create_struct_sd( psd, &sd, &objattr.sd_len );
|
||||
+ if (parentsd)
|
||||
+ RtlFreeHeap( GetProcessHeap(), 0, parentsd );
|
||||
if (io->u.Status != STATUS_SUCCESS)
|
||||
{
|
||||
RtlFreeAnsiString( &unix_name );
|
||||
--
|
||||
1.7.9.5
|
||||
|
@@ -1,25 +0,0 @@
|
||||
From d027a6891aa48f2614b606892bc54e25e147eee2 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Sun, 11 Aug 2013 17:45:19 -0600
|
||||
Subject: kernel32: Allow string comparison with linguistic casing.
|
||||
|
||||
---
|
||||
dlls/kernel32/locale.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c
|
||||
index 9ddf078..d635364 100644
|
||||
--- a/dlls/kernel32/locale.c
|
||||
+++ b/dlls/kernel32/locale.c
|
||||
@@ -2934,7 +2934,7 @@ INT WINAPI CompareStringEx(LPCWSTR locale, DWORD flags, LPCWSTR str1, INT len1,
|
||||
return 0;
|
||||
}
|
||||
|
||||
- if( flags & ~(NORM_IGNORECASE|NORM_IGNORENONSPACE|NORM_IGNORESYMBOLS|
|
||||
+ if( flags & ~(NORM_IGNORECASE|NORM_IGNORENONSPACE|NORM_IGNORESYMBOLS|NORM_LINGUISTIC_CASING|
|
||||
SORT_STRINGSORT|NORM_IGNOREKANATYPE|NORM_IGNOREWIDTH|LOCALE_USE_CP_ACP|0x10000000) )
|
||||
{
|
||||
SetLastError(ERROR_INVALID_FLAGS);
|
||||
--
|
||||
1.7.9.5
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user