Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2021 08:55:09 GMT
From:      Wojciech Macek <wma@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 492bf4fdad4d - main - veriexec: Fix veriexec -i's confusion between loaded and locked states
Message-ID:  <202109230855.18N8t9k5099692@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by wma:

URL: https://cgit.FreeBSD.org/src/commit/?id=492bf4fdad4dbb96b82d88e12918e61042f71661

commit 492bf4fdad4dbb96b82d88e12918e61042f71661
Author:     Stephane Rochoy <stephane.rochoy@stormshield.eu>
AuthorDate: 2021-09-23 08:53:56 +0000
Commit:     Wojciech Macek <wma@FreeBSD.org>
CommitDate: 2021-09-23 08:53:56 +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
---
 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;



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