Am 2016-12-07 um 06:27 schrieb Bruno Jesus:
@@ -2433,6 +2438,12 @@ static int WS2_send( int fd, struct ws2_async *wsa, int flags ) union generic_unix_sockaddr unix_addr; int n, ret;
- if (network_disabled)
- {
errno = EHOSTUNREACH;
return -1;
- }
Shouldn't it be possible to achieve a similar effect with a LD_PRELOAD library?
On Thu, Dec 8, 2016 at 4:41 PM, Stefan Dösinger stefandoesinger@gmail.com wrote:
Am 2016-12-07 um 06:27 schrieb Bruno Jesus:
@@ -2433,6 +2438,12 @@ static int WS2_send( int fd, struct ws2_async *wsa, int flags ) union generic_unix_sockaddr unix_addr; int n, ret;
- if (network_disabled)
- {
errno = EHOSTUNREACH;
return -1;
- }
Shouldn't it be possible to achieve a similar effect with a LD_PRELOAD library?
Sorry, I don't get what you mean. What would I preload to make Wine network fail?
Am 2016-12-08 um 19:30 schrieb Bruno Jesus:
Sorry, I don't get what you mean. What would I preload to make Wine network fail?
You can write a library that hooks the Linux side of the network related functions and returns an error, similarly to how you modified the implementations in Wine. I have used a similar hack to modify bind() to make multiple instances of Warcraft 3 work on my multiseat gaming box. Unfortunately I lost the source code to that library, but it was around 10 lines of code.
On OSX there's something called DYLD interposing if I remember correctly, but I don't know how it works.