-/* $OpenBSD: kern_sig.c,v 1.307 2023/06/28 08:23:25 claudio Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.308 2023/07/10 22:54:40 deraadt Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
}
/* incrash should be 0 or KERNELPATH only */
- NDINIT(&nd, 0, incrash, UIO_SYSSPACE, name, p);
+ NDINIT(&nd, 0, BYPASSUNVEIL | incrash, UIO_SYSSPACE, name, p);
error = vn_open(&nd, O_CREAT | FWRITE | O_NOFOLLOW | O_NONBLOCK,
S_IRUSR | S_IWUSR);
-/* $OpenBSD: vfs_vnops.c,v 1.121 2022/08/14 01:58:28 jsg Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.122 2023/07/10 22:54:40 deraadt Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
int error;
/*
- * The only valid flag to pass in here from NDINIT is
- * KERNELPATH, This function will override the nameiop based
- * on the fmode and cmode flags, So validate that our caller
- * has not set other flags or operations in the nameidata
+ * The only valid flags to pass in here from NDINIT are
+ * KERNELPATH or BYPASSUNVEIL. This function will override the
+ * nameiop based on the fmode and cmode flags, so validate that
+ * our caller has not set other flags or operations in the nameidata
* structure.
*/
- KASSERT(ndp->ni_cnd.cn_flags == 0 || ndp->ni_cnd.cn_flags == KERNELPATH);
+ KASSERT((ndp->ni_cnd.cn_flags & ~(KERNELPATH|BYPASSUNVEIL)) == 0);
KASSERT(ndp->ni_cnd.cn_nameiop == 0);
if ((fmode & (FREAD|FWRITE)) == 0)