MySQL Authentication with wildcards in hosts

MySQL Authentication:

Added support for wildcards in hosts:

a.b.c.%
a.b.%.%
a.%.%.%
This commit is contained in:
MassimilianoPinto
2014-10-03 17:26:41 +02:00
parent 48489234be
commit dbe078f358
6 changed files with 260 additions and 153 deletions

View File

@ -32,6 +32,7 @@
* 25/06/13 Mark Riddoch Initial implementation
* 25/02/13 Massimiliano Pinto Added users table refresh rate default values
* 28/02/14 Massimiliano Pinto Added MySQL user and host data structure
* 03/10/14 Massimiliano Pinto Added netmask to MySQL user and host data structure
*
* @endverbatim
*/
@ -52,11 +53,13 @@
typedef struct mysql_user_host_key {
char *user;
struct sockaddr_in ipv4;
int netmask;
} MYSQL_USER_HOST;
extern int load_mysql_users(SERVICE *service);
extern int reload_mysql_users(SERVICE *service);
extern int mysql_users_add(USERS *users, MYSQL_USER_HOST *key, char *auth);
extern int add_mysql_users_with_host_ipv4(USERS *users, char *user, char *host, char *passwd);
extern USERS *mysql_users_alloc();
extern char *mysql_users_fetch(USERS *users, MYSQL_USER_HOST *key);
extern int replace_mysql_users(SERVICE *service);