Date: Sat, 18 Aug 2018 08:32:22 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338011 - head/lib/libc/gen Message-ID: <201808180832.w7I8WMwV021430@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Sat Aug 18 08:32:21 2018 New Revision: 338011 URL: https://svnweb.freebsd.org/changeset/base/338011 Log: Workaround ECAPMODE for kernels between revision [331280, 337999) where getrandom(2) is not available in capability mode. Modified: head/lib/libc/gen/getentropy.c Modified: head/lib/libc/gen/getentropy.c ============================================================================== --- head/lib/libc/gen/getentropy.c Sat Aug 18 08:27:35 2018 (r338010) +++ head/lib/libc/gen/getentropy.c Sat Aug 18 08:32:21 2018 (r338011) @@ -85,7 +85,7 @@ getentropy(void *buf, size_t buflen) if (rd == -1) { if (errno == EINTR) continue; - else if (errno == ENOSYS) + else if (errno == ENOSYS || errno == ECAPMODE) return (getentropy_fallback(buf, buflen)); else return (-1);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808180832.w7I8WMwV021430>