From 53d1c63711343b7dec15f057d75f3cf6fbac28f2 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker 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/recv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/libc/net/recv.c') diff --git a/lib/libc/net/recv.c b/lib/libc/net/recv.c index f71d4780bb7c0..6a584cadbff6e 100644 --- a/lib/libc/net/recv.c +++ b/lib/libc/net/recv.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libc_private.h" #include @@ -48,5 +49,8 @@ recv(s, buf, len, flags) * POSIX says recv() shall be a cancellation point, so call the * cancellation-enabled recvfrom() and not _recvfrom(). */ - return (recvfrom(s, buf, len, flags, NULL, 0)); + return (((ssize_t (*)(int, void *, size_t, int, + struct sockaddr *, socklen_t *)) + __libc_interposing[INTERPOS_recvfrom])(s, buf, len, flags, + NULL, NULL)); } -- cgit v1.2.3