-/* $OpenBSD: unfdpassfail.c,v 1.1 2021/12/09 23:26:48 mvs Exp $ */
+/* $OpenBSD: unfdpassfail.c,v 1.2 2021/12/15 21:25:55 bluhm Exp $ */
/*
* Copyright (c) 2021 Vitaliy Makkoveev <mvs@openbsd.org>
err(1, "socketpair");
if ((fd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0)
err(1, "open");
-
+
iov_buf = 0;
iov.iov_base = &iov_buf;
iov.iov_len = sizeof(iov_buf);
-/* $OpenBSD: ungc.c,v 1.1 2021/12/09 17:42:59 mvs Exp $ */
+/* $OpenBSD: ungc.c,v 1.2 2021/12/15 21:25:55 bluhm Exp $ */
/*
* Copyright (c) 2021 Vitaliy Makkoveev <mvs@openbsd.org>
while (1) {
if (socketpair(AF_UNIX, SOCK_STREAM|O_NONBLOCK, 0, s) < 0)
err(1, "socketpair");
-
+
iov_buf = 0;
iov.iov_base = &iov_buf;
iov.iov_len = sizeof(iov_buf);
-/* $OpenBSD: unsopassgc.c,v 1.1 2021/12/14 16:12:48 mvs Exp $ */
+/* $OpenBSD: unsopassgc.c,v 1.2 2021/12/15 21:25:55 bluhm Exp $ */
/*
* Copyright (c) 2021 Vitaliy Makkoveev <mvs@openbsd.org>
/*
* Try to beak unix(4) sockets garbage collector and make it to clean
* `so_rcv' buffer of alive socket. Successful breakage should produce
- * kernel panic.
+ * kernel panic.
*/
#include <sys/types.h>
} *thr_pass_args;
static struct thr_gc_arg {
- int passfd;
+ int passfd;
} *thr_gc_arg;
static void *
if(!(cmsgh = CMSG_FIRSTHDR(&msgh)))
therrx(1, "bad cmsg header");
if(cmsgh->cmsg_level != SOL_SOCKET)
- therrx(1, "bad cmsg level");
+ therrx(1, "bad cmsg level");
if(cmsgh->cmsg_type != SCM_RIGHTS)
- therrx(1, "bad cmsg type");
+ therrx(1, "bad cmsg type");
if(cmsgh->cmsg_len != CMSG_LEN(sizeof(fd) * PASSFD_NUM))
- therrx(1, "bad cmsg length");
+ therrx(1, "bad cmsg length");
for (i = 0; i < PASSFD_NUM; ++i) {
fd = *((int *)CMSG_DATA(cmsgh) + i);