mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
5.5-merge
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#ifndef MYSQL_PLUGIN_AUTH_INCLUDED
|
||||
/* Copyright (C) 2010 Sergei Golubchik and Monty Program Ab
|
||||
Copyright (C) 2010 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -30,6 +31,13 @@
|
||||
|
||||
#include <mysql/plugin_auth_common.h>
|
||||
|
||||
/* defines for MYSQL_SERVER_AUTH_INFO.password_used */
|
||||
|
||||
#define PASSWORD_USED_NO 0
|
||||
#define PASSWORD_USED_YES 1
|
||||
#define PASSWORD_USED_NO_MENTION 2
|
||||
|
||||
|
||||
/**
|
||||
Provides server plugin access to authentication information
|
||||
*/
|
||||
@ -39,25 +47,60 @@ typedef struct st_mysql_server_auth_info
|
||||
User name as sent by the client and shown in USER().
|
||||
NULL if the client packet with the user name was not received yet.
|
||||
*/
|
||||
const char *user_name;
|
||||
char *user_name;
|
||||
|
||||
/**
|
||||
Length of user_name
|
||||
*/
|
||||
unsigned int user_name_length;
|
||||
|
||||
/**
|
||||
A corresponding column value from the mysql.user table for the
|
||||
matching account name
|
||||
*/
|
||||
const char *auth_string;
|
||||
|
||||
/**
|
||||
Length of auth_string
|
||||
*/
|
||||
unsigned long auth_string_length;
|
||||
|
||||
/**
|
||||
Matching account name as found in the mysql.user table.
|
||||
A plugin can override it with another name that will be
|
||||
used by MySQL for authorization, and shown in CURRENT_USER()
|
||||
*/
|
||||
char authenticated_as[MYSQL_USERNAME_LENGTH+1];
|
||||
|
||||
|
||||
/**
|
||||
The unique user name that was used by the plugin to authenticate.
|
||||
Not used by the server.
|
||||
Available through the @@EXTERNAL_USER variable.
|
||||
*/
|
||||
char external_user[512];
|
||||
|
||||
/**
|
||||
This only affects the "Authentication failed. Password used: %s"
|
||||
error message. If set, %s will be YES, otherwise - NO.
|
||||
error message. has the following values :
|
||||
0 : %s will be NO.
|
||||
1 : %s will be YES.
|
||||
2 : there will be no %s.
|
||||
Set it as appropriate or ignore at will.
|
||||
*/
|
||||
int password_used;
|
||||
|
||||
/**
|
||||
Set to the name of the connected client host, if it can be resolved,
|
||||
or to its IP address otherwise.
|
||||
*/
|
||||
const char *host_or_ip;
|
||||
|
||||
/**
|
||||
Length of host_or_ip
|
||||
*/
|
||||
unsigned int host_or_ip_length;
|
||||
|
||||
} MYSQL_SERVER_AUTH_INFO;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user