Merge branch '2.3' into 2.4.5

This commit is contained in:
Markus Mäkelä
2019-12-19 10:03:35 +02:00
5 changed files with 18 additions and 9 deletions

View File

@ -8,10 +8,7 @@ if [ "$box_type" == "RPM" ] ; then
# Build can be executed to check if it is possible to build # Build can be executed to check if it is possible to build
# and to run install and upgrade tests # and to run install and upgrade tests
# with thre real RHEL, but we use CentOS packages for production # with thre real RHEL, but we use CentOS packages for production
if [[ "$platform" != "rhel" || ( "$platform" == "rhel" && "$platform_version" == "8" ) ]]; then if [[ "$platform" != "rhel" ]]; then
if [[ "$platform" == "rhel" && "$platform_version" == "8" ]]; then
export platform="centos"
fi
export arch=`ssh $sshopt "arch"` export arch=`ssh $sshopt "arch"`
. ${script_dir}/generate_build_info_path.sh . ${script_dir}/generate_build_info_path.sh

View File

@ -80,6 +80,7 @@ enum mxs_module_param_type
MXS_MODULE_PARAM_BOOL, /**< Boolean value */ MXS_MODULE_PARAM_BOOL, /**< Boolean value */
MXS_MODULE_PARAM_STRING, /**< String value */ MXS_MODULE_PARAM_STRING, /**< String value */
MXS_MODULE_PARAM_QUOTEDSTRING, /**< String enclosed in '"':s */ MXS_MODULE_PARAM_QUOTEDSTRING, /**< String enclosed in '"':s */
MXS_MODULE_PARAM_PASSWORD, /**< Password value that is masked in all output */
MXS_MODULE_PARAM_ENUM, /**< Enumeration of string values */ MXS_MODULE_PARAM_ENUM, /**< Enumeration of string values */
MXS_MODULE_PARAM_PATH, /**< Path to a file or a directory */ MXS_MODULE_PARAM_PATH, /**< Path to a file or a directory */
MXS_MODULE_PARAM_SERVICE, /**< Service name */ MXS_MODULE_PARAM_SERVICE, /**< Service name */
@ -245,6 +246,9 @@ static inline const char* mxs_module_param_type_to_string(enum mxs_module_param_
case MXS_MODULE_PARAM_STRING: case MXS_MODULE_PARAM_STRING:
return "string"; return "string";
case MXS_MODULE_PARAM_PASSWORD:
return "password string";
case MXS_MODULE_PARAM_QUOTEDSTRING: case MXS_MODULE_PARAM_QUOTEDSTRING:
return "quoted string"; return "quoted string";

View File

@ -63,7 +63,7 @@ describe("Create/Destroy Commands", function() {
res.data.relationships.servers.data.length.should.equal(1) res.data.relationships.servers.data.length.should.equal(1)
res.data.relationships.servers.data[0].id.should.equal("server4") res.data.relationships.servers.data[0].id.should.equal("server4")
res.data.attributes.parameters.user.should.equal("maxuser") res.data.attributes.parameters.user.should.equal("maxuser")
res.data.attributes.parameters.password.should.equal("maxpwd") res.data.attributes.parameters.password.should.equal("*****")
}) })
}) })

View File

@ -317,7 +317,7 @@ const MXS_MODULE_PARAM config_service_params[] =
}, },
{ {
CN_PASSWORD, // Not mandatory due to RCAP_TYPE_NO_AUTH CN_PASSWORD, // Not mandatory due to RCAP_TYPE_NO_AUTH
MXS_MODULE_PARAM_STRING MXS_MODULE_PARAM_PASSWORD
}, },
{ {
CN_ENABLE_ROOT_USER, CN_ENABLE_ROOT_USER,
@ -515,7 +515,7 @@ const MXS_MODULE_PARAM config_monitor_params[] =
}, },
{ {
CN_PASSWORD, CN_PASSWORD,
MXS_MODULE_PARAM_STRING, MXS_MODULE_PARAM_PASSWORD,
NULL, NULL,
MXS_MODULE_OPT_REQUIRED MXS_MODULE_OPT_REQUIRED
}, },
@ -644,7 +644,7 @@ const MXS_MODULE_PARAM config_server_params[] =
}, },
{ {
CN_MONITORPW, CN_MONITORPW,
MXS_MODULE_PARAM_STRING MXS_MODULE_PARAM_PASSWORD
}, },
{ {
CN_PERSISTPOOLMAX, CN_PERSISTPOOLMAX,
@ -3145,6 +3145,9 @@ const char* param_type_to_str(const MXS_MODULE_PARAM* params, const char* name)
case MXS_MODULE_PARAM_STRING: case MXS_MODULE_PARAM_STRING:
return "a string"; return "a string";
case MXS_MODULE_PARAM_PASSWORD:
return "a password string";
case MXS_MODULE_PARAM_QUOTEDSTRING: case MXS_MODULE_PARAM_QUOTEDSTRING:
return "a quoted string"; return "a quoted string";
@ -3791,6 +3794,10 @@ json_t* param_value_to_json(const MXS_MODULE_PARAM* param_info, const string& na
rval = json_boolean(config_truth_value(value.c_str())); rval = json_boolean(config_truth_value(value.c_str()));
break; break;
case MXS_MODULE_PARAM_PASSWORD:
rval = json_string("*****");
break;
default: default:
rval = json_string(value.c_str()); rval = json_string(value.c_str());
break; break;
@ -4468,6 +4475,7 @@ bool config_param_is_valid(const MXS_MODULE_PARAM* params,
break; break;
case MXS_MODULE_PARAM_STRING: case MXS_MODULE_PARAM_STRING:
case MXS_MODULE_PARAM_PASSWORD:
if (*value) if (*value)
{ {
valid = true; valid = true;

View File

@ -1015,7 +1015,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE()
CN_REPLICATION_USER, MXS_MODULE_PARAM_STRING CN_REPLICATION_USER, MXS_MODULE_PARAM_STRING
}, },
{ {
CN_REPLICATION_PASSWORD, MXS_MODULE_PARAM_STRING CN_REPLICATION_PASSWORD, MXS_MODULE_PARAM_PASSWORD
}, },
{ {
CN_REPLICATION_MASTER_SSL, MXS_MODULE_PARAM_BOOL, "false" CN_REPLICATION_MASTER_SSL, MXS_MODULE_PARAM_BOOL, "false"