Workaround ECAPMODE for kernels between revision [331280, 337999)
where getrandom(2) is not available in capability mode.
This commit is contained in:
parent
ed1fa01ac4
commit
52809cc35b
@ -85,7 +85,7 @@ getentropy(void *buf, size_t buflen)
|
|||||||
if (rd == -1) {
|
if (rd == -1) {
|
||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
else if (errno == ENOSYS)
|
else if (errno == ENOSYS || errno == ECAPMODE)
|
||||||
return (getentropy_fallback(buf, buflen));
|
return (getentropy_fallback(buf, buflen));
|
||||||
else
|
else
|
||||||
return (-1);
|
return (-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user