diff options
Diffstat (limited to 'net/dhcpcd/files/patch-src_privsep.c')
| -rw-r--r-- | net/dhcpcd/files/patch-src_privsep.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/net/dhcpcd/files/patch-src_privsep.c b/net/dhcpcd/files/patch-src_privsep.c new file mode 100644 index 000000000000..b9d22affe381 --- /dev/null +++ b/net/dhcpcd/files/patch-src_privsep.c @@ -0,0 +1,24 @@ +--- src/privsep.c.orig 2025-06-01 18:40:28 UTC ++++ src/privsep.c +@@ -934,7 +934,9 @@ ps_sendpsmmsg(struct dhcpcd_ctx *ctx, int fd, + } else + iovlen = 1; + +- len = writev(fd, iov, iovlen); ++ len = sendmsg(fd, ++ &(struct msghdr){ .msg_iov = iov, .msg_iovlen = iovlen }, MSG_EOR); ++ + if (len == -1) { + if (ctx->options & DHCPCD_FORKED && + !(ctx->options & DHCPCD_PRIVSEPROOT)) +@@ -1063,7 +1065,9 @@ ps_sendcmdmsg(int fd, uint16_t cmd, const struct msghd + psm.ps_namelen + psm.ps_controllen + psm.ps_datalen + cmsg_padlen; + if (psm.ps_datalen != 0) + memcpy(p, msg->msg_iov[0].iov_base, psm.ps_datalen); +- return writev(fd, iov, __arraycount(iov)); ++ return sendmsg(fd, ++ &(struct msghdr){ .msg_iov = iov, .msg_iovlen = __arraycount(iov) }, ++ MSG_EOR); + + nobufs: + errno = ENOBUFS; |
