int appInstallSmackRules(app_inst_req &req, InstallHelper &ih);
- int appSetupNamespace(const Credentials &creds, const Smack::Label &appProcessLabel,
+ int appSetupNamespace(const Credentials &creds, uid_t appUid, const Smack::Label &appProcessLabel,
const std::vector<std::string> &privPathsVector, std::vector<bool> &privPathsStatusVector);
int appUninstallInitialChecks(const Credentials &creds,
return SECURITY_MANAGER_SUCCESS;
}
-int ServiceImpl::appSetupNamespace(const Credentials &creds, const std::string &appProcessLabel,
+int ServiceImpl::appSetupNamespace(const Credentials &creds, uid_t appUid, const std::string &appProcessLabel,
const std::vector<std::string> &privPathsVector, std::vector<bool> &privPathsStatusVector)
{
int ret;
}
try {
- const std::string uidStr = std::to_string(creds.uid);
+ const std::string uidStr = std::to_string(appUid);
const std::string appsDir = MountNS::getUserAppsMountPointsPath(creds.uid);
const std::string appDir = MountNS::getUserAppMountPointPath(creds.uid, appProcessLabel);
const std::string appFile = MountNS::getUserAppServiceMountPointPath(creds.uid, appProcessLabel, creds.pid);
LogWarning("getForbiddenAndAllowedGroups returned: " << ret);
return ret != SECURITY_MANAGER_SUCCESS ? ret
- : appSetupNamespace(creds, id.label, privPathsVector, privPathsStatusVector);
+ : appSetupNamespace(creds, id.uid, id.label, privPathsVector, privPathsStatusVector);
} catch (const FS::Exception::Base &e) {
LogError("Filesystem error: " << e.DumpToString());
return SECURITY_MANAGER_ERROR_SERVER_ERROR;