diff options
author | Mert Tumer <mert.tumer@collabora.com> | 2021-11-15 16:47:53 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-11-15 22:07:53 +0100 |
commit | 78ccaa845ef3d9ebd7e7c1820690fa33bf72a09c (patch) | |
tree | f62202edc1cfa4d6b7fb036a2cbe321884bff5a4 /tools | |
parent | comments: show resolved comments on start (diff) | |
download | online-78ccaa845ef3d9ebd7e7c1820690fa33bf72a09c.tar.gz online-78ccaa845ef3d9ebd7e7c1820690fa33bf72a09c.zip |
rename: loolconfig -> coolconfig
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ied23cb46a668f754931fc125745b674b546a0195
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Config.cpp | 30 | ||||
-rw-r--r-- | tools/WebSocketDump.cpp | 6 |
2 files changed, 18 insertions, 18 deletions
diff --git a/tools/Config.cpp b/tools/Config.cpp index 6f5ec62ab7..bae7f225ce 100644 --- a/tools/Config.cpp +++ b/tools/Config.cpp @@ -37,10 +37,10 @@ using Poco::Util::XMLConfiguration; #define MIN_PWD_ITERATIONS 1000 #define MIN_PWD_HASH_LENGTH 20 -class LoolConfig final: public XMLConfiguration +class CoolConfig final: public XMLConfiguration { public: - LoolConfig() + CoolConfig() {} }; @@ -66,7 +66,7 @@ class Config: public Application // Display help information on the console void displayHelp(); - LoolConfig _loolConfig; + CoolConfig _coolConfig; AdminConfig _adminConfig; @@ -101,7 +101,7 @@ void Config::displayHelp() HelpFormatter helpFormatter(options()); helpFormatter.setCommand(commandName()); helpFormatter.setUsage("COMMAND [OPTIONS]"); - helpFormatter.setHeader("loolconfig - Configuration tool for Collabora Online.\n" + helpFormatter.setHeader("coolconfig - Configuration tool for Collabora Online.\n" "\n" "Some options make sense only with a specific command.\n\n" "Options:"); @@ -224,7 +224,7 @@ int Config::main(const std::vector<std::string>& args) int retval = EX_OK; bool changed = false; - _loolConfig.load(ConfigFile); + _coolConfig.load(ConfigFile); if (args[0] == "set-admin-password") { @@ -289,10 +289,10 @@ int Config::main(const std::vector<std::string>& args) std::stringstream pwdConfigValue("pbkdf2.sha512.", std::ios_base::in | std::ios_base::out | std::ios_base::ate); pwdConfigValue << std::to_string(_adminConfig.getPwdIterations()) << '.'; pwdConfigValue << saltHash << '.' << passwordHash; - _loolConfig.setString("admin_console.username", adminUser); - _loolConfig.setString("admin_console.secure_password[@desc]", + _coolConfig.setString("admin_console.username", adminUser); + _coolConfig.setString("admin_console.secure_password[@desc]", "Salt and password hash combination generated using PBKDF2 with SHA512 digest."); - _loolConfig.setString("admin_console.secure_password", pwdConfigValue.str()); + _coolConfig.setString("admin_console.secure_password", pwdConfigValue.str()); changed = true; #else @@ -324,7 +324,7 @@ int Config::main(const std::vector<std::string>& args) else { std::cerr << "Valid for " << validDays << " days - setting to config\n"; - _loolConfig.setString("support_key", supportKeyString); + _coolConfig.setString("support_key", supportKeyString); changed = true; } } @@ -332,7 +332,7 @@ int Config::main(const std::vector<std::string>& args) else { std::cerr << "Removing empty support key\n"; - _loolConfig.remove("support_key"); + _coolConfig.remove("support_key"); changed = true; } } @@ -343,12 +343,12 @@ int Config::main(const std::vector<std::string>& args) { // args[1] = key // args[2] = value - if (_loolConfig.has(args[1])) + if (_coolConfig.has(args[1])) { - const std::string val = _loolConfig.getString(args[1]); + const std::string val = _coolConfig.getString(args[1]); std::cout << "Previous value found in config file: \"" << val << '"' << std::endl; std::cout << "Changing value to: \"" << args[2] << '"' << std::endl; - _loolConfig.setString(args[1], args[2]); + _coolConfig.setString(args[1], args[2]); changed = true; } else @@ -374,7 +374,7 @@ int Config::main(const std::vector<std::string>& args) { if (!AnonymizationSaltProvided) { - const std::string val = _loolConfig.getString("logging.anonymize.anonymization_salt"); + const std::string val = _coolConfig.getString("logging.anonymize.anonymization_salt"); AnonymizationSalt = std::stoull(val); std::cout << "Anonymization Salt: [" << AnonymizationSalt << "]." << std::endl; } @@ -393,7 +393,7 @@ int Config::main(const std::vector<std::string>& args) if (changed) { std::cout << "Saving configuration to : " << ConfigFile << " ..." << std::endl; - _loolConfig.save(ConfigFile); + _coolConfig.save(ConfigFile); std::cout << "Saved" << std::endl; } diff --git a/tools/WebSocketDump.cpp b/tools/WebSocketDump.cpp index bb9d170c5a..1edc754e0e 100644 --- a/tools/WebSocketDump.cpp +++ b/tools/WebSocketDump.cpp @@ -219,10 +219,10 @@ namespace Util } } -class LoolConfig final: public Poco::Util::XMLConfiguration +class CoolConfig final: public Poco::Util::XMLConfiguration { public: - LoolConfig() + CoolConfig() {} }; @@ -238,7 +238,7 @@ int main (int argc, char **argv) Log::initialize("WebSocketDump", "trace", true, false, std::map<std::string, std::string>()); - LoolConfig config; + CoolConfig config; config.load("loolwsd.xml"); // read the port & ssl support |