Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161064800
D22135.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D22135.diff
View Options
Index: head/lib/libsecureboot/verify_file.c
===================================================================
--- head/lib/libsecureboot/verify_file.c
+++ head/lib/libsecureboot/verify_file.c
@@ -292,6 +292,28 @@
}
}
+#ifndef VE_DEBUG_LEVEL
+# define VE_DEBUG_LEVEL 0
+#endif
+
+static int
+getenv_int(const char *var, int def)
+{
+ const char *cp;
+ char *ep;
+ long val;
+
+ val = def;
+ cp = getenv(var);
+ if (cp && *cp) {
+ val = strtol(cp, &ep, 0);
+ if ((ep && *ep) || val != (int)val) {
+ val = def;
+ }
+ }
+ return (int)val;
+}
+
/**
* @brief verify an open file
*
@@ -331,9 +353,8 @@
if (verifying < 0) {
verifying = ve_trust_init();
-#ifdef VE_DEBUG_LEVEL
- ve_debug_set(VE_DEBUG_LEVEL);
-#endif
+ verbose = getenv_int("VE_VERBOSE", VE_VERBOSE_DEFAULT);
+ ve_debug_set(getenv_int("VE_DEBUG_LEVEL", VE_DEBUG_LEVEL));
/* initialize ve_status with default result */
rc = verifying ? VE_NOT_CHECKED : VE_NOT_VERIFYING;
ve_status_set(0, rc);
Index: head/lib/libsecureboot/vets.c
===================================================================
--- head/lib/libsecureboot/vets.c
+++ head/lib/libsecureboot/vets.c
@@ -240,7 +240,7 @@
static size_t
ve_anchors_add(br_x509_certificate *xcs, size_t num, anchor_list *anchors,
- char *anchors_name)
+ const char *anchors_name)
{
br_x509_trust_anchor ta;
size_t u;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 1, 6:42 AM (21 h, 27 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34546521
Default Alt Text
D22135.diff (1 KB)
Attached To
Mode
D22135: Initialize verbosity and debug level from env
Attached
Detach File
Event Timeline
Log In to Comment