In ran into a problem with a game, Dark Age of Camelot, where it locked up after logging into the game. After some tracing it became apparent that the game was trying to read bytes from /dev/random, but due to me working remotely on the computer, not enough entropy was generated which stalled the game.
I was just wondering if it would be acceptable to specifically check for /dev/random in wine_nt_to_unix_file_name() and turn that into /dev/urandom ?!
Small snippet of the login.dll executable code:
.text:0042C150 sub_42C150 proc near ; CODE XREF: sub_4267E0+5B0C p .text:0042C150 .text:0042C150 arg_0 = dword ptr 8 .text:0042C150 arg_4 = dword ptr 0Ch .text:0042C150 .text:0042C150 push esi .text:0042C151 push offset aRb ; "rb" .text:0042C156 push offset aDevRandom ; "/dev/random" .text:0042C15B call _fopen .text:0042C160 mov esi, eax .text:0042C162 add esp, 8 .text:0042C165 test esi, esi .text:0042C167 jz short loc_42C185 .text:0042C169 push 0 ; size_t .text:0042C16B push 4 ; int .text:0042C16D push 0 ; char * .text:0042C16F push esi ; FILE * .text:0042C170 call _setvbuf .text:0042C175 add esp, 10h .text:0042C178 test eax, eax .text:0042C17A jz short loc_42C189 .text:0042C17C push esi ; FILE * .text:0042C17D call _fclose .text:0042C182 add esp, 4 .text:0042C185 .text:0042C185 loc_42C185: ; CODE XREF: sub_42C150+17 j .text:0042C185 xor eax, eax .text:0042C187 pop esi .text:0042C188 retn
On Sun, Jun 14, 2009 at 12:43 AM, Karl Vogelkarl.vogel@gmail.com wrote:
In ran into a problem with a game, Dark Age of Camelot, where it locked up after logging into the game. After some tracing it became apparent that the game was trying to read bytes from /dev/random, but due to me working remotely on the computer, not enough entropy was generated which stalled the game.
I was just wondering if it would be acceptable to specifically check for /dev/random in wine_nt_to_unix_file_name() and turn that into /dev/urandom ?!
Hi Karl
It's more than likely that this call is supposed to fail, since on windows /dev/random would be interpreted as c:\dev\random, if C: is the current drive. This bug also affects other applications see, 15883.
Regards Jeff
On Sat, Jun 13, 2009 at 4:53 PM, Jeff Zaroyko jeffzaroyko@gmail.com wrote:
On Sun, Jun 14, 2009 at 12:43 AM, Karl Vogelkarl.vogel@gmail.com wrote:
In ran into a problem with a game, Dark Age of Camelot, where it locked up after logging into the game. After some tracing it became apparent that the game was trying to read bytes from /dev/random, but due to me working remotely on the computer, not enough entropy was generated which stalled the game.
I was just wondering if it would be acceptable to specifically check for /dev/random in wine_nt_to_unix_file_name() and turn that into /dev/urandom ?!
Hi Karl
It's more than likely that this call is supposed to fail, since on windows /dev/random would be interpreted as c:\dev\random, if C: is the current drive. This bug also affects other applications see, 15883.
Regards Jeff
Just traced through the code on windows and it does indeed fail. It's kind of puzzling why that check is in there then, intriguing.
Thanks for the bug link.