From 62199030394acd30ab44bc21af7078ae993fd149 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 5 Jul 2023 15:48:14 +0200 Subject: Add access annotations to sys/socket.h --- include/sys/socket.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/sys') diff --git a/include/sys/socket.h b/include/sys/socket.h index 7dfa71a..94cc0c8 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -34,6 +34,7 @@ extern "C" { #undef send #undef sendto +__access(write_only, 2, 3) _FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n, int __fl) { @@ -44,6 +45,7 @@ _FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n, return __orig_recv(__f, __s, __n, __fl); } +__access(write_only, 2, 3) _FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void * _FORTIFY_POS0 __s, size_t __n, int __fl, struct sockaddr *__a, socklen_t *__l) @@ -55,6 +57,7 @@ _FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void * _FORTIFY_POS0 __s, return __orig_recvfrom(__f, __s, __n, __fl, __a, __l); } +__access(read_only, 2, 3) _FORTIFY_FN(send) ssize_t send(int __f, const void * _FORTIFY_POS0 __s, size_t __n, int __fl) { @@ -65,6 +68,7 @@ _FORTIFY_FN(send) ssize_t send(int __f, const void * _FORTIFY_POS0 __s, return __orig_send(__f, __s, __n, __fl); } +__access(read_only, 2, 3) _FORTIFY_FN(sendto) ssize_t sendto(int __f, const void * _FORTIFY_POS0 __s, size_t __n, int __fl, const struct sockaddr *__a, socklen_t __l) -- cgit v1.3