Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a5b89398
Commit
a5b89398
authored
Oct 17, 2013
by
Vicențiu Ciorbaru
Committed by
Sergei Golubchik
Oct 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added initial_role_grants variable to ACL_USER
parent
df16e759
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
sql/sql_acl.cc
sql/sql_acl.cc
+11
-0
No files found.
sql/sql_acl.cc
View file @
a5b89398
...
...
@@ -231,6 +231,15 @@ class ACL_USER :public ACL_ACCESS
instance of the class represents a role.
*/
DYNAMIC_ARRAY
role_grants
;
/*
In case of granting a role to a role, the access bits are merged together
via a bit OR operation and placed in the ACL_USER::access field.
When rebuilding role_grants via the rebuild_role_grant function,
the ACL_USER::access field needs to be reset aswell. The field
initial_role_access holds the initial grants present in the table row.
*/
ulong
initial_role_access
;
ACL_USER
*
copy
(
MEM_ROOT
*
root
)
{
...
...
@@ -1130,6 +1139,8 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
DBUG_PRINT
(
"info"
,
(
"Found role %s"
,
user
.
user
.
str
));
ACL_USER
*
entry
=
user
.
copy
(
&
mem
);
entry
->
role_grants
=
user
.
role_grants
;
/* set initial role access the same as the table row privileges */
entry
->
initial_role_access
=
entry
->
access
;
my_hash_insert
(
&
acl_roles
,
(
uchar
*
)
entry
);
HASH_SEARCH_STATE
t
;
entry
=
(
ACL_USER
*
)
my_hash_first
(
&
acl_roles
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment