MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
unknown d7743c41c6 BUG#18681: View privileges are broken
The check for view security was lacking several points :
1. Check with the right set of permissions : for each table ref that
participates in a view there were the right credentials to use in it's
security_ctx member, but these weren't used for checking the credentials.
This makes hard enforcing the SQL SECURITY DEFINER|INVOKER property
consistently.
2. Because of the above the security checking for views was just ruled out
in explicit ways in several places.
3. The security was checked only for the columns of the tables that are
brought into the query from a view. So if there is no column reference
outside of the view definition it was not detecting the lack of access to
the tables in the view in SQL SECURITY INVOKER mode.

The fix below tries to fix the above 3 points.


mysql-test/r/grant.result:
  removed nondeterminism (unspecified order) in some test output
mysql-test/r/view_grant.result:
  Somewhat extended test case for the bug and similar queries.
mysql-test/t/grant.test:
  removed nondeterminism (unspecified order) in some test output
mysql-test/t/view_grant.test:
  Somewhat extended test case for the bug and similar queries.
sql/mysql_priv.h:
  A wrapper for setup_tables that also checks access to the tables
sql/sql_acl.cc:
  removed artificial security check stop and used the table ref's credentials.
sql/sql_base.cc:
  a wrapper for setup_tables to check access to the tables
sql/sql_delete.cc:
  wrapper called.
sql/sql_insert.cc:
  wrapper called
sql/sql_load.cc:
  wrapper called
sql/sql_parse.cc:
  wrapper called and artificial check stop removed
sql/sql_select.cc:
  wrapper called
sql/sql_update.cc:
  wrapper called
sql/table.cc:
  Mask table access to the view error as well.
2006-05-26 11:47:53 +03:00
bdb
BitKeeper pekka:get - push push push 2006-05-02 21:47:53 +02:00
BUILD
client Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-05-11 09:14:09 -04:00
cmd-line-utils
config/ac-macros
dbug
Docs Merge mysql.com:/home/tomash/src/mysql_ab/tmp_merge 2006-05-06 11:18:42 +04:00
extra Merge 192.168.0.20:mysql/my50-maint-yassl 2006-05-08 16:38:24 +02:00
heap
include Correct spelling errors 2006-05-12 11:00:34 +02:00
innobase Applied innodb-5.0-ss547 snapshot. 2006-05-15 18:02:21 +04:00
libmysql Remove valgrind and compiler warnings 2006-05-08 17:14:06 +02:00
libmysql_r
libmysqld
man
myisam Merge mysql.com:/home/mydev/mysql-5.0 2006-05-06 13:35:48 +02:00
myisammrg
mysql-test BUG#18681: View privileges are broken 2006-05-26 11:47:53 +03:00
mysys Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-05-03 16:37:42 +05:00
ndb Merge mysql.com:/home/marty/MySQL/mysql-4.1 2006-05-09 12:17:38 +02:00
netware
os2
pstack
regex
scripts
server-tools Make it compilable on Windows. 2006-05-10 18:53:28 +04:00
sql BUG#18681: View privileges are broken 2006-05-26 11:47:53 +03:00
sql-bench
sql-common Remove C++ comments 2006-05-03 16:59:02 +02:00
SSL Remove client-req-pem and server-req.pem 2006-05-03 11:53:16 +02:00
strings An update to as-yet unused new feature of snprintf, which was added to bring 2006-05-02 13:42:35 -04:00
support-files Merge 2006-05-10 22:15:08 +02:00
tests Fix a bunch of non-Linux compile failures. 2006-05-02 09:19:54 +02:00
tools
VC++Files Merge mysql.com:/home/hf/work/mysql-5.0.18455 2006-05-03 16:48:15 +05:00
vio Remove valgrind and compiler warnings 2006-05-08 17:14:06 +02:00
zlib
.bzrignore Fix for Win build 2006-05-01 22:16:08 +05:00
.cvsignore
configure.in 2006-05-09 00:11:54 +02:00
COPYING
Makefile.am
README

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file.
- For commercial distributions, see the MySQLEULA.txt file.


For further information about MySQL or additional documentation, see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installation chapter.
- For future plans, see the TODO appendix.
- For the new features/bugfix history, see the News appendix.
- For the currently known bugs/misfeatures (known errors) see the problems
  appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.