Module Name: src Committed By: hannken Date: Fri Aug 28 16:13:48 UTC 2020
Modified Files: src/external/cddl/osnet/sys/kern: policy.c Log Message: 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 filesystem To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/cddl/osnet/sys/kern/policy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/cddl/osnet/sys/kern/policy.c diff -u src/external/cddl/osnet/sys/kern/policy.c:1.8 src/external/cddl/osnet/sys/kern/policy.c:1.9 --- src/external/cddl/osnet/sys/kern/policy.c:1.8 Sat May 16 18:31:46 2020 +++ src/external/cddl/osnet/sys/kern/policy.c Fri Aug 28 16:13:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: policy.c,v 1.8 2020/05/16 18:31:46 christos Exp $ */ +/* $NetBSD: policy.c,v 1.9 2020/08/28 16:13:48 hannken Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -119,7 +119,7 @@ secpolicy_fs_mount(cred_t *cred, vnode_t { 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