mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 22:24:44 +02:00
Impersonate as Icinga user, not root
This requires write permissions for - etc/features-* - etc/*.conf - var/{lib,cache}/icinga2/* Typically permissions are handled by prepare-dirs, or the respective CLI commands are run as root either way. fixes #4947
This commit is contained in:
parent
58ae29acac
commit
7ca8c3ec2f
@ -24,7 +24,7 @@ String ApiSetupCommand::GetShortDescription() const
|
|||||||
|
|
||||||
ImpersonationLevel ApiSetupCommand::GetImpersonationLevel() const
|
ImpersonationLevel ApiSetupCommand::GetImpersonationLevel() const
|
||||||
{
|
{
|
||||||
return ImpersonateRoot;
|
return ImpersonateIcinga;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ApiSetupCommand::GetMaxArguments() const
|
int ApiSetupCommand::GetMaxArguments() const
|
||||||
|
@ -36,7 +36,7 @@ int FeatureDisableCommand::GetMaxArguments() const
|
|||||||
|
|
||||||
ImpersonationLevel FeatureDisableCommand::GetImpersonationLevel() const
|
ImpersonationLevel FeatureDisableCommand::GetImpersonationLevel() const
|
||||||
{
|
{
|
||||||
return ImpersonateRoot;
|
return ImpersonateIcinga;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,7 +36,7 @@ int FeatureEnableCommand::GetMaxArguments() const
|
|||||||
|
|
||||||
ImpersonationLevel FeatureEnableCommand::GetImpersonationLevel() const
|
ImpersonationLevel FeatureEnableCommand::GetImpersonationLevel() const
|
||||||
{
|
{
|
||||||
return ImpersonateRoot;
|
return ImpersonateIcinga;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,7 +71,7 @@ std::vector<String> NodeSetupCommand::GetArgumentSuggestions(const String& argum
|
|||||||
|
|
||||||
ImpersonationLevel NodeSetupCommand::GetImpersonationLevel() const
|
ImpersonationLevel NodeSetupCommand::GetImpersonationLevel() const
|
||||||
{
|
{
|
||||||
return ImpersonateRoot;
|
return ImpersonateIcinga;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,7 +37,7 @@ String NodeWizardCommand::GetShortDescription() const
|
|||||||
|
|
||||||
ImpersonationLevel NodeWizardCommand::GetImpersonationLevel() const
|
ImpersonationLevel NodeWizardCommand::GetImpersonationLevel() const
|
||||||
{
|
{
|
||||||
return ImpersonateRoot;
|
return ImpersonateIcinga;
|
||||||
}
|
}
|
||||||
|
|
||||||
int NodeWizardCommand::GetMaxArguments() const
|
int NodeWizardCommand::GetMaxArguments() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user