summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2025-12-30 11:32:19 +0100
committerJulien Voisin2025-12-30 11:34:48 +0100
commitc4c5fd41124f38a5afee02b8f604ddc21d3b199a (patch)
tree77e2be706743d954bfcaa28163751fcd2f4cd27e
parent4797899b24d35873211cf0cd1a2a373e2db3c528 (diff)
Change __access into __fortify_access to fix potential conflicts
-rw-r--r--include/fortify-headers.h4
-rw-r--r--include/stdio.h20
-rw-r--r--include/string.h46
-rw-r--r--include/strings.h6
-rw-r--r--include/sys/socket.h8
-rw-r--r--include/unistd.h20
6 files changed, 52 insertions, 52 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h
index bdf10f6..b0bee87 100644
--- a/include/fortify-headers.h
+++ b/include/fortify-headers.h
@@ -62,9 +62,9 @@
62#if defined __has_attribute 62#if defined __has_attribute
63 63
64#if __has_attribute (access) 64#if __has_attribute (access)
65#define __access(...) __attribute__ ((access (__VA_ARGS__))) 65#define __fortify_access(...) __attribute__ ((access (__VA_ARGS__)))
66#else 66#else
67#define __access(...) 67#define __fortify_access(...)
68#endif 68#endif
69 69
70#if __has_attribute (format) 70#if __has_attribute (format)
diff --git a/include/stdio.h b/include/stdio.h
index 333978b..2a19cd0 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -37,8 +37,8 @@ extern "C" {
37#undef snprintf 37#undef snprintf
38#undef sprintf 38#undef sprintf
39 39
40__access(read_write, 1, 2) 40__fortify_access(read_write, 1, 2)
41__access(read_only, 3) 41__fortify_access(read_only, 3)
42_FORTIFY_FN(fgets) char *fgets(char * _FORTIFY_POS0 __s, int __n, FILE *__f) 42_FORTIFY_FN(fgets) char *fgets(char * _FORTIFY_POS0 __s, int __n, FILE *__f)
43{ 43{
44 size_t __b = __bos(__s, 0); 44 size_t __b = __bos(__s, 0);
@@ -48,8 +48,8 @@ _FORTIFY_FN(fgets) char *fgets(char * _FORTIFY_POS0 __s, int __n, FILE *__f)
48 return __orig_fgets(__s, __n, __f); 48 return __orig_fgets(__s, __n, __f);
49} 49}
50 50
51__access(write_only, 1) 51__fortify_access(write_only, 1)
52__access(read_only, 4) 52__fortify_access(read_only, 4)
53_FORTIFY_FN(fread) size_t fread(void * _FORTIFY_POS0 __d, size_t __n, 53_FORTIFY_FN(fread) size_t fread(void * _FORTIFY_POS0 __d, size_t __n,
54 size_t __m, FILE *__f) 54 size_t __m, FILE *__f)
55{ 55{
@@ -62,8 +62,8 @@ _FORTIFY_FN(fread) size_t fread(void * _FORTIFY_POS0 __d, size_t __n,
62 return __orig_fread(__d, __n, __m, __f); 62 return __orig_fread(__d, __n, __m, __f);
63} 63}
64 64
65__access(read_only, 1) 65__fortify_access(read_only, 1)
66__access(write_only, 4) 66__fortify_access(write_only, 4)
67_FORTIFY_FN(fwrite) size_t fwrite(const void * _FORTIFY_POS0 __d, size_t __n, 67_FORTIFY_FN(fwrite) size_t fwrite(const void * _FORTIFY_POS0 __d, size_t __n,
68 size_t __m, FILE *__f) 68 size_t __m, FILE *__f)
69{ 69{
@@ -77,8 +77,8 @@ _FORTIFY_FN(fwrite) size_t fwrite(const void * _FORTIFY_POS0 __d, size_t __n,
77} 77}
78 78
79__fortify__format(printf, 3, 0) 79__fortify__format(printf, 3, 0)
80__access(write_only, 1, 2) 80__fortify_access(write_only, 1, 2)
81__access(read_only, 3) 81__fortify_access(read_only, 3)
82_FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n, 82_FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
83 const char *__f, __builtin_va_list __v) 83 const char *__f, __builtin_va_list __v)
84{ 84{
@@ -90,8 +90,8 @@ _FORTIFY_FN(vsnprintf) int vsnprintf(char * _FORTIFY_POS0 __s, size_t __n,
90} 90}
91 91
92__fortify__format(printf, 2, 0) 92__fortify__format(printf, 2, 0)
93__access(write_only, 1) 93__fortify_access(write_only, 1)
94__access(read_only, 2) 94__fortify_access(read_only, 2)
95_FORTIFY_FN(vsprintf) int vsprintf(char * _FORTIFY_POS0 __s, const char *__f, 95_FORTIFY_FN(vsprintf) int vsprintf(char * _FORTIFY_POS0 __s, const char *__f,
96 __builtin_va_list __v) 96 __builtin_va_list __v)
97{ 97{
diff --git a/include/string.h b/include/string.h
index 987b50c..8f0167f 100644
--- a/include/string.h
+++ b/include/string.h
@@ -37,8 +37,8 @@ extern "C" {
37#undef strncat 37#undef strncat
38#undef strncpy 38#undef strncpy
39 39
40__access(write_only, 1, 3) 40__fortify_access(write_only, 1, 3)
41__access(read_only, 2, 3) 41__fortify_access(read_only, 2, 3)
42_FORTIFY_FN(memcpy) void *memcpy(void * _FORTIFY_POS0 __od, 42_FORTIFY_FN(memcpy) void *memcpy(void * _FORTIFY_POS0 __od,
43 const void * _FORTIFY_POS0 __os, size_t __n) 43 const void * _FORTIFY_POS0 __os, size_t __n)
44{ 44{
@@ -57,8 +57,8 @@ _FORTIFY_FN(memcpy) void *memcpy(void * _FORTIFY_POS0 __od,
57 return __builtin_memcpy(__od, __os, __n); 57 return __builtin_memcpy(__od, __os, __n);
58} 58}
59 59
60__access(write_only, 1, 3) 60__fortify_access(write_only, 1, 3)
61__access(read_only, 2, 3) 61__fortify_access(read_only, 2, 3)
62_FORTIFY_FN(memmove) void *memmove(void * _FORTIFY_POS0 __d, 62_FORTIFY_FN(memmove) void *memmove(void * _FORTIFY_POS0 __d,
63 const void * _FORTIFY_POS0 __s, size_t __n) 63 const void * _FORTIFY_POS0 __s, size_t __n)
64{ 64{
@@ -70,7 +70,7 @@ _FORTIFY_FN(memmove) void *memmove(void * _FORTIFY_POS0 __d,
70 return __orig_memmove(__d, __s, __n); 70 return __orig_memmove(__d, __s, __n);
71} 71}
72 72
73__access(write_only, 1, 3) 73__fortify_access(write_only, 1, 3)
74__warning_if(__c != 0 && __n == 0, "'memset' will set `0` bytes; did you invert the arguments?") 74__warning_if(__c != 0 && __n == 0, "'memset' will set `0` bytes; did you invert the arguments?")
75_FORTIFY_FN(memset) void *memset(void * _FORTIFY_POS0 __d, int __c, size_t __n) 75_FORTIFY_FN(memset) void *memset(void * _FORTIFY_POS0 __d, int __c, size_t __n)
76{ 76{
@@ -85,8 +85,8 @@ _FORTIFY_FN(memset) void *memset(void * _FORTIFY_POS0 __d, int __c, size_t __n)
85 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ 85 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
86 || defined(_BSD_SOURCE) 86 || defined(_BSD_SOURCE)
87#undef stpcpy 87#undef stpcpy
88__access(write_only, 1) 88__fortify_access(write_only, 1)
89__access(read_only, 2) 89__fortify_access(read_only, 2)
90_FORTIFY_FN(stpcpy) char *stpcpy(char * _FORTIFY_POS0 __d, const char *__s) 90_FORTIFY_FN(stpcpy) char *stpcpy(char * _FORTIFY_POS0 __d, const char *__s)
91{ 91{
92 size_t __b = __bos(__d, 0); 92 size_t __b = __bos(__d, 0);
@@ -97,8 +97,8 @@ _FORTIFY_FN(stpcpy) char *stpcpy(char * _FORTIFY_POS0 __d, const char *__s)
97} 97}
98 98
99#undef stpncpy 99#undef stpncpy
100__access(write_only, 1) 100__fortify_access(write_only, 1)
101__access(read_only, 2) 101__fortify_access(read_only, 2)
102_FORTIFY_FN(stpncpy) char *stpncpy(char * _FORTIFY_POS0 __d, const char *__s, 102_FORTIFY_FN(stpncpy) char *stpncpy(char * _FORTIFY_POS0 __d, const char *__s,
103 size_t __n) 103 size_t __n)
104{ 104{
@@ -110,8 +110,8 @@ _FORTIFY_FN(stpncpy) char *stpncpy(char * _FORTIFY_POS0 __d, const char *__s,
110} 110}
111#endif 111#endif
112 112
113__access(read_write, 1) 113__fortify_access(read_write, 1)
114__access(read_only, 2) 114__fortify_access(read_only, 2)
115_FORTIFY_FN(strcat) char *strcat(char * _FORTIFY_POS0 __d, const char *__s) 115_FORTIFY_FN(strcat) char *strcat(char * _FORTIFY_POS0 __d, const char *__s)
116{ 116{
117 size_t __b = __bos(__d, 0); 117 size_t __b = __bos(__d, 0);
@@ -121,8 +121,8 @@ _FORTIFY_FN(strcat) char *strcat(char * _FORTIFY_POS0 __d, const char *__s)
121 return __orig_strcat(__d, __s); 121 return __orig_strcat(__d, __s);
122} 122}
123 123
124__access(write_only, 1) 124__fortify_access(write_only, 1)
125__access(read_only, 2) 125__fortify_access(read_only, 2)
126_FORTIFY_FN(strcpy) char *strcpy(char * _FORTIFY_POS0 __d, const char *__s) 126_FORTIFY_FN(strcpy) char *strcpy(char * _FORTIFY_POS0 __d, const char *__s)
127{ 127{
128 size_t __b = __bos(__d, 0); 128 size_t __b = __bos(__d, 0);
@@ -132,8 +132,8 @@ _FORTIFY_FN(strcpy) char *strcpy(char * _FORTIFY_POS0 __d, const char *__s)
132 return __orig_strcpy(__d, __s); 132 return __orig_strcpy(__d, __s);
133} 133}
134 134
135__access(read_write, 1) 135__fortify_access(read_write, 1)
136__access(read_only, 2) 136__fortify_access(read_only, 2)
137_FORTIFY_FN(strncat) char *strncat(char * _FORTIFY_POS0 __d, const char *__s, 137_FORTIFY_FN(strncat) char *strncat(char * _FORTIFY_POS0 __d, const char *__s,
138 size_t __n) 138 size_t __n)
139{ 139{
@@ -151,8 +151,8 @@ _FORTIFY_FN(strncat) char *strncat(char * _FORTIFY_POS0 __d, const char *__s,
151 return __orig_strncat(__d, __s, __n); 151 return __orig_strncat(__d, __s, __n);
152} 152}
153 153
154__access(write_only, 1) 154__fortify_access(write_only, 1)
155__access(read_only, 2) 155__fortify_access(read_only, 2)
156_FORTIFY_FN(strncpy) char *strncpy(char * _FORTIFY_POS0 __d, 156_FORTIFY_FN(strncpy) char *strncpy(char * _FORTIFY_POS0 __d,
157 const char *__s, size_t __n) 157 const char *__s, size_t __n)
158{ 158{
@@ -165,8 +165,8 @@ _FORTIFY_FN(strncpy) char *strncpy(char * _FORTIFY_POS0 __d,
165 165
166#ifdef _GNU_SOURCE 166#ifdef _GNU_SOURCE
167#undef mempcpy 167#undef mempcpy
168__access(write_only, 1, 3) 168__fortify_access(write_only, 1, 3)
169__access(read_only, 2, 3) 169__fortify_access(read_only, 2, 3)
170_FORTIFY_FN(mempcpy) void *mempcpy(void * _FORTIFY_POS0 __d, 170_FORTIFY_FN(mempcpy) void *mempcpy(void * _FORTIFY_POS0 __d,
171 const void * _FORTIFY_POS0 __s, size_t __n) 171 const void * _FORTIFY_POS0 __s, size_t __n)
172{ 172{
@@ -182,8 +182,8 @@ _FORTIFY_FN(mempcpy) void *mempcpy(void * _FORTIFY_POS0 __d,
182#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 182#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
183#undef strlcat 183#undef strlcat
184#undef strlcpy 184#undef strlcpy
185__access(read_write, 1) 185__fortify_access(read_write, 1)
186__access(read_only, 2) 186__fortify_access(read_only, 2)
187_FORTIFY_FN(strlcat) size_t strlcat(char * _FORTIFY_POS0 __d, 187_FORTIFY_FN(strlcat) size_t strlcat(char * _FORTIFY_POS0 __d,
188 const char *__s, size_t __n) 188 const char *__s, size_t __n)
189{ 189{
@@ -194,8 +194,8 @@ _FORTIFY_FN(strlcat) size_t strlcat(char * _FORTIFY_POS0 __d,
194 return __orig_strlcat(__d, __s, __n); 194 return __orig_strlcat(__d, __s, __n);
195} 195}
196 196
197__access(write_only, 1) 197__fortify_access(write_only, 1)
198__access(read_only, 2) 198__fortify_access(read_only, 2)
199_FORTIFY_FN(strlcpy) size_t strlcpy(char * _FORTIFY_POS0 __d, 199_FORTIFY_FN(strlcpy) size_t strlcpy(char * _FORTIFY_POS0 __d,
200 const char *__s, size_t __n) 200 const char *__s, size_t __n)
201{ 201{
diff --git a/include/strings.h b/include/strings.h
index 3b6b765..6a17ca3 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -31,8 +31,8 @@ extern "C" {
31 || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700) 31 || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
32#undef bcopy 32#undef bcopy
33#undef bzero 33#undef bzero
34__access(write_only, 2, 3) 34__fortify_access(write_only, 2, 3)
35__access(read_only, 1, 3) 35__fortify_access(read_only, 1, 3)
36_FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, 36_FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s,
37 void * _FORTIFY_POS0 __d, size_t __n) 37 void * _FORTIFY_POS0 __d, size_t __n)
38{ 38{
@@ -44,7 +44,7 @@ _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s,
44 return __orig_bcopy(__s, __d, __n); 44 return __orig_bcopy(__s, __d, __n);
45} 45}
46 46
47__access(write_only, 1, 2) 47__fortify_access(write_only, 1, 2)
48_FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n) 48_FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n)
49{ 49{
50 size_t __b = __bos(__s, 0); 50 size_t __b = __bos(__s, 0);
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 94cc0c8..70e7ccd 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -34,7 +34,7 @@ extern "C" {
34#undef send 34#undef send
35#undef sendto 35#undef sendto
36 36
37__access(write_only, 2, 3) 37__fortify_access(write_only, 2, 3)
38_FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n, 38_FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n,
39 int __fl) 39 int __fl)
40{ 40{
@@ -45,7 +45,7 @@ _FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n,
45 return __orig_recv(__f, __s, __n, __fl); 45 return __orig_recv(__f, __s, __n, __fl);
46} 46}
47 47
48__access(write_only, 2, 3) 48__fortify_access(write_only, 2, 3)
49_FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void * _FORTIFY_POS0 __s, 49_FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void * _FORTIFY_POS0 __s,
50 size_t __n, int __fl, 50 size_t __n, int __fl,
51 struct sockaddr *__a, socklen_t *__l) 51 struct sockaddr *__a, socklen_t *__l)
@@ -57,7 +57,7 @@ _FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void * _FORTIFY_POS0 __s,
57 return __orig_recvfrom(__f, __s, __n, __fl, __a, __l); 57 return __orig_recvfrom(__f, __s, __n, __fl, __a, __l);
58} 58}
59 59
60__access(read_only, 2, 3) 60__fortify_access(read_only, 2, 3)
61_FORTIFY_FN(send) ssize_t send(int __f, const void * _FORTIFY_POS0 __s, 61_FORTIFY_FN(send) ssize_t send(int __f, const void * _FORTIFY_POS0 __s,
62 size_t __n, int __fl) 62 size_t __n, int __fl)
63{ 63{
@@ -68,7 +68,7 @@ _FORTIFY_FN(send) ssize_t send(int __f, const void * _FORTIFY_POS0 __s,
68 return __orig_send(__f, __s, __n, __fl); 68 return __orig_send(__f, __s, __n, __fl);
69} 69}
70 70
71__access(read_only, 2, 3) 71__fortify_access(read_only, 2, 3)
72_FORTIFY_FN(sendto) ssize_t sendto(int __f, const void * _FORTIFY_POS0 __s, 72_FORTIFY_FN(sendto) ssize_t sendto(int __f, const void * _FORTIFY_POS0 __s,
73 size_t __n, int __fl, 73 size_t __n, int __fl,
74 const struct sockaddr *__a, socklen_t __l) 74 const struct sockaddr *__a, socklen_t __l)
diff --git a/include/unistd.h b/include/unistd.h
index a6c2ed1..a2b3105 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -41,7 +41,7 @@ extern "C" {
41#undef ttyname_r 41#undef ttyname_r
42#undef write 42#undef write
43 43
44__access(write_only, 2, 3) 44__fortify_access(write_only, 2, 3)
45_FORTIFY_FN(confstr) size_t confstr(int __n, char * _FORTIFY_POS0 __s, size_t __l) 45_FORTIFY_FN(confstr) size_t confstr(int __n, char * _FORTIFY_POS0 __s, size_t __l)
46{ 46{
47 size_t __b = __bos(__s, 0); 47 size_t __b = __bos(__s, 0);
@@ -52,7 +52,7 @@ _FORTIFY_FN(confstr) size_t confstr(int __n, char * _FORTIFY_POS0 __s, size_t __
52 return __r; 52 return __r;
53} 53}
54 54
55__access(write_only, 1, 2) 55__fortify_access(write_only, 1, 2)
56_FORTIFY_FN(getcwd) char *getcwd(char * _FORTIFY_POS0 __s, size_t __l) 56_FORTIFY_FN(getcwd) char *getcwd(char * _FORTIFY_POS0 __s, size_t __l)
57{ 57{
58 size_t __b = __bos(__s, 0); 58 size_t __b = __bos(__s, 0);
@@ -64,7 +64,7 @@ _FORTIFY_FN(getcwd) char *getcwd(char * _FORTIFY_POS0 __s, size_t __l)
64 64
65#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 65#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
66#undef getdomainname 66#undef getdomainname
67__access(write_only, 1, 2) 67__fortify_access(write_only, 1, 2)
68_FORTIFY_FN(getdomainname) int getdomainname(char * _FORTIFY_POS0 __s, size_t __l) 68_FORTIFY_FN(getdomainname) int getdomainname(char * _FORTIFY_POS0 __s, size_t __l)
69{ 69{
70 size_t __b = __bos(__s, 0); 70 size_t __b = __bos(__s, 0);
@@ -84,7 +84,7 @@ _FORTIFY_FN(getgroups) int getgroups(int __l, gid_t * _FORTIFY_POS0 __s)
84 return __orig_getgroups(__l, __s); 84 return __orig_getgroups(__l, __s);
85} 85}
86 86
87__access(write_only, 1, 2) 87__fortify_access(write_only, 1, 2)
88_FORTIFY_FN(gethostname) int gethostname(char * _FORTIFY_POS0 __s, size_t __l) 88_FORTIFY_FN(gethostname) int gethostname(char * _FORTIFY_POS0 __s, size_t __l)
89{ 89{
90 size_t __b = __bos(__s, 0); 90 size_t __b = __bos(__s, 0);
@@ -94,7 +94,7 @@ _FORTIFY_FN(gethostname) int gethostname(char * _FORTIFY_POS0 __s, size_t __l)
94 return __orig_gethostname(__s, __l); 94 return __orig_gethostname(__s, __l);
95} 95}
96 96
97__access(write_only, 1, 2) 97__fortify_access(write_only, 1, 2)
98_FORTIFY_FN(getlogin_r) int getlogin_r(char * _FORTIFY_POS0 __s, size_t __l) 98_FORTIFY_FN(getlogin_r) int getlogin_r(char * _FORTIFY_POS0 __s, size_t __l)
99{ 99{
100 size_t __b = __bos(__s, 0); 100 size_t __b = __bos(__s, 0);
@@ -114,7 +114,7 @@ _FORTIFY_FN(pread) ssize_t pread(int __f, void * _FORTIFY_POS0 __s,
114 return __orig_pread(__f, __s, __n, __o); 114 return __orig_pread(__f, __s, __n, __o);
115} 115}
116 116
117__access(write_only, 2, 3) 117__fortify_access(write_only, 2, 3)
118_FORTIFY_FN(read) ssize_t read(int __f, void * _FORTIFY_POS0 __s, size_t __n) 118_FORTIFY_FN(read) ssize_t read(int __f, void * _FORTIFY_POS0 __s, size_t __n)
119{ 119{
120 size_t __b = __bos(__s, 0); 120 size_t __b = __bos(__s, 0);
@@ -124,7 +124,7 @@ _FORTIFY_FN(read) ssize_t read(int __f, void * _FORTIFY_POS0 __s, size_t __n)
124 return __orig_read(__f, __s, __n); 124 return __orig_read(__f, __s, __n);
125} 125}
126 126
127__access(write_only, 2, 3) 127__fortify_access(write_only, 2, 3)
128_FORTIFY_FN(readlink) ssize_t readlink(const char *__p, 128_FORTIFY_FN(readlink) ssize_t readlink(const char *__p,
129 char * _FORTIFY_POS0 __s, size_t __n) 129 char * _FORTIFY_POS0 __s, size_t __n)
130{ 130{
@@ -135,7 +135,7 @@ _FORTIFY_FN(readlink) ssize_t readlink(const char *__p,
135 return __orig_readlink(__p, __s, __n); 135 return __orig_readlink(__p, __s, __n);
136} 136}
137 137
138__access(write_only, 3, 4) 138__fortify_access(write_only, 3, 4)
139_FORTIFY_FN(readlinkat) ssize_t readlinkat(int __f, const char *__p, 139_FORTIFY_FN(readlinkat) ssize_t readlinkat(int __f, const char *__p,
140 char * _FORTIFY_POS0 __s, size_t __n) 140 char * _FORTIFY_POS0 __s, size_t __n)
141{ 141{
@@ -146,7 +146,7 @@ _FORTIFY_FN(readlinkat) ssize_t readlinkat(int __f, const char *__p,
146 return __orig_readlinkat(__f, __p, __s, __n); 146 return __orig_readlinkat(__f, __p, __s, __n);
147} 147}
148 148
149__access(write_only, 2, 3) 149__fortify_access(write_only, 2, 3)
150_FORTIFY_FN(ttyname_r) int ttyname_r(int __f, char * _FORTIFY_POS0 __s, 150_FORTIFY_FN(ttyname_r) int ttyname_r(int __f, char * _FORTIFY_POS0 __s,
151 size_t __n) 151 size_t __n)
152{ 152{
@@ -157,7 +157,7 @@ _FORTIFY_FN(ttyname_r) int ttyname_r(int __f, char * _FORTIFY_POS0 __s,
157 return __orig_ttyname_r(__f, __s, __n); 157 return __orig_ttyname_r(__f, __s, __n);
158} 158}
159 159
160__access(read_only, 2, 3) 160__fortify_access(read_only, 2, 3)
161_FORTIFY_FN(write) ssize_t write(int __f, const void * _FORTIFY_POS0 __s, 161_FORTIFY_FN(write) ssize_t write(int __f, const void * _FORTIFY_POS0 __s,
162 size_t __n) 162 size_t __n)
163{ 163{