int ret = poll(pollFds, 2, -1);
if (ret == -1) {
- if (errno != EINTR)
- LogError("Unexpected error returned by poll: " << GetErrnoString(errno));
+ Assert(errno == EINTR);
continue;
}
#include <mount-monitor.h>
+#include <dpl/assert.h>
#include <dpl/errno_string.h>
#include <dpl/log/log.h>
#include <utils.h>
int ret = poll(pollFds, 2, -1);
if (ret == -1) {
- if (errno != EINTR)
- //LogError("Unexpected error returned by poll: " << GetErrnoString(errno));
+ Assert(errno == EINTR);
continue;
}
// Update mount namespaces
// TODO: Don't update all users, apps and privileges, filter by policyEntries
- m_NSMountLogic.check();
+ if (!m_NSMountLogic.check())
+ return SECURITY_MANAGER_ERROR_MOUNT_ERROR;
} catch (const CynaraException::Base &e) {
LogError("Error while updating Cynara rules: " << e.DumpToString());
return SECURITY_MANAGER_ERROR_SERVER_ERROR;
continue;
for (auto &privilegePath : mapIter->second)
- applyPrivilegePath(allowed, privilegePath);
+ if (SECURITY_MANAGER_SUCCESS != applyPrivilegePath(allowed, privilegePath))
+ status = -1;
}
} catch (...) {
status = -1;