glibc/rt
Adhemerval Zanella c5579f3a71 debug: Fix clang mq_open fortify wrapper (BZ 31917)
The mqueue.h fortify wrapper for clang added by c23107effb
is not fully correct, where correct 4 argument usage are not
being correctly handled.  For instance, while building socat 1.8
with a yocto clang based system shows:

  ./socat-1.8.0.0/xio-posixmq.c:119:8: error: 'mq_open' is unavailable: mq_open can be called either with 2 or 4 arguments
    119 |         mqd = mq_open(name, oflag, opt_mode, NULL);
        |               ^
  [...] /usr/include/bits/mqueue2.h:66:8: note: 'mq_open' has been explicitly marked unavailable here
     66 | __NTH (mq_open (const char *__name, int __oflag, mode_t mode,
        |        ^
  1 error generated.

The correct way to define the wrapper is to set invalid usage
with __fortify_clang_unavailable (for the case with 5 or more
arguments), followed by the expected ones.  This fix make mq_open
similar to current open wrappers.

[1] http://www.dest-unreach.org/socat/

Reported-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Khem Raj <raj.khem@gmail.com>
2024-06-27 13:32:48 -03:00
..
bits debug: Fix clang mq_open fortify wrapper (BZ 31917) 2024-06-27 13:32:48 -03:00
aio_cancel.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_error.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_fsync.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_misc.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_notify.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_read64.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_read.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_return.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_sigqueue.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_suspend.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_write64.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio_write.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
aio.h Always define __USE_TIME_BITS64 when 64 bit time_t is used 2024-04-02 15:28:36 -03:00
Depend hurd: Add hurd thread library 2018-04-02 01:44:14 +02:00
librt-compat.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
lio_listio64.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
lio_listio-common.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
lio_listio.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Makefile Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mq_close.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mq_getattr.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mq_notify.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mq_open.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mq_receive.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mq_send.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mq_setattr.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mq_timedreceive.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mq_timedsend.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mq_unlink.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mqueue.h Always define __USE_TIME_BITS64 when 64 bit time_t is used 2024-04-02 15:28:36 -03:00
shm_open.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
shm_unlink.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
timer_create.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
timer_delete.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
timer_getoverr.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
timer_gettime.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
timer_settime.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-aio2.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-aio3.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-aio4.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-aio5.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-aio6-time64.c y2038: Add test coverage 2021-06-15 10:42:11 -03:00
tst-aio6.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-aio7.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-aio8.c
tst-aio9.c Don't reduce test timeout to less than default 2018-10-17 09:34:13 +02:00
tst-aio10.c Don't reduce test timeout to less than default 2018-10-17 09:34:13 +02:00
tst-aio64.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-aio.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-bz28213.c Fix The GNU ToolChain Authors copyright notice 2021-12-17 07:59:45 +05:30
tst-cpuclock2-time64.c y2038: Add test coverage 2021-06-15 10:42:11 -03:00
tst-cpuclock2.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-cputimer1.c tests: replace write by xwrite 2023-06-01 12:40:05 -04:00
tst-cputimer2.c tests: replace write by xwrite 2023-06-01 12:40:05 -04:00
tst-cputimer3.c tests: replace write by xwrite 2023-06-01 12:40:05 -04:00
tst-mqueue1-time64.c y2038: Add test coverage 2021-06-15 10:42:11 -03:00
tst-mqueue1.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-mqueue2-time64.c y2038: Add test coverage 2021-06-15 10:42:11 -03:00
tst-mqueue2.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-mqueue3.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-mqueue4-time64.c y2038: Add test coverage 2021-06-15 10:42:11 -03:00
tst-mqueue4.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-mqueue5.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-mqueue6.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-mqueue7.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-mqueue8-time64.c y2038: Add test coverage 2021-06-15 10:42:11 -03:00
tst-mqueue8.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-mqueue9.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-mqueue10-time64.c linux: Only use 64-bit syscall if required for mq_timedreceive 2021-06-22 12:09:52 -03:00
tst-mqueue10.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-mqueue.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-shm-cancel.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-shm.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-timer2.c Don't set unused field in rt/tst-timer2. 2015-02-06 12:30:38 -08:00
tst-timer3.c
tst-timer4-time64.c y2038: Add test coverage 2021-06-15 10:42:11 -03:00
tst-timer4.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-timer5.c
tst-timer-sigmask.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-timer.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
Versions Linux: Cleanups after librt move 2021-06-28 09:51:01 +02:00