git: e900898601b4 - stable/13 - veriexec: Fix veriexec -i's confusion between loaded and locked states
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Apr 2023 05:14:45 UTC
The branch stable/13 has been updated by gbe:
URL: https://cgit.FreeBSD.org/src/commit/?id=e900898601b4937176222a3642c7d2db38a11712
commit e900898601b4937176222a3642c7d2db38a11712
Author: Stephane Rochoy <stephane.rochoy@stormshield.eu>
AuthorDate: 2021-09-23 08:53:56 +0000
Commit: Gordon Bergling <gbe@FreeBSD.org>
CommitDate: 2023-04-14 05:14:07 +0000
veriexec: Fix veriexec -i's confusion between loaded and locked states
Calling veriexec -i locked return the state of loaded and vice-versa.
Differential revision: https://reviews.freebsd.org/D30952
Reviewed by: sjg,imp
Obtained from: Stromshield
(cherry picked from commit 492bf4fdad4dbb96b82d88e12918e61042f71661)
---
sbin/veriexec/veriexec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sbin/veriexec/veriexec.c b/sbin/veriexec/veriexec.c
index c1facbd4a9fa..1eb7a9af7d6f 100644
--- a/sbin/veriexec/veriexec.c
+++ b/sbin/veriexec/veriexec.c
@@ -91,7 +91,7 @@ main(int argc, char *argv[])
ctl = VERIEXEC_STATE_ENFORCE;
break;
case 'l': /* loaded/locked */
- ctl = (strncmp(optarg, "lock", 4)) ?
+ ctl = (strncmp(optarg, "lock", 4) == 0) ?
VERIEXEC_STATE_LOCKED :
VERIEXEC_STATE_LOADED;
break;