Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jul 2019 22:06:59 +0000 (UTC)
From:      "Simon J. Gerraty" <sjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r349924 - in head/lib/libsecureboot: . openpgp
Message-ID:  <201907112206.x6BM6xrI095488@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sjg
Date: Thu Jul 11 22:06:59 2019
New Revision: 349924
URL: https://svnweb.freebsd.org/changeset/base/349924

Log:
  libsecureboot: avoid recusion in ve_trust_init
  
  set our guard value immediately.
  also replace call to ve_trust_init in opgp_sig.c:initialize with
  call to openpgp_trust_init.
  
  Reported by:	mindal@semihalf.com
  Reviewed by:	jhibbits obrien
  MFC after:	1 week

Modified:
  head/lib/libsecureboot/openpgp/opgp_sig.c
  head/lib/libsecureboot/vets.c

Modified: head/lib/libsecureboot/openpgp/opgp_sig.c
==============================================================================
--- head/lib/libsecureboot/openpgp/opgp_sig.c	Thu Jul 11 20:52:39 2019	(r349923)
+++ head/lib/libsecureboot/openpgp/opgp_sig.c	Thu Jul 11 22:06:59 2019	(r349924)
@@ -67,9 +67,7 @@ __FBSDID("$FreeBSD$");
 void
 initialize (void)
 {
-#ifdef _STANDALONE
-    ve_trust_init();
-#endif
+	openpgp_trust_init();
 }
 
 #else

Modified: head/lib/libsecureboot/vets.c
==============================================================================
--- head/lib/libsecureboot/vets.c	Thu Jul 11 20:52:39 2019	(r349923)
+++ head/lib/libsecureboot/vets.c	Thu Jul 11 22:06:59 2019	(r349924)
@@ -345,7 +345,7 @@ ve_trust_init(void)
 
 	if (once >= 0)
 		return (once);
-
+	once = 0;			/* to be sure */
 	ve_utc_set(time(NULL));
 #ifdef BUILD_UTC
 	ve_utc_set(BUILD_UTC);		/* just in case */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907112206.x6BM6xrI095488>