mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
Merge neptunus.(none):/home/msvensson/mysql/bug13164/my50-bug13164
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
This commit is contained in:
commit
306dcf0620
1 changed files with 4 additions and 0 deletions
|
@ -94,9 +94,13 @@ void OS_Seed::GenerateSeed(byte* output, word32 sz)
|
||||||
OS_Seed::OS_Seed()
|
OS_Seed::OS_Seed()
|
||||||
{
|
{
|
||||||
fd_ = open("/dev/urandom",O_RDONLY);
|
fd_ = open("/dev/urandom",O_RDONLY);
|
||||||
|
if (fd_ == -1)
|
||||||
|
{
|
||||||
|
fd_ = open("/dev/random",O_RDONLY);
|
||||||
if (fd_ == -1)
|
if (fd_ == -1)
|
||||||
error_.SetError(OPEN_RAN_E);
|
error_.SetError(OPEN_RAN_E);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
OS_Seed::~OS_Seed()
|
OS_Seed::~OS_Seed()
|
||||||
|
|
Loading…
Add table
Reference in a new issue