Module: wine Branch: master Commit: 59f2a3312e4c16876b69f9e767b1060beb88c669 URL: http://source.winehq.org/git/wine.git/?a=commit;h=59f2a3312e4c16876b69f9e767...
Author: Juan Lang juan.lang@gmail.com Date: Thu Oct 23 11:38:04 2008 -0700
advapi32: Print error if opening /dev/urandom fails, and update comment.
---
dlls/advapi32/crypt.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c index 131c223..5d0b15e 100644 --- a/dlls/advapi32/crypt.c +++ b/dlls/advapi32/crypt.c @@ -2281,11 +2281,6 @@ BOOL WINAPI SystemFunction036(PVOID pbBuffer, ULONG dwLen) { int dev_random;
- /* FIXME: /dev/urandom does not provide random numbers of a sufficient - * quality for cryptographic applications. /dev/random is much better, - * but it blocks if the kernel has not yet collected enough entropy for - * the request, which will suspend the calling thread for an indefinite - * amount of time. */ dev_random = open("/dev/urandom", O_RDONLY); if (dev_random != -1) { @@ -2296,6 +2291,8 @@ BOOL WINAPI SystemFunction036(PVOID pbBuffer, ULONG dwLen) } close(dev_random); } + else + FIXME("couldn't open /dev/urandom\n"); SetLastError(NTE_FAIL); return FALSE; }