MySQL 9.3.0
Source Code Documentation
security_context_wrapper.h
Go to the documentation of this file.
1/* Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef HAVE_SECURITY_CONTEXT_WRAPPER_H
25#define HAVE_SECURITY_CONTEXT_WRAPPER_H
26
30
31namespace connection_control {
33 public:
36 const char *get_proxy_user();
37 const char *get_priv_user();
38 const char *get_priv_host();
39 const char *get_user();
40 const char *get_host();
41 const char *get_ip();
42
43 private:
44 const char *get_property(const char *property);
46 bool m_valid = false;
47};
48} // namespace connection_control
49#endif // !HAVE_SECURITY_CONTEXT_WRAPPER_H
#define MYSQL_THD
Definition: backup_page_tracker.h:38
Definition: security_context_wrapper.h:32
const char * get_ip()
Get connected ip information from security context.
Definition: security_context_wrapper.cc:111
Security_context_wrapper(MYSQL_THD thd)
Security_context_wrapper constructor.
Definition: security_context_wrapper.cc:37
const char * get_property(const char *property)
Get value for given property from security context.
Definition: security_context_wrapper.cc:54
bool m_valid
Definition: security_context_wrapper.h:46
const char * get_priv_user()
Get priv user information from security context.
Definition: security_context_wrapper.cc:78
Security_context_handle m_sctx
Definition: security_context_wrapper.h:45
const char * get_priv_host()
Get priv host information from security context.
Definition: security_context_wrapper.cc:84
const char * get_user()
Get connected user information from security context.
Definition: security_context_wrapper.cc:90
const char * get_proxy_user()
Get proxy user information from security context.
Definition: security_context_wrapper.cc:72
const char * get_host()
Get connected host information from security context.
Definition: security_context_wrapper.cc:96
struct Security_context_handle_imp * Security_context_handle
Definition: dynamic_privilege.h:29
Definition: connection_control.h:70
Plugin service that provides access to the parser and some operations on the parse tree.