Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/sys/kern Glue operation secpolicy_fs_mou...



details:   https://anonhg.NetBSD.org/src/rev/946d84f470c9
branches:  trunk
changeset: 943207:946d84f470c9
user:      hannken <hannken%NetBSD.org@localhost>
date:      Fri Aug 28 16:13:48 2020 +0000

description:
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

diffstat:

 external/cddl/osnet/sys/kern/policy.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 3f8927f6d7c8 -r 946d84f470c9 external/cddl/osnet/sys/kern/policy.c
--- a/external/cddl/osnet/sys/kern/policy.c     Fri Aug 28 16:07:49 2020 +0000
+++ b/external/cddl/osnet/sys/kern/policy.c     Fri Aug 28 16:13:48 2020 +0000
@@ -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 @@
 {
 
        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



Home | Main Index | Thread Index | Old Index