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
c399932a
Commit
c399932a
authored
Oct 28, 2005
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixe of typos, comments & layout
parent
6143c654
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
12 deletions
+15
-12
sql/item_func.cc
sql/item_func.cc
+1
-1
sql/sql_acl.cc
sql/sql_acl.cc
+8
-2
sql/sql_parse.cc
sql/sql_parse.cc
+3
-2
sql/sql_view.cc
sql/sql_view.cc
+0
-2
sql/table.cc
sql/table.cc
+1
-3
sql/table.h
sql/table.h
+2
-2
No files found.
sql/item_func.cc
View file @
c399932a
...
...
@@ -4983,7 +4983,7 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
creation we do not infer into stored routine bodies and do not check
privileges of its statements, which would probably be a good idea
especially if the view has SQL SECURITY DEFINER and the used stored
procedure has SQL
procedure has SQL
SECURITY DEFINER
*/
Security_context
*
save_ctx
;
if
(
!
(
res
=
find_and_check_access
(
thd
,
EXECUTE_ACL
,
&
save_ctx
)))
...
...
sql/sql_acl.cc
View file @
c399932a
...
...
@@ -3522,8 +3522,14 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables,
DBUG_ASSERT
(
number
>
0
);
/*
Iterate tables until first prelocking placeholder (if this query do not
have placeholders first_not_own_table is 0)
Walk through the list of tables that belong to the query and save the
requested access (orig_want_privilege) to be able to use it when
checking access rights to the underlying tables of a view. Our grant
system gradually eliminates checked bits from want_privilege and thus
after all checks are done we can no longer use it.
The check that first_not_own_table is not reached is for the case when
the given table list refers to the list for prelocking (contains tables
of other queries). For simple queries first_not_own_table is 0.
*/
for
(
i
=
0
,
table
=
tables
;
table
&&
table
!=
first_not_own_table
&&
i
<
number
;
...
...
sql/sql_parse.cc
View file @
c399932a
...
...
@@ -5029,8 +5029,9 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables,
TABLE_LIST
*
org_tables
=
tables
;
TABLE_LIST
*
first_not_own_table
=
thd
->
lex
->
first_not_own_table
();
/*
Iterate tables until first prelocking placeholder (if this query do not
have placeholders first_not_own_table is 0)
The check that first_not_own_table is not reached is for the case when
the given table list refers to the list for prelocking (contains tables
of other queries). For simple queries first_not_own_table is 0.
*/
for
(;
tables
&&
tables
!=
first_not_own_table
;
tables
=
tables
->
next_global
)
{
...
...
sql/sql_view.cc
View file @
c399932a
...
...
@@ -1139,9 +1139,7 @@ ok2:
old_lex
->
time_zone_tables_used
=
thd
->
lex
->
time_zone_tables_used
;
thd
->
lex
=
old_lex
;
if
(
!
table
->
prelocking_placeholder
&&
table
->
prepare_security
(
thd
))
{
DBUG_RETURN
(
1
);
}
DBUG_RETURN
(
0
);
...
...
sql/table.cc
View file @
c399932a
...
...
@@ -2419,7 +2419,7 @@ void st_table_list::register_want_access(ulong want_access)
/*
Load security context info
e
mation for this view
Load security context info
r
mation for this view
SYNOPSIS
st_table_list::prepare_view_securety_context()
...
...
@@ -2517,9 +2517,7 @@ bool st_table_list::prepare_security(THD *thd)
DBUG_ASSERT
(
!
prelocking_placeholder
);
if
(
prepare_view_securety_context
(
thd
))
{
DBUG_RETURN
(
TRUE
);
}
thd
->
security_ctx
=
find_view_security_context
(
thd
);
while
((
tbl
=
tb
++
))
{
...
...
sql/table.h
View file @
c399932a
...
...
@@ -551,12 +551,12 @@ typedef struct st_table_list
st_table_list
*
referencing_view
;
/*
security context (non-zero only for tables which belong
to view with SQL SEURITY DEFINER)
to view with SQL SE
Q
URITY DEFINER)
*/
Security_context
*
security_ctx
;
/*
this view security context (non-zero only for views with
SQL SEURITY DEFINER)
SQL SE
Q
URITY DEFINER)
*/
Security_context
*
view_sctx
;
/*
...
...
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