mariadb/storage
Sergei Golubchik b27fd90ad3 MDEV-11902 mi_open race condition
TOCTOU bug. The path is checked to be valid, symlinks are resolved.
Then the resolved path is opened. Between the check and the open,
there's a window when one can replace some path component with a
symlink, bypassing validity checks.

Fix: after we resolved all symlinks in the path, don't allow open()
to resolve symlinks, there should be none.

Compared to the old MyISAM/Aria code:
* fastpath. Opening of not-symlinked files is just one open(),
  no fn_format() and lstat() anymore.
* opening of symlinked tables doesn't do fn_format() and lstat() either.
  it also doesn't to realpath() (which was lstat-ing every path
  component), instead if opens every path component with O_PATH.
* share->data_file_name stores realpath(path) not readlink(path). So,
  SHOW CREATE TABLE needs to do lstat/readlink() now (see ::info()),
  and certain error messages (cannot open file "XXX") show the real
  file path with all symlinks resolved.
2017-02-27 12:35:10 +01:00
..
archive mysql-5.5.38 merge 2014-06-03 09:55:08 +02:00
blackhole
csv
example MDEV-5120 Test suite test maria-no-logging fails 2014-10-02 11:57:40 +02:00
federated 2016-02-23 12:10:41 +05:30
federatedx MDEV-8313 Got an error writing communication packets 2015-12-07 15:20:23 +01:00
heap MDEV-4813 Replication fails on updating a MEMORY table with an index using btree 2014-10-07 10:54:14 +02:00
innobase MDEV-11520/MDEV-5746 post-fix: Do not posix_fallocate() too much. 2017-02-22 10:03:33 +02:00
maria MDEV-11902 mi_open race condition 2017-02-27 12:35:10 +01:00
myisam MDEV-11902 mi_open race condition 2017-02-27 12:35:10 +01:00
myisammrg Merge branch 'mysql/5.5' into 5.5 2016-04-20 15:25:55 +02:00
ndb mysql-5.5.37 selective merge 2014-03-27 22:26:58 +01:00
oqgraph MDEV-7351 5.5 build fails on Ubuntu Utopic in buildbot 2015-02-09 20:53:28 +01:00
perfschema Merge remote-tracking branch 'mysql/5.5' into 5.5 2015-10-08 22:54:24 +02:00
sphinx compilation errors on sparc sun studio 10 2016-02-15 12:51:35 +01:00
tokudb MDEV-12120 tokudb_bugs.xa-N tests fail with timeout on valgrind 2017-02-23 19:46:10 +02:00
xtradb MDEV-11520/MDEV-5746 post-fix: Do not posix_fallocate() too much. 2017-02-22 10:03:33 +02:00