diff --git a/icinga-app/icinga.cpp b/icinga-app/icinga.cpp index 454257709..2365cb4be 100644 --- a/icinga-app/icinga.cpp +++ b/icinga-app/icinga.cpp @@ -384,10 +384,10 @@ int Main(void) Logger::DisableTimestamp(true); #ifndef _WIN32 if (command->GetImpersonationLevel() == ImpersonateRoot) { - /*if (getuid() != 0) { + if (getuid() != 0) { Log(LogCritical, "cli", "This command must be run as root."); return 0; - }*/ + } } else if (command && command->GetImpersonationLevel() == ImpersonateIcinga) { String group = Application::GetRunAsGroup(); String user = Application::GetRunAsUser();