return "User::Pkg::" + getPkgId();
}
- virtual ~AppInstallHelper() {
- // TODO we should also remove trusted dirs created with custom params
+ void removePaths() {
for (const auto &dir : m_dirs) {
rmdir(dir.c_str());
}
+ m_dirs.clear();
for (const auto &file : m_files) {
unlink(file.c_str());
}
+ m_files.clear();
+ }
+
+ virtual ~AppInstallHelper() {
+ // TODO we should also remove trusted dirs created with custom params
+ removePaths();
}
protected:
check_target_access(owner.generatePkgLabel(), target.generateAppLabel(), pathLabel1);
check_path_label(sharedPath, pathLabel1);
+ owner.removePaths();
Api::uninstall(ownerReq);
check_system_access(pathLabel1, false);
check_target_access(owner.generatePkgLabel(), target.generateAppLabel(), pathLabel1);
check_path_label(sharedPath, pathLabel1);
+ owner.removePaths();
Api::uninstall(ownerReq);
check_system_access(pathLabel1, false);
check_target_access(owner.generatePkgLabel(), target.generateAppLabel(), pathLabel1);
check_path_label(sharedPath, pathLabel1);
+ owner.removePaths();
Api::uninstall(ownerReq);
check_system_access(pathLabel1, false);
check_target_access(owner.generatePkgLabel(), target2.generateAppLabel(), pathLabel);
check_path_label(sharedPath, pathLabel);
+ owner.removePaths();
Api::uninstall(ownerReq);
check_system_access(pathLabel, false);
check_owner_access(owner.generateAppLabel(), pathLabel,false);