1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dmsetup: fix measure handling

Previous patch f853a1bc7a enabled
ima measurement unconditionally for every status call,
but it needs to be set only for 'dmsetup measure' command.
This commit is contained in:
Zdenek Kabelac 2021-09-27 18:26:35 +02:00
parent e62a71f3dd
commit a3352f08f6

View File

@ -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))