From 0a901ba456d0a0e6dfd0488b3f20f03d9e103d6f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Apr 2004 17:28:57 +0000 Subject: Update. 2004-04-19 Jakub Jelinek * sysdeps/unix/sysv/linux/mq_unlink.c (mq_unlink): Change EPERM into EACCES. * rt/Makefile (tests): Add tst-mqueue9. * rt/tst-mqueue9.c: New test. * rt/tst-mqueue4.c (do_test): Add test for mq_unlink of a too long name component. 2004-04-19 Ulrich Drepper * rt/tst-mqueue7.c (do_test): Make newargv const. --- sysdeps/unix/sysv/linux/mq_unlink.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sysdeps') diff --git a/sysdeps/unix/sysv/linux/mq_unlink.c b/sysdeps/unix/sysv/linux/mq_unlink.c index 8da70ea42b..4344c5d0ef 100644 --- a/sysdeps/unix/sysv/linux/mq_unlink.c +++ b/sysdeps/unix/sysv/linux/mq_unlink.c @@ -31,7 +31,15 @@ mq_unlink (const char *name) __set_errno (EINVAL); return -1; } - return INLINE_SYSCALL (mq_unlink, 1, name + 1); + + int ret = INLINE_SYSCALL (mq_unlink, 1, name + 1); + + /* While unlink can return either EPERM or EACCES, mq_unlink should + return just EACCES. */ + if (ret < 0 && errno == EPERM) + __set_errno (EACCES); + + return ret; } #else -- cgit v1.2.3