]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In r331279 the code used ENOSYS to check the existence of getrandom(2).
authordelphij <delphij@FreeBSD.org>
Mon, 20 Aug 2018 02:17:55 +0000 (02:17 +0000)
committerdelphij <delphij@FreeBSD.org>
Mon, 20 Aug 2018 02:17:55 +0000 (02:17 +0000)
commit590c452778d72b9ee5f96cb69ebf6a534f6aedc3
tree1139d89f388a20b1284e686ae4aba1d31c8dcb5c
parentb52c6d749e97c8527edb756e66e421e9983b561d
In r331279 the code used ENOSYS to check the existence of getrandom(2).
This will only work if the caller already handles SIGSYS, which is not
always the case.

Address this by checking osreldate instead. Note that because there
was not __FreeBSD_version bump when the system call was added, use
1200061 (r332100) which is the first bump after the introduction of
the system call.

PR: 230762
Reported by: Jenkins via Mark Millard
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D16807
lib/libc/gen/getentropy.c