g_th_barrier = 0;
+ auto enabled = SecurityManager::Log::LogSystemSingleton::Instance().IsLoggingEnabled();
+ if (enabled)
+ SecurityManager::Log::LogSystemSingleton::Instance().Enable(false);
+
// No allocations allowed beyond this point
+
signal_and_wait_for_handlers(own_pid, own_tid);
// here, all TIDs except current one are waiting to start changing attributes
abort();
// No allocations allowed before this point
+
+ if (enabled)
+ SecurityManager::Log::LogSystemSingleton::Instance().Enable(true);
+
g_th_barrier++; // this starts signal handlers to proceed once they wake up - logic in app starts in env where all have changed labels
return m_isLoggingEnabled;
}
+void LogSystem::Enable(bool enable)
+{
+ m_isLoggingEnabled = enable;
+}
+
LogSystem::LogSystem() :
m_isLoggingEnabled(!getenv(SECURITY_MANAGER_LOG_OFF)),
m_tagSet(false)