mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-4307 Support at least 48 utf8 characters in username in server and PAM
Extend plugin auth api to support up to 512 bytes in the user names. Use the API versioning to support old auth plugins too!
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <mysql/plugin.h>
|
||||
|
||||
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0100
|
||||
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0200
|
||||
|
||||
#include <mysql/plugin_auth_common.h>
|
||||
|
||||
@@ -78,7 +78,7 @@ typedef struct st_mysql_server_auth_info
|
||||
Not used by the server.
|
||||
Available through the @@EXTERNAL_USER variable.
|
||||
*/
|
||||
char external_user[512];
|
||||
char external_user[MYSQL_USERNAME_LENGTH+1];
|
||||
|
||||
/**
|
||||
This only affects the "Authentication failed. Password used: %s"
|
||||
|
@@ -266,8 +266,8 @@ typedef struct st_mysql_server_auth_info
|
||||
unsigned int user_name_length;
|
||||
const char *auth_string;
|
||||
unsigned long auth_string_length;
|
||||
char authenticated_as[48 +1];
|
||||
char external_user[512];
|
||||
char authenticated_as[512 +1];
|
||||
char external_user[512 +1];
|
||||
int password_used;
|
||||
const char *host_or_ip;
|
||||
unsigned int host_or_ip_length;
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#define MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
|
||||
|
||||
/** the max allowed length for a user name */
|
||||
#define MYSQL_USERNAME_LENGTH 48
|
||||
#define MYSQL_USERNAME_LENGTH 512
|
||||
|
||||
/**
|
||||
return values of the plugin authenticate_user() method.
|
||||
|
Reference in New Issue
Block a user