https://bugs.winehq.org/show_bug.cgi?id=56454
Bug ID: 56454 Summary: TclKit-based installer gets denied any write into any directory when launched via binfmt_misc Product: Wine Version: 9.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: sldev@free.fr Distribution: ---
Created attachment 76213 --> https://bugs.winehq.org/attachment.cgi?id=76213 Reversal patch for admin privileges on process launch
Greetings,
I am the developer of a Second Life third party viewer (the Cool VL Viewer: http://sldev.free.fr/ ), and while the said viewer is developed under Linux and therefore got Linux native builds, I still use Wine to test its Windows builds (those builds are done in a VirtualBox VM that cannot run them).
With Wine 9.4 I am facing a weird issue, where the installer (the super-old but totally gorgeous InstallJammer: https://sourceforge.net/projects/installjammer/ ), gets denied writing into *any* directory to install the program. However, this only occurs when the installer is launched via the binfmt_misc mechanism (i.e. the installer got the proper privileges when launched via the command line with 'wine <installer_executable>').
Looking at the diff between Wine 9.3 and 9.4, I could narrow down the issue to the new way programs are launched (via CreateProcessAsUserW() instead of CreateProcessW()) and came up with a reversal patch (attached) that does fix the issue.
To reproduce the issue, download the latest Windows installer (there are weekly releases, so get the current one from: http://sldev.free.fr/index.php?page=download ), configure binfmt_misc for Wine on your Linux system (*), and launch the installer from your preferred file manager by clicking on its file. You will see that as soon as you start the installation (just after you chose the installation directory), the installer complains it does have permission to access the destination folder.
(*) binfmt_misc configuration on my system: echo ':windows:M::MZ::/usr/bin/wine:' >/proc/sys/fs/binfmt_misc/register echo ':windowsPE:M::PE::/usr/bin/wine:' >/proc/sys/fs/binfmt_misc/register