Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/secmodel/securelevel Pull up following revision(s) (r...



details:   https://anonhg.NetBSD.org/src/rev/e22205724c43
branches:  netbsd-9
changeset: 937396:e22205724c43
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Aug 17 11:27:33 2020 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #1053):

        sys/secmodel/securelevel/secmodel_securelevel.c: revision 1.36

Accept ioctl(RNDADDDATA) estimates at securelevel 1 (but not 2).
securelevel=1 is supposed to be a reasonable default for normal
computers.  This got in the way of ever getting entropy from a seed
on a machine with no HWRNG -- e.g., from another machine, or by
making the executive decision that what has been sampled is good
enough and issuing `head -c 32 < /dev/urandom > /dev/random'.

diffstat:

 sys/secmodel/securelevel/secmodel_securelevel.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 2f27ab506b08 -r e22205724c43 sys/secmodel/securelevel/secmodel_securelevel.c
--- a/sys/secmodel/securelevel/secmodel_securelevel.c   Mon Aug 17 11:22:45 2020 +0000
+++ b/sys/secmodel/securelevel/secmodel_securelevel.c   Mon Aug 17 11:27:33 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_securelevel.c,v 1.32 2018/07/15 05:16:45 maxv Exp $ */
+/* $NetBSD: secmodel_securelevel.c,v 1.32.4.1 2020/08/17 11:27:33 martin Exp $ */
 /*-
  * Copyright (c) 2006 Elad Efrat <elad%NetBSD.org@localhost>
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: secmodel_securelevel.c,v 1.32 2018/07/15 05:16:45 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: secmodel_securelevel.c,v 1.32.4.1 2020/08/17 11:27:33 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_insecure.h"
@@ -596,7 +596,7 @@
                break;
 
        case KAUTH_DEVICE_RND_ADDDATA_ESTIMATE:
-               if (securelevel > 0)
+               if (securelevel > 1)
                        result = KAUTH_RESULT_DENY;
                break;
 



Home | Main Index | Thread Index | Old Index