summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uvideo.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2019-10-06 16:24:15 +0000
committerBob Beck <beck@cvs.openbsd.org>2019-10-06 16:24:15 +0000
commit16dfc514a3ca3b914b76f97826ea09921f7f4f78 (patch)
treebe762da10d6da036a1713feca9b9ea86dc2a9dde /sys/dev/usb/uvideo.c
parent6b90b4ebe4788a3c98914d2e059f0e581939ecfb (diff)
Fix vn_open to require an op of 0, and 0 or KERNELPATH only as flags.
sweep tree to correct NDIINT op and flags ahead of time. document the requirement. This allows KERNELPATH to be used to bypass unveil for crash dumps with nosuidcoredump=2 or 3 ok visa@ deraadt@ florian@
Diffstat (limited to 'sys/dev/usb/uvideo.c')
-rw-r--r--sys/dev/usb/uvideo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c
index a3652d1b164..e5ca9f68c66 100644
--- a/sys/dev/usb/uvideo.c
+++ b/sys/dev/usb/uvideo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvideo.c,v 1.203 2019/08/07 11:16:02 patrick Exp $ */
+/* $OpenBSD: uvideo.c,v 1.204 2019/10/06 16:24:14 beck Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
@@ -2885,7 +2885,7 @@ uvideo_debug_file_open(struct uvideo_softc *sc)
char name[] = "/tmp/uvideo.mjpeg";
int error;
- NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, p);
+ NDINIT(&nd, 0, 0, UIO_SYSSPACE, name, p);
error = vn_open(&nd, O_CREAT | FWRITE | O_NOFOLLOW, S_IRUSR | S_IWUSR);
if (error) {
DPRINTF(1, "%s: %s: can't create debug file %s!\n",