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
7d4bfba9
Commit
7d4bfba9
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 error message for invalid role
parent
0254c9a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+6
-0
sql/sql_acl.cc
sql/sql_acl.cc
+5
-0
No files found.
sql/share/errmsg-utf8.txt
View file @
7d4bfba9
...
@@ -6563,3 +6563,9 @@ ER_NO_SUCH_QUERY
...
@@ -6563,3 +6563,9 @@ ER_NO_SUCH_QUERY
eng "Unknown query id: %lld"
eng "Unknown query id: %lld"
ger "Unbekannte Abfrage-ID: %lld"
ger "Unbekannte Abfrage-ID: %lld"
rus "Неизвестный номер запроса: %lld"
rus "Неизвестный номер запроса: %lld"
ER_INVALID_ROLE
eng "The role '%s' has not been granted or is invalid."
rum "Rolul '%s' este invalid sau nu a fost acordat."
ER_INVALID_CURRENT_USER
eng "The current user is invalid."
rum "Utilizatorul curent este invalid."
sql/sql_acl.cc
View file @
7d4bfba9
...
@@ -1689,7 +1689,10 @@ bool acl_setrole(THD *thd, char *rolename)
...
@@ -1689,7 +1689,10 @@ bool acl_setrole(THD *thd, char *rolename)
acl_user
=
find_acl_user
(
thd
->
security_ctx
->
host
,
thd
->
security_ctx
->
user
,
acl_user
=
find_acl_user
(
thd
->
security_ctx
->
host
,
thd
->
security_ctx
->
user
,
FALSE
);
FALSE
);
if
(
acl_user
==
NULL
)
if
(
acl_user
==
NULL
)
{
my_error
(
ER_INVALID_CURRENT_USER
,
MYF
(
0
),
rolename
);
result
=
-
1
;
result
=
-
1
;
}
else
else
thd
->
security_ctx
->
master_access
=
acl_user
->
access
;
thd
->
security_ctx
->
master_access
=
acl_user
->
access
;
...
@@ -1697,6 +1700,7 @@ bool acl_setrole(THD *thd, char *rolename)
...
@@ -1697,6 +1700,7 @@ bool acl_setrole(THD *thd, char *rolename)
}
}
if
(
role
==
NULL
)
{
if
(
role
==
NULL
)
{
my_error
(
ER_INVALID_ROLE
,
MYF
(
0
),
rolename
);
result
=
-
1
;
result
=
-
1
;
goto
end
;
goto
end
;
}
}
...
@@ -1719,6 +1723,7 @@ bool acl_setrole(THD *thd, char *rolename)
...
@@ -1719,6 +1723,7 @@ bool acl_setrole(THD *thd, char *rolename)
if
(
!
is_granted
)
if
(
!
is_granted
)
{
{
my_error
(
ER_INVALID_ROLE
,
MYF
(
0
),
rolename
);
result
=
1
;
result
=
1
;
goto
end
;
goto
end
;
}
}
...
...
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