Added optional stripping of escape characters from database names when laoding users.

This commit is contained in:
Markus Makela
2015-02-20 21:07:12 +02:00
parent 120e65d4b8
commit fc969acc73
8 changed files with 95 additions and 7 deletions

View File

@ -822,6 +822,23 @@ serviceAuthAllServers(SERVICE *service, int action)
return 1;
}
/**
* Whether to strip escape characters from the name of the database the client
* is connecting to.
* @param service Service to configure
* @param action 0 for disabled, 1 for enabled
* @return 1 if successful, 0 on error
*/
int serviceStripDbEsc(SERVICE* service, int action)
{
if (action != 0 && action != 1)
return 0;
service->strip_db_esc = action;
return 1;
}
/**
* Trim whitespace from the from an rear of a string
*