#include <string.h>
#include <sys/types.h>
#include <atomic>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_selectors.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/properties.hpp>
#include <boost/pending/property.hpp>
#include <list>
#include <memory>
#include <string>
#include <unordered_map>
#include "lex_string.h"
#include "lf.h"
#include "m_ctype.h"
#include "map_helpers.h"
#include "mf_wcomp.h"
#include "my_alloc.h"
#include "my_compiler.h"
#include "my_inttypes.h"
#include "my_sharedlib.h"
#include "my_sys.h"
#include "mysql/components/services/bits/mysql_mutex_bits.h"
#include "mysql/mysql_lex_string.h"
#include "mysql_com.h"
#include "mysql_time.h"
#include "sql/auth/auth_common.h"
#include "sql/auth/auth_internal.h"
#include "sql/auth/partial_revokes.h"
#include "sql/malloc_allocator.h"
#include "sql/psi_memory_key.h"
#include "sql/sql_connect.h"
#include "violite.h"
Go to the source code of this file.
|
namespace | boost |
| Tag dispatch for custom Role_properties.
|
|
|
typedef Acl_cache_allocator< ACL_USER * > | Acl_user_ptr_allocator |
|
typedef std::list< ACL_USER *, Acl_user_ptr_allocator > | Acl_user_ptr_list |
|
typedef boost::property< boost::vertex_acl_user_t, ACL_USER, boost::property< boost::vertex_name_t, std::string > > | Role_properties |
| Custom vertex properties used in Granted_roles_graph TODO ACL_USER contains too much information. More...
|
|
typedef boost::property< boost::edge_capacity_t, int > | Role_edge_properties |
|
typedef boost::adjacency_list< boost::setS, boost::vecS, boost::bidirectionalS, Role_properties, Role_edge_properties > | Granted_roles_graph |
| A graph of all users/roles privilege inheritance. More...
|
|
typedef boost::graph_traits< Granted_roles_graph >::vertex_descriptor | Role_vertex_descriptor |
| The data type of a vertex in the Granted_roles_graph. More...
|
|
typedef boost::graph_traits< Granted_roles_graph >::edge_descriptor | Role_edge_descriptor |
| The data type of an edge in the Granted_roles_graph. More...
|
|
typedef std::unordered_map< std::string, Role_vertex_descriptor > | Role_index_map |
| The datatype of the map between authids and graph vertex descriptors. More...
|
|
using | degree_s_t = boost::graph_traits< Granted_roles_graph >::degree_size_type |
| The type used for the number of edges incident to a vertex in the graph. More...
|
|
using | out_edge_itr_t = boost::graph_traits< Granted_roles_graph >::out_edge_iterator |
| The type for the iterator returned by out_edges(). More...
|
|
using | in_edge_itr_t = boost::graph_traits< Granted_roles_graph >::in_edge_iterator |
| The type for the iterator returned by in_edges(). More...
|
|
typedef LF_HASH | Acl_cache_internal |
|
|
Acl_user_ptr_list * | cached_acl_users_for_name (const char *name) |
| Fetch the list of ACL_USERs which share name or have no name. More...
|
|
void | rebuild_cached_acl_users_for_name (void) |
| Build the lists of ACL_USERs which share name or have no name. More...
|
|
template<class T > |
T * | name_hash_search (const malloc_unordered_multimap< std::string, unique_ptr_destroy_only< T > > &name_hash, const char *host, const char *ip, const char *db, const char *user, const char *tname, bool exact, bool name_tolower) |
|
GRANT_NAME * | routine_hash_search (const char *host, const char *ip, const char *db, const char *user, const char *tname, bool proc, bool exact) |
|
GRANT_TABLE * | table_hash_search (const char *host, const char *ip, const char *db, const char *user, const char *tname, bool exact) |
|
GRANT_COLUMN * | column_hash_search (GRANT_TABLE *t, const char *cname, size_t length) |
|
| boost::BOOST_INSTALL_PROPERTY (vertex, acl_user) |
|
Acl_cache * | get_global_acl_cache () |
|
◆ NUM_CREDENTIALS
#define NUM_CREDENTIALS 2 |
◆ PRIMARY_CRED
◆ SECOND_CRED
◆ Acl_cache_internal
◆ Acl_user_ptr_allocator
◆ Acl_user_ptr_list
◆ degree_s_t
The type used for the number of edges incident to a vertex in the graph.
◆ Granted_roles_graph
A graph of all users/roles privilege inheritance.
◆ in_edge_itr_t
The type for the iterator returned by in_edges().
◆ out_edge_itr_t
The type for the iterator returned by out_edges().
◆ Role_edge_descriptor
The data type of an edge in the Granted_roles_graph.
◆ Role_edge_properties
◆ Role_index_map
The datatype of the map between authids and graph vertex descriptors.
◆ Role_properties
Custom vertex properties used in Granted_roles_graph TODO ACL_USER contains too much information.
We only need global access, username and hostname. If this was a POD we don't have to hold the same mutex as ACL_USER.
◆ Role_vertex_descriptor
The data type of a vertex in the Granted_roles_graph.
◆ Acl_cache_lock_mode
Enum for specifying lock type over Acl cache.
Enumerator |
---|
READ_MODE | |
WRITE_MODE | |
◆ cached_acl_users_for_name()
Fetch the list of ACL_USERs which share name or have no name.
- Parameters
-
[in] | name | User entry to be searched |
- Returns
- List of users that share same name
◆ column_hash_search()
◆ get_global_acl_cache()
◆ name_hash_search()
◆ rebuild_cached_acl_users_for_name()
void rebuild_cached_acl_users_for_name |
( |
void |
| ) |
|
Build the lists of ACL_USERs which share name or have no name.
All accounts with same name will be chained so that they can be retrieved by a single lookup. These entries are sorted using ACL_compare to make sure that most specific account is picked up first. Anonymous user is added to each chain.
◆ routine_hash_search()
GRANT_NAME * routine_hash_search |
( |
const char * |
host, |
|
|
const char * |
ip, |
|
|
const char * |
db, |
|
|
const char * |
user, |
|
|
const char * |
tname, |
|
|
bool |
proc, |
|
|
bool |
exact |
|
) |
| |
|
inline |
◆ table_hash_search()
GRANT_TABLE * table_hash_search |
( |
const char * |
host, |
|
|
const char * |
ip, |
|
|
const char * |
db, |
|
|
const char * |
user, |
|
|
const char * |
tname, |
|
|
bool |
exact |
|
) |
| |
|
inline |
◆ acl_check_hosts
◆ acl_dbs
◆ ACL_PREALLOC_SIZE
const size_t ACL_PREALLOC_SIZE = 10U |
◆ acl_proxy_users
◆ acl_restrictions
◆ acl_users
◆ acl_wild_hosts
◆ allow_all_hosts
◆ column_priv_hash
◆ files_charset_info
◆ func_priv_hash
◆ global_acl_memory
◆ grant_version
◆ memex
◆ proc_priv_hash