diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/fortify-headers.h | 4 | ||||
| -rw-r--r-- | include/stdio.h | 20 | ||||
| -rw-r--r-- | include/string.h | 46 | ||||
| -rw-r--r-- | include/strings.h | 6 | ||||
| -rw-r--r-- | include/sys/socket.h | 8 | ||||
| -rw-r--r-- | include/unistd.h | 20 |
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 | { |
