[Bug 43103] New: unixfs unable to find file when wine run in a network namespace
wine-bugs at winehq.org
wine-bugs at winehq.org
Sun May 28 11:03:37 CDT 2017
https://bugs.winehq.org/show_bug.cgi?id=43103
Bug ID: 43103
Summary: unixfs unable to find file when wine run in a network
namespace
Product: Wine
Version: 2.3
Hardware: x86-64
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: shell32
Assignee: wine-bugs at winehq.org
Reporter: lucianposton at gmail.com
Distribution: ---
If I run wine within a network namespace, wine is unable to find a file,
exiting with an error, wine: cannot find L"unix\\home\\user\\GameDir\\game.exe"
To repro the bug, the prefix must be setup such that:
1) "$WINEPREFIX/drive_c/Program Files/GameDir" is a symlink to a directory in
$HOME, outside of the prefix but on the same partition, and
2) the prefix's registry has been modified with the regedit described at
https://github.com/wine-mirror/wine/blob/252051cb1b3f0fc4aade128370fb3e38d90244d2/dlls/shell32/shfldr_unixfs.c#L118-L122
. This appears to cause the following behavior to change in wine:
https://github.com/wine-mirror/wine/blob/252051cb1b3f0fc4aade128370fb3e38d90244d2/dlls/shell32/shfldr_desktop.c#L189-L193
If I start wine using
cd "$WINEPREFIX/drive_c/Program Files/GameDir" ; wine game.exe
it behaves fine. wine is able to find game.exe.
However, if I start wine within a namespace,
cd "$WINEPREFIX/drive_c/Program Files/GameDir" ; ip netns exec
MyNetworkNamespace wine game.exe
wine exits with the error:
wine: cannot find L"unix\\home\\user\\GameDir\\game.exe"
I expect both to succeed (or both fail, if that's the expect behavior when the
regedit in #2 is performed).
*Ancillary notes on setting up a network namespace*
I setup the network namespace using macvlan, which requires your kernel to have
CONFIG_MACVLAN (if it is compiled as a module, load it). Then you can create a
network namespace and a virtual network interface within the namespace as
follows:
REAL_IFACE=eth0 # set this to your real network interface from ifconfig
NETNS=MyNetworkNamespace # set this to whatever you want to name your namespace
NETNS_IFACE=vlaneth0 # set this to whatever you want to name your new virtual
interface inside the namespace
ip netns add "${NETNS}"
ip link add link "${REAL_IFACE}" name "${NETNS_IFACE}" type macvlan
ip link set "${NETNS_IFACE}" netns "${NETNS}"
ip netns exec "${NETNS}" ip link set "${NETNS_IFACE}" up
# Now give the new interface an ip. I use dhcpcd, but you can use your favorite
dhcp client (or set the ip directly)
ip netns exec "${NETNS}" dhcpcd "${NETNS_IFACE}"
# The interface should now have an ip, which we can verify by running ifconfig
inside the namespace
ip netns exec "${NETNS}" ifconfig
ip netns exec "${NETNS}" wine game.exe
# Note you can use sudo -u to avoid running wine as root in the above command.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list