From 9c85537659158752be6ae8e39f54f76404c6935e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 14 Jun 2019 23:32:34 +0200 Subject: [PATCH] [partition] The VG jobs also use KPMCore - Give them a manager just like other KPMCore-based jobs, so that the privileged helper can be shut off on time. --- src/modules/partition/jobs/CreateVolumeGroupJob.h | 6 ++++-- src/modules/partition/jobs/DeactivateVolumeGroupJob.h | 2 ++ src/modules/partition/jobs/RemoveVolumeGroupJob.h | 2 ++ src/modules/partition/jobs/ResizeVolumeGroupJob.h | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/jobs/CreateVolumeGroupJob.h b/src/modules/partition/jobs/CreateVolumeGroupJob.h index 48da9fba6..dfdf0319f 100644 --- a/src/modules/partition/jobs/CreateVolumeGroupJob.h +++ b/src/modules/partition/jobs/CreateVolumeGroupJob.h @@ -20,11 +20,12 @@ #define CREATEVOLUMEGROUPJOB_H #include "Job.h" - -#include +#include "partition/KPMManager.h" #include +class Partition; + class CreateVolumeGroupJob : public Calamares::Job { Q_OBJECT @@ -40,6 +41,7 @@ public: void undoPreview(); private: + CalamaresUtils::Partition::KPMManager m_kpmcore; QString m_vgName; QVector< const Partition* > m_pvList; qint32 m_peSize; diff --git a/src/modules/partition/jobs/DeactivateVolumeGroupJob.h b/src/modules/partition/jobs/DeactivateVolumeGroupJob.h index 17be7cdef..ff6569b10 100644 --- a/src/modules/partition/jobs/DeactivateVolumeGroupJob.h +++ b/src/modules/partition/jobs/DeactivateVolumeGroupJob.h @@ -20,6 +20,7 @@ #define DEACTIVATEVOLUMEGROUPJOB_H #include "Job.h" +#include "partition/KPMManager.h" class LvmDevice; @@ -35,6 +36,7 @@ public: Calamares::JobResult exec() override; private: + CalamaresUtils::Partition::KPMManager m_kpmcore; LvmDevice* m_device; }; diff --git a/src/modules/partition/jobs/RemoveVolumeGroupJob.h b/src/modules/partition/jobs/RemoveVolumeGroupJob.h index 333f44979..8687eb544 100644 --- a/src/modules/partition/jobs/RemoveVolumeGroupJob.h +++ b/src/modules/partition/jobs/RemoveVolumeGroupJob.h @@ -20,6 +20,7 @@ #define REMOVEVOLUMEGROUPJOB_H #include "Job.h" +#include "partition/KPMManager.h" class LvmDevice; @@ -35,6 +36,7 @@ public: Calamares::JobResult exec() override; private: + CalamaresUtils::Partition::KPMManager m_kpmcore; LvmDevice* m_device; }; diff --git a/src/modules/partition/jobs/ResizeVolumeGroupJob.h b/src/modules/partition/jobs/ResizeVolumeGroupJob.h index bd545bf7b..1519dfa9d 100644 --- a/src/modules/partition/jobs/ResizeVolumeGroupJob.h +++ b/src/modules/partition/jobs/ResizeVolumeGroupJob.h @@ -20,6 +20,7 @@ #define RESIZEVOLUMEGROUPJOB_H #include "Job.h" +#include "partition/KPMManager.h" #include @@ -42,6 +43,7 @@ private: QString targetPartitions() const; private: + CalamaresUtils::Partition::KPMManager m_kpmcore; LvmDevice* m_device; QVector< const Partition* > m_partitionList; };