Make sure user cache directory exists
The cache directory needs to be created by the authenticator itself.
This commit is contained in:
@ -557,16 +557,19 @@ static int mysql_auth_load_users(SERV_LISTENER *port)
|
|||||||
MXS_ERROR("[%s] Unable to load users for listener %s listening at %s:%d.", service->name,
|
MXS_ERROR("[%s] Unable to load users for listener %s listening at %s:%d.", service->name,
|
||||||
port->name, port->address ? port->address : "0.0.0.0", port->port);
|
port->name, port->address ? port->address : "0.0.0.0", port->port);
|
||||||
|
|
||||||
strcat(path, DBUSERS_FILE);
|
if (mxs_mkdir_all(path, S_IRWXU))
|
||||||
|
{
|
||||||
|
strcat(path, DBUSERS_FILE);
|
||||||
|
|
||||||
if (!dbusers_load(instance->handle, path))
|
if (!dbusers_load(instance->handle, path))
|
||||||
{
|
{
|
||||||
MXS_ERROR("[%s] Failed to load cached users from '%s'.", service->name, path);
|
MXS_ERROR("[%s] Failed to load cached users from '%s'.", service->name, path);
|
||||||
rc = MXS_AUTH_LOADUSERS_ERROR;
|
rc = MXS_AUTH_LOADUSERS_ERROR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MXS_WARNING("[%s] Using cached credential information from '%s'.", service->name, path);
|
MXS_WARNING("[%s] Using cached credential information from '%s'.", service->name, path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (instance->inject_service_user)
|
if (instance->inject_service_user)
|
||||||
|
Reference in New Issue
Block a user