hurd: Make getrandom return ENOSYS when /dev/random is not set up

So that callers (e.g. __arc4random_buf) don't try calling it again.
This commit is contained in:
Samuel Thibault 2023-07-01 14:23:40 +02:00
parent 0a9e93842d
commit 494714d407

View file

@ -123,8 +123,13 @@ again:
open_flags, 0);
__libc_rwlock_unlock (lock);
if (!MACH_PORT_VALID (server))
/* No luck. */
return -1;
{
if (errno == ENOENT)
/* No translator set up, we won't have support for it. */
errno = ENOSYS;
/* No luck. */
return -1;
}
goto again;
}