All of lore.kernel.org
 help / color / mirror / Atom feed
* main - dmsetup: fix measure handling
@ 2021-09-27 16:57 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2021-09-27 16:57 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a3352f08f687e1db4bb20a2f1b1c52bb888b9d97
Commit:        a3352f08f687e1db4bb20a2f1b1c52bb888b9d97
Parent:        e62a71f3dd97795ea64b2f3948dd8629c2dac8b8
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Mon Sep 27 18:26:35 2021 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Mon Sep 27 18:45:25 2021 +0200

dmsetup: fix measure handling

Previous patch f853a1bc7afdebb44aeb8c1167e8784d155cad84 enabled
ima measurement unconditionally for every status call,
but it needs to be set only for 'dmsetup measure' command.
---
 libdm/dm-tools/dmsetup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libdm/dm-tools/dmsetup.c b/libdm/dm-tools/dmsetup.c
index 4641c1f18..07b6cca8a 100644
--- a/libdm/dm-tools/dmsetup.c
+++ b/libdm/dm-tools/dmsetup.c
@@ -2446,7 +2446,8 @@ static int _status(CMD_ARGS)
 	if (_switches[NOFLUSH_ARG] && !dm_task_no_flush(dmt))
 		goto_out;
 
-	if (!dm_task_ima_measurement(dmt))
+	if (!strcmp(cmd->name, "measure") &&
+	    !dm_task_ima_measurement(dmt))
 		goto_out;
 
 	if (!_task_run(dmt))



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-27 16:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-27 16:57 main - dmsetup: fix measure handling Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.