summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/rsync.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:28:55 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:28:55 +0000
commit94b4ab6477f7a9800d77232563fa206c1ee8a907 (patch)
tree435b6b5461b61f0d45317fe18b5e6719c7f9f439 /usr.sbin/rpki-client/rsync.c
parentd4c259af8b5a77d599c11a2f0611ab1cfb868044 (diff)
Adjust rpki-client to the new msgbuf_write api
OK tb@
Diffstat (limited to 'usr.sbin/rpki-client/rsync.c')
-rw-r--r--usr.sbin/rpki-client/rsync.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/rpki-client/rsync.c b/usr.sbin/rpki-client/rsync.c
index 6fa439a4b57..8ef188c7504 100644
--- a/usr.sbin/rpki-client/rsync.c
+++ b/usr.sbin/rpki-client/rsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsync.c,v 1.53 2024/11/21 13:12:19 claudio Exp $ */
+/* $OpenBSD: rsync.c,v 1.54 2024/11/21 13:28:54 claudio Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -234,9 +234,8 @@ proc_rsync(char *prog, char *bind_addr, int fd)
if (pledge("stdio rpath proc exec unveil", NULL) == -1)
err(1, "pledge");
- pfd.fd = fd;
msgbuf_init(&msgq);
- msgq.fd = fd;
+ pfd.fd = fd;
/*
* Unveil the command we want to run.
@@ -355,7 +354,7 @@ proc_rsync(char *prog, char *bind_addr, int fd)
}
if (pfd.revents & POLLOUT) {
- if (msgbuf_write(&msgq) == -1) {
+ if (msgbuf_write(fd, &msgq) == -1) {
if (errno == EPIPE)
errx(1, "write: connection closed");
else