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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0d103a6f
Commit
0d103a6f
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
Add a check if user_to is valid to handle_roles_mappings_table
parent
fb3e3b94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
sql/sql_acl.cc
sql/sql_acl.cc
+10
-4
No files found.
sql/sql_acl.cc
View file @
0d103a6f
...
...
@@ -6251,7 +6251,7 @@ static int handle_roles_mappings_table(TABLE *table, bool drop,
not mandatory.
In this case perform a quick lookup in acl_roles to see if
it is already there. If it is not found, th
a
n the user fields are updated,
it is already there. If it is not found, th
e
n the user fields are updated,
otherwise the role field gets updated.
*/
DBUG_ENTER
(
"handle_roles_mappings_table"
);
...
...
@@ -6266,9 +6266,15 @@ static int handle_roles_mappings_table(TABLE *table, bool drop,
Field
*
role_field
=
table
->
field
[
2
];
if
(
!
user_from
->
host
.
length
&&
find_acl_role
(
user_from
->
user
.
str
))
{
is_role
=
TRUE
;
}
/*
Check if user_to is a valid role. If it is not a valid role, the change
fails.
*/
if
(
is_role
&&
user_to
&&
user_to
->
host
.
length
)
DBUG_RETURN
(
-
1
);
table
->
use_all_columns
();
if
((
error
=
table
->
file
->
ha_rnd_init
(
1
)))
...
...
@@ -6334,7 +6340,7 @@ static int handle_roles_mappings_table(TABLE *table, bool drop,
}
table
->
file
->
ha_rnd_end
();
}
/* TODO */
end:
DBUG_RETURN
(
result
);
}
/*
...
...
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