MySQL 8.0.40
Source Code Documentation
|
Definitions for the password validation service. More...
#include "mysql/plugin.h"
Go to the source code of this file.
Classes | |
struct | security_context_service_st |
This service provides functions for plugins and storage engines to manipulate the thread's security context. More... | |
Macros | |
#define | MYSQL_SECURITY_CONTEXT Security_context * |
an opaque class reference hiding the actual security context object. More... | |
Typedefs | |
typedef char | my_svc_bool |
Functions | |
my_svc_bool | thd_get_security_context (MYSQL_THD, MYSQL_SECURITY_CONTEXT *out_ctx) |
Gets the security context for the thread. More... | |
my_svc_bool | thd_set_security_context (MYSQL_THD, MYSQL_SECURITY_CONTEXT in_ctx) |
Sets a new security context for the thread. More... | |
my_svc_bool | security_context_create (MYSQL_SECURITY_CONTEXT *out_ctx) |
Creates a new security context and initializes it with the defaults (no access, no user etc). More... | |
my_svc_bool | security_context_destroy (MYSQL_SECURITY_CONTEXT ctx) |
Deallocates a security context. More... | |
my_svc_bool | security_context_copy (MYSQL_SECURITY_CONTEXT in_ctx, MYSQL_SECURITY_CONTEXT *out_ctx) |
Duplicates a security context. More... | |
my_svc_bool | security_context_lookup (MYSQL_SECURITY_CONTEXT ctx, const char *user, const char *host, const char *ip, const char *db) |
Looks up in the defined user accounts an account based on the user@host[ip] combo supplied and checks if the user has access to the database requested. More... | |
my_svc_bool | security_context_get_option (MYSQL_SECURITY_CONTEXT, const char *name, void *inout_pvalue) |
Reads a named security context attribute and returns its value. More... | |
my_svc_bool | security_context_set_option (MYSQL_SECURITY_CONTEXT, const char *name, void *pvalue) |
Sets a value for a named security context attribute Currently defined names are: More... | |
Variables | |
struct security_context_service_st * | security_context_service |
Definitions for the password validation service.
#define MYSQL_SECURITY_CONTEXT Security_context * |
an opaque class reference hiding the actual security context object.
typedef char my_svc_bool |
my_svc_bool security_context_copy | ( | MYSQL_SECURITY_CONTEXT | in_ctx, |
MYSQL_SECURITY_CONTEXT * | out_ctx | ||
) |
Duplicates a security context.
[in] | in_ctx | The handle of the security context to copy |
[out] | out_ctx | placeholder for the handle of the copied security context |
true | failure |
false | success |
my_svc_bool security_context_create | ( | MYSQL_SECURITY_CONTEXT * | out_ctx | ) |
Creates a new security context and initializes it with the defaults (no access, no user etc).
[out] | out_ctx | placeholder for the newly created security context handle |
true | failure |
false | success |
my_svc_bool security_context_destroy | ( | MYSQL_SECURITY_CONTEXT | ctx | ) |
Deallocates a security context.
[in] | ctx | The handle of the security context to destroy |
true | failure |
false | success |
my_svc_bool security_context_get_option | ( | MYSQL_SECURITY_CONTEXT | ctx, |
const char * | name, | ||
void * | inout_pvalue | ||
) |
Reads a named security context attribute and returns its value.
Currently defined names are:
[in] | ctx | The handle of the security context to read from |
[in] | name | The option name to read |
[out] | inout_pvalue | The value of the option. Type depends on the name. |
true | failure |
false | success |
my_svc_bool security_context_lookup | ( | MYSQL_SECURITY_CONTEXT | ctx, |
const char * | user, | ||
const char * | host, | ||
const char * | ip, | ||
const char * | db | ||
) |
Looks up in the defined user accounts an account based on the user@host[ip] combo supplied and checks if the user has access to the database requested.
The lookup is done in exactly the same way as at login time. The new security context need to checkout additional privileges using the checkout_acl method.
[in] | ctx | The handle of the security context to update |
[in] | user | The user name to look up |
[in] | host | The host name to look up |
[in] | ip | The ip of the incoming connection |
[in] | db | The database to check access to |
true | failure |
false | success |
my_svc_bool security_context_set_option | ( | MYSQL_SECURITY_CONTEXT | ctx, |
const char * | name, | ||
void * | pvalue | ||
) |
Sets a value for a named security context attribute Currently defined names are:
[in] | ctx | The handle of the security context to set into |
[in] | name | The option name to set |
[in] | pvalue | The value of the option. Type depends on the name. |
true | failure |
false | success |
my_svc_bool thd_get_security_context | ( | MYSQL_THD | _thd, |
MYSQL_SECURITY_CONTEXT * | out_ctx | ||
) |
Gets the security context for the thread.
[in] | _thd | The thread to get the context from |
[out] | out_ctx | placeholder for the security context handle |
true | failure |
false | success |
my_svc_bool thd_set_security_context | ( | MYSQL_THD | _thd, |
MYSQL_SECURITY_CONTEXT | in_ctx | ||
) |
Sets a new security context for the thread.
[in] | _thd | The thread to set the context to |
[in] | in_ctx | The handle of the new security context |
true | failure |
false | success |