Use ScriptVariable::Get for "agent wizard" and "agent setup"

fixes #7520
This commit is contained in:
Gunnar Beutner 2014-10-31 10:35:03 +01:00
parent 3fc3f05bb4
commit f8799f0252
2 changed files with 10 additions and 10 deletions

View File

@ -21,11 +21,11 @@
#include "cli/agentutility.hpp"
#include "cli/featureutility.hpp"
#include "cli/pkiutility.hpp"
#include "cli/variableutility.hpp"
#include "base/logger.hpp"
#include "base/console.hpp"
#include "base/application.hpp"
#include "base/tlsutility.hpp"
#include "base/scriptvariable.hpp"
#include <boost/foreach.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/join.hpp>
@ -133,8 +133,8 @@ int AgentSetupCommand::SetupMaster(const boost::program_options::variables_map&
return 1;
}
String user = VariableUtility::GetVariable("RunAsUser");
String group = VariableUtility::GetVariable("RunAsUser");
String user = ScriptVariable::Get("RunAsUser");
String group = ScriptVariable::Get("RunAsGroup");
if (!Utility::SetFileOwnership(pki_path, user, group)) {
Log(LogWarning, "cli")
@ -365,8 +365,8 @@ int AgentSetupCommand::SetupAgent(const boost::program_options::variables_map& v
return 1;
}
String user = VariableUtility::GetVariable("RunAsUser");
String group = VariableUtility::GetVariable("RunAsUser");
String user = ScriptVariable::Get("RunAsUser");
String group = ScriptVariable::Get("RunAsGroup");
if (!Utility::SetFileOwnership(pki_path, user, group)) {
Log(LogWarning, "cli")

View File

@ -21,11 +21,11 @@
#include "cli/agentutility.hpp"
#include "cli/pkiutility.hpp"
#include "cli/featureutility.hpp"
#include "cli/variableutility.hpp"
#include "base/logger.hpp"
#include "base/console.hpp"
#include "base/application.hpp"
#include "base/tlsutility.hpp"
#include "base/scriptvariable.hpp"
#include <boost/foreach.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/replace.hpp>
@ -226,8 +226,8 @@ wizard_master_host:
return 1;
}
String user = VariableUtility::GetVariable("RunAsUser");
String group = VariableUtility::GetVariable("RunAsUser");
String user = ScriptVariable::Get("RunAsUser");
String group = ScriptVariable::Get("RunAsGroup");
if (!Utility::SetFileOwnership(pki_path, user, group)) {
Log(LogWarning, "cli")
@ -429,8 +429,8 @@ wizard_ticket:
return 1;
}
String user = VariableUtility::GetVariable("RunAsUser");
String group = VariableUtility::GetVariable("RunAsUser");
String user = ScriptVariable::Get("RunAsUser");
String group = ScriptVariable::Get("RunAsGroup");
if (!Utility::SetFileOwnership(pki_path, user, group)) {
Log(LogWarning, "cli")