MXS-2274 Prevent dynamic creation of object with invalid name

Unfortunately there is not a single place where the name could be
validated, but it has to be done separately for each object type.
This commit is contained in:
Johan Wikman
2019-01-24 12:54:08 +02:00
parent 5afceb1185
commit 7d92717b66
2 changed files with 90 additions and 53 deletions

View File

@ -51,6 +51,8 @@ void config_runtime_error(const char* fmt, ...) mxs_attribute((format (printf, 1
* @param port Network port
* @param protocol Protocol module name
* @param authenticator Authenticator module name
* @param external If true, the name will be validated and the created server
* serialized.
* @return True on success, false if an error occurred
*/
bool runtime_create_server(const char* name,
@ -58,7 +60,7 @@ bool runtime_create_server(const char* name,
const char* port,
const char* protocol,
const char* authenticator,
bool serialize = true);
bool external = true);
/**
* @brief Destroy a server