summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2023-07-06 07:47:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2023-07-06 07:47:05 +0000
commitfd5dcbef682e0ff2117febd1af9a63bf9a9203fe (patch)
tree3dabc9e264bfb8f7bcdf7b377d885cabe0756f0c
parent3726bc8101eafb9f0efe5d2f2081d37a233546b7 (diff)
sysctl(2) is now sysctl(3), in particular it does not access name[0] in
userland. This test should have been written with a signal handler to be accurate.. Anyways, stop using syscall() to work around that ok kettenis
-rw-r--r--regress/sys/copy/copy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regress/sys/copy/copy.c b/regress/sys/copy/copy.c
index 2f04b11e9c3..ab85153086f 100644
--- a/regress/sys/copy/copy.c
+++ b/regress/sys/copy/copy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: copy.c,v 1.6 2021/12/13 16:56:49 deraadt Exp $ */
+/* $OpenBSD: copy.c,v 1.7 2023/07/06 07:47:04 deraadt Exp $ */
/* Written by Ted Unangst 2004 Public Domain */
@@ -63,9 +63,9 @@ main(int argc, char **argv)
/* printf("goodbuf %p badbuf %p\n", goodbuf, badbuf); */
/* copyin */
- if (!syscall(202, 0, 6, &kinfo, &kinfosize, 0, 0))
+ if (!sysctl(0, 6, &kinfo, &kinfosize, 0, 0))
fail("copyin did not fail on 0 buf\n");
- if (!syscall(202, badbuf, 6, &kinfo, &kinfosize, 0, 0))
+ if (!sysctl(badbuf, 6, &kinfo, &kinfosize, 0, 0))
fail("copyin did not fail on bad buf\n");
/* copyout */