Merge "Hide sensitive information from fm-manager logs"
This commit is contained in:
commit
6091d6fd9e
@ -78,11 +78,16 @@ void fm_get_config_paramters() {
|
|||||||
}
|
}
|
||||||
if (key.compare(FM_SQL_CONNECTION) != 0) {
|
if (key.compare(FM_SQL_CONNECTION) != 0) {
|
||||||
// Don't log sql_connection, as it has a password
|
// Don't log sql_connection, as it has a password
|
||||||
|
if (key.compare(FM_CONF_PASSWORD) == 0 || key.compare(FM_CONF_CONNECTION) == 0) {
|
||||||
|
// Don't log password values
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
FM_INFO_LOG("Config key (%s), value (%s)",
|
FM_INFO_LOG("Config key (%s), value (%s)",
|
||||||
key.c_str(), value.c_str());
|
key.c_str(), value.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool fm_get_config_key(std::string &key, std::string &val) {
|
bool fm_get_config_key(std::string &key, std::string &val) {
|
||||||
configParams::iterator it;
|
configParams::iterator it;
|
||||||
|
@ -92,6 +92,8 @@
|
|||||||
#define FM_REGION_NAME "region_name"
|
#define FM_REGION_NAME "region_name"
|
||||||
#define FM_DEBUG_FLAG "debug"
|
#define FM_DEBUG_FLAG "debug"
|
||||||
#define FM_STRING_TRUE "True"
|
#define FM_STRING_TRUE "True"
|
||||||
|
#define FM_CONF_PASSWORD "password"
|
||||||
|
#define FM_CONF_CONNECTION "connection"
|
||||||
|
|
||||||
#define CLEAR_ALL_REASON_TEXT "System initiated hierarchical alarm clear"
|
#define CLEAR_ALL_REASON_TEXT "System initiated hierarchical alarm clear"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user