From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>, commit-hurd@gnu.org
Subject: [hurd,commited] hurd: Do not take any flag from the CMSG_DATA
Date: Tue, 25 Apr 2023 00:17:37 +0200 [thread overview]
Message-ID: <20230424221737.2113141-1-samuel.thibault@ens-lyon.org> (raw)
As fixed in 0822e3552a78 ("hurd: Don't pass FD_CLOEXEC in CMSG_DATA"),
senders currently don't have any flag to pass. We shouldn't blindly take
random flags that senders could be erroneously giving us.
---
sysdeps/mach/hurd/recvmsg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sysdeps/mach/hurd/recvmsg.c b/sysdeps/mach/hurd/recvmsg.c
index e06b0fe3ba..4254dca627 100644
--- a/sysdeps/mach/hurd/recvmsg.c
+++ b/sysdeps/mach/hurd/recvmsg.c
@@ -201,8 +201,10 @@ __libc_recvmsg (int fd, struct msghdr *message, int flags)
err = reauthenticate (ports[i], &newports[newfds]);
if (err)
goto cleanup;
+ /* We do not currently take any flag from the sender. */
fds[j] = opened_fds[newfds] = _hurd_intern_fd (newports[newfds],
- fds[j] | fd_flags,
+ (fds[j] & 0)
+ | fd_flags,
0);
if (fds[j] == -1)
{
--
2.39.2
reply other threads:[~2023-04-24 22:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230424221737.2113141-1-samuel.thibault@ens-lyon.org \
--to=samuel.thibault@ens-lyon.org \
--cc=commit-hurd@gnu.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).