24#ifndef MYSQL_SERVICE_SECURITY_CONTEXT
25#define MYSQL_SERVICE_SECURITY_CONTEXT
40#define MYSQL_SECURITY_CONTEXT Security_context *
42#define MYSQL_SECURITY_CONTEXT void *
109 const char *ip,
const char *db);
123 const char *
name,
void *pvalue);
126#ifdef MYSQL_DYNAMIC_PLUGIN
128#define thd_get_security_context(_THD, _CTX) \
129 security_context_service->thd_get_security_context(_THD, _CTX)
130#define thd_set_security_context(_THD, _CTX) \
131 security_context_service->thd_set_security_context(_THD, _CTX)
133#define security_context_create(_CTX) \
134 security_context_service->security_context_create(_CTX)
135#define security_context_destroy(_CTX) \
136 security_context_service->security_context_destroy(_CTX)
137#define security_context_copy(_CTX1, _CTX2) \
138 security_context_service->security_context_copy(_CTX1, _CTX2)
140#define security_context_lookup(_CTX, _U, _H, _IP, _DB) \
141 security_context_service->security_context_lookup(_CTX, _U, _H, _IP, _DB)
143#define security_context_get_option(_SEC_CTX, _NAME, _VALUE) \
144 security_context_service->security_context_get_option(_SEC_CTX, _NAME, _VALUE)
145#define security_context_set_option(_SEC_CTX, _NAME, _VALUE) \
146 security_context_service->security_context_set_option(_SEC_CTX, _NAME, _VALUE)
159 const char *ip,
const char *db);
162 const char *
name,
void *inout_pvalue);
164 const char *
name,
void *pvalue);
#define MYSQL_THD
Definition: backup_page_tracker.h:38
A set of THD members describing the current authenticated user.
Definition: sql_security_ctx.h:54
struct security_context_service_st * security_context_service
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
my_svc_bool thd_get_security_context(MYSQL_THD, MYSQL_SECURITY_CONTEXT *out_ctx)
Gets the security context for the thread.
Definition: service_security_context.cc:55
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:
Definition: service_security_context.cc:304
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...
Definition: service_security_context.cc:177
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).
Definition: service_security_context.cc:109
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.
Definition: service_security_context.cc:239
char my_svc_bool
Definition: service_security_context.h:44
my_svc_bool security_context_copy(MYSQL_SECURITY_CONTEXT in_ctx, MYSQL_SECURITY_CONTEXT *out_ctx)
Duplicates a security context.
Definition: service_security_context.cc:146
#define MYSQL_SECURITY_CONTEXT
an opaque class reference hiding the actual security context object.
Definition: service_security_context.h:40
my_svc_bool thd_set_security_context(MYSQL_THD, MYSQL_SECURITY_CONTEXT in_ctx)
Sets a new security context for the thread.
Definition: service_security_context.cc:80
my_svc_bool security_context_destroy(MYSQL_SECURITY_CONTEXT ctx)
Deallocates a security context.
Definition: service_security_context.cc:127
case opt name
Definition: sslopt-case.h:29
This service provides functions for plugins and storage engines to manipulate the thread's security c...
Definition: service_security_context.h:72
my_svc_bool(* security_context_destroy)(MYSQL_SECURITY_CONTEXT)
Creates a new security context.
Definition: service_security_context.h:95
my_svc_bool(* thd_get_security_context)(MYSQL_THD, MYSQL_SECURITY_CONTEXT *out_ctx)
Retrieves a handle to the current security context for a thread.
Definition: service_security_context.h:77
my_svc_bool(* security_context_create)(MYSQL_SECURITY_CONTEXT *out_ctx)
Creates a new security context.
Definition: service_security_context.h:90
my_svc_bool(* security_context_copy)(MYSQL_SECURITY_CONTEXT in_ctx, MYSQL_SECURITY_CONTEXT *out_ctx)
Creates a copy of a security context.
Definition: service_security_context.h:100
my_svc_bool(* thd_set_security_context)(MYSQL_THD, MYSQL_SECURITY_CONTEXT in_ctx)
Sets a new security context for a thread.
Definition: service_security_context.h:83
my_svc_bool(* security_context_lookup)(MYSQL_SECURITY_CONTEXT ctx, const char *user, const char *host, const char *ip, const char *db)
Fills in a security context with the attributes of a user account.
Definition: service_security_context.h:107
my_svc_bool(* security_context_set_option)(MYSQL_SECURITY_CONTEXT, const char *name, void *pvalue)
Sets a new value for a named attribute of a security context.
Definition: service_security_context.h:122
my_svc_bool(* security_context_get_option)(MYSQL_SECURITY_CONTEXT, const char *name, void *inout_pvalue)
Retrieves the value for a named attribute of a security context.
Definition: service_security_context.h:115