{
LogDebug("security_manager_prepare_app_candidate() called");
- if (!smack_simple_check()) {
- LogWarning("Running in no-smack mode, exiting earlier without setting up namespaces");
- return SECURITY_MANAGER_SUCCESS;
- }
-
auto dir = opendir("/proc/self/task");
if (!dir) {
LogError("Unable to get number of threads");
return ret;
}
- if (smack_simple_check()) {
- ret = security_manager_setup_namespace_internal(privilegePathMap, pkgName,
- prepareAppFlags & PREPARE_APP_SHARED_RO_FLAG, privPathsStatusVector, processId.label, subsession_id);
- if (ret != SECURITY_MANAGER_SUCCESS) {
- LogError("Unable to setup namespace for application " << app_name);
- return ret;
- }
+ ret = security_manager_setup_namespace_internal(privilegePathMap, pkgName,
+ prepareAppFlags & PREPARE_APP_SHARED_RO_FLAG, privPathsStatusVector, processId.label, subsession_id);
+ if (ret != SECURITY_MANAGER_SUCCESS) {
+ LogError("Unable to setup namespace for application " << app_name);
+ return ret;
}
ret = security_manager_sync_threads_internal(processId);
return SECURITY_MANAGER_ERROR_INPUT_PARAM;
}
- if (!smack_simple_check()) {
- LogWarning("Running in no-smack mode, not cleaning namespaces");
- return SECURITY_MANAGER_SUCCESS;
- }
-
ClientRequest request(SecurityModuleCall::APP_CLEAN_NAMESPACE);
return request.send(std::string(app_name), uid, pid).getStatus();
});
LogWarning("getForbiddenAndAllowedGroups returned: " << ret);
- if (!smack_simple_check()) {
- LogWarning("Running in no-smack mode, exiting without setting up namespaces");
- return ret;
- }
-
return ret != SECURITY_MANAGER_SUCCESS ? ret
: appSetupNamespace(creds, id.label, privPathsVector, privPathsStatusVector);
} catch (const FS::Exception::Base &e) {