aboutsummaryrefslogtreecommitdiff
path: root/io/bits/fcntl2.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-06-28 16:20:15 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-07-02 10:19:44 -0300
commit9f80d8134a15235732586e238ac28cea459fb60b (patch)
tree5e06279c564d67a71e04e979357b657e1598a731 /io/bits/fcntl2.h
parentba144c179eb12a6aff145582671cbb8b1045c5b9 (diff)
downloadglibc-9f80d8134a15235732586e238ac28cea459fb60b.zip
glibc-9f80d8134a15235732586e238ac28cea459fb60b.tar.gz
glibc-9f80d8134a15235732586e238ac28cea459fb60b.tar.bz2
debug: Fix clang open fortify wrapper (BZ 31927)
The clang open fortify wrapper from 4228baef1a94e8bde84ad74 added a restriction where open with 3 arguments where flags do not contain O_CREAT or O_TMPFILE are handled as invalid. They are not invalid, since the third argument is ignored, and the gcc wrapper also allows it. Checked x86_64-linux-gnu and with a yocto build for some affected packages. Tested-by: “Khem Raj <raj.khen@gmail.com>”
Diffstat (limited to 'io/bits/fcntl2.h')
-rw-r--r--io/bits/fcntl2.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/io/bits/fcntl2.h b/io/bits/fcntl2.h
index c8888b5..0cced39 100644
--- a/io/bits/fcntl2.h
+++ b/io/bits/fcntl2.h
@@ -61,13 +61,8 @@ open (const char *__path, int __oflag, ...)
return __open_alias (__path, __oflag, __va_arg_pack ());
}
#elif __fortify_use_clang
-__fortify_function_error_function __attribute_overloadable__ int
-open (__fortify_clang_overload_arg (const char *, ,__path), int __oflag, ...)
- __fortify_clang_unavailable ("open can be called either with 2 or 3 arguments, not more");
-
__fortify_function __attribute_overloadable__ int
open (__fortify_clang_overload_arg (const char *, ,__path), int __oflag)
- __fortify_clang_prefer_this_overload
__fortify_clang_error (__OPEN_NEEDS_MODE (__oflag),
"open with O_CREAT or O_TMPFILE in second argument needs 3 arguments")
{