[PATCH v7] getrandom system call wrapper [BZ #17252]
Florian Weimer
fweimer@redhat.com
Mon Nov 14 17:45:00 GMT 2016
This patch switches back to the ssize_t return time. This goes against
Theodore Ts'o preference, but seems to reflect the consensus from the
largery community.
I weakened the protection against accidental interposition somewhat.
Since the declaration is a new header file, I do not use a function-like
macro to prevent a definition of a function named âgetrandomâ, and
non-GNU compilers do not get any redirection. The rationale is that if
you interpose the function after including <sys/random.h>, you probably
know what you are doing. The redirect to __libc_getrandom still
provides interposition protection if other translation units define a
getrandom function without knowledge of <sys/random.h>.
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getrandom-v7.patch
Type: text/x-patch
Size: 31323 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20161114/264ac813/attachment.bin>
More information about the Libc-alpha
mailing list