std::unique_ptr<INTERNAL_ENGINE> engine;
KeyManager::data mountKey;
-void stopSystemdUserSessions() {
- std::vector<std::string> userSessionServices;
+void stopKnownSystemdServices() {
+ std::vector<std::string> knownSystemdServices;
dbus::Connection& systemDBus = dbus::Connection::getSystem();
dbus::VariantIterator iter;
}
std::string service(dataStr[0]);
- if (service.compare(0, 5, "user@") == 0) {
- userSessionServices.push_back(service);
+ if (service.compare(0, 5, "user@") == 0 ||
+ service == "tlm.service" ||
+ service == "resourced.service") {
+ knownSystemdServices.push_back(service);
}
}
- for (const std::string& service : userSessionServices) {
+ for (const std::string& service : knownSystemdServices) {
INFO(SINK, "Stop service - " + service);
systemDBus.methodcall("org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
KeyManager::data MasterKey = keyManager.getMasterKey(pwData);
auto encryptWorker = [MasterKey, options, this]() {
try {
- INFO(SINK, "Close all user sessions...");
- stopSystemdUserSessions();
+ INFO(SINK, "Close all known systemd services that might be using internal storage...");
+ stopKnownSystemdServices();
INFO(SINK, "Close all processes using internal storage...");
stopDependedSystemdServices();
INFO(SINK, "Umount internal storage...");
KeyManager::data MasterKey = keyManager.getMasterKey(pwData);
auto decryptWorker = [MasterKey, this]() {
try {
- INFO(SINK, "Close all user sessions...");
- stopSystemdUserSessions();
+ INFO(SINK, "Close all known systemd services that might be using internal storage...");
+ stopKnownSystemdServices();
INFO(SINK, "Close all processes using internal storage...");
stopDependedSystemdServices();
INFO(SINK, "Umount internal storage...");