Source-Changes-HG archive

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

[src/trunk]: src/sys/secmodel/suser Make it clear that only KAUTH_MACHDEP_SVS...



details:   https://anonhg.NetBSD.org/src/rev/429557c4cd0f
branches:  trunk
changeset: 972130:429557c4cd0f
user:      alnsn <alnsn%NetBSD.org@localhost>
date:      Sat May 16 19:12:38 2020 +0000

description:
Make it clear that only KAUTH_MACHDEP_SVS_DISABLE is deprecated.

diffstat:

 sys/secmodel/suser/secmodel_suser.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 54ac7fb29aad -r 429557c4cd0f sys/secmodel/suser/secmodel_suser.c
--- a/sys/secmodel/suser/secmodel_suser.c       Sat May 16 19:08:20 2020 +0000
+++ b/sys/secmodel/suser/secmodel_suser.c       Sat May 16 19:12:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_suser.c,v 1.53 2020/05/11 19:36:40 alnsn Exp $ */
+/* $NetBSD: secmodel_suser.c,v 1.54 2020/05/16 19:12:38 alnsn Exp $ */
 /*-
  * Copyright (c) 2006 Elad Efrat <elad%NetBSD.org@localhost>
  * All rights reserved.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.53 2020/05/11 19:36:40 alnsn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: secmodel_suser.c,v 1.54 2020/05/16 19:12:38 alnsn Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -846,6 +846,10 @@
        case KAUTH_MACHDEP_NVRAM:
        case KAUTH_MACHDEP_UNMANAGEDMEM:
        case KAUTH_MACHDEP_PXG:
+               if (isroot)
+                       result = KAUTH_RESULT_ALLOW;
+               break;
+
        case KAUTH_MACHDEP_SVS_DISABLE:
                /* Deprecated. */
                if (isroot)



Home | Main Index | Thread Index | Old Index