Pull up following revision(s) (requested by hannken in ticket #1066): external/cddl/osnet/sys/kern/policy.c: revision 1.9 Glue operation secpolicy_fs_mount() passes wrong arguments to operation kauth_authorize_system(). KAUTH_SYSTEM_MOUNT / KAUTH_REQ_SYSTEM_MOUNT_NEW wants the to be covered vnode and the mount flags, not the mount structure. Fix for PR kern/55602: zpool panic on mounting zfs filesystemdiff -r1.7 -r1.7.4.1 src/external/cddl/osnet/sys/kern/policy.c
(martin)
--- src/external/cddl/osnet/sys/kern/policy.c 2018/05/28 21:05:09 1.7
+++ src/external/cddl/osnet/sys/kern/policy.c 2020/08/28 18:17:13 1.7.4.1
@@ -1,4 +1,4 @@
-/* $NetBSD: policy.c,v 1.7 2018/05/28 21:05:09 chs Exp $ */
+/* $NetBSD: policy.c,v 1.7.4.1 2020/08/28 18:17:13 martin Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -119,7 +119,7 @@
{
return kauth_authorize_system(cred, KAUTH_SYSTEM_MOUNT,
- KAUTH_REQ_SYSTEM_MOUNT_NEW, vfsp, NULL, NULL);
+ KAUTH_REQ_SYSTEM_MOUNT_NEW, mvp, KAUTH_ARG(vfsp->mnt_flag), NULL);
}
int