From 8ae6fa0eb6d5fbd0626127be3f6d2cd2b3d604f6 Mon Sep 17 00:00:00 2001 From: jilles Date: Sun, 10 May 2015 14:50:50 +0000 Subject: recv(),send(): Directly call interposing entry instead of going through PLT. recv() and send()'s calls to recvfrom() and sendto() are much like waitpid()'s call to wait4(), and likewise need not allow PLT interposing on the called function. --- lib/libc/net/send.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/libc/net/send.c') diff --git a/lib/libc/net/send.c b/lib/libc/net/send.c index 93cdfda..c44f4b9 100644 --- a/lib/libc/net/send.c +++ b/lib/libc/net/send.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libc_private.h" #include @@ -48,5 +49,8 @@ send(s, msg, len, flags) * POSIX says send() shall be a cancellation point, so call the * cancellation-enabled sendto() and not _sendto(). */ - return (sendto(s, msg, len, flags, NULL, 0)); + return (((ssize_t (*)(int, const void *, size_t, int, + const struct sockaddr *, socklen_t)) + __libc_interposing[INTERPOS_sendto])(s, msg, len, flags, + NULL, 0)); } -- cgit v1.1