summaryrefslogtreecommitdiff
path: root/storage/maria
diff options
context:
space:
mode:
authorDaniel Black <daniel@linux.vnet.ibm.com>2018-03-02 16:19:14 +1100
committerDaniel Black <daniel@linux.vnet.ibm.com>2018-03-02 16:19:14 +1100
commitd3c0e34bdc99ee57fd5d63237d29531d1afdef2b (patch)
tree9f04e4a404600b9dbe42c3f49e68f1964dca39f2 /storage/maria
parentbbee025370d885103cba55716c9c2ab44e533283 (diff)
downloadmariadb-git-d3c0e34bdc99ee57fd5d63237d29531d1afdef2b.tar.gz
MDEV-8743: protect myisam/aria MYI with O_CLOEXEC
Diffstat (limited to 'storage/maria')
-rw-r--r--storage/maria/ma_open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c
index d20fa06e069..d9ff2179691 100644
--- a/storage/maria/ma_open.c
+++ b/storage/maria/ma_open.c
@@ -314,13 +314,13 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags)
});
DEBUG_SYNC_C("mi_open_kfile");
if ((kfile=mysql_file_open(key_file_kfile, name_buff,
- (open_mode=O_RDWR) | O_SHARE | O_NOFOLLOW,
+ (open_mode=O_RDWR) | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
MYF(MY_NOSYMLINKS))) < 0)
{
if ((errno != EROFS && errno != EACCES) ||
mode != O_RDONLY ||
(kfile=mysql_file_open(key_file_kfile, name_buff,
- (open_mode=O_RDONLY) | O_SHARE | O_NOFOLLOW,
+ (open_mode=O_RDONLY) | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
MYF(MY_NOSYMLINKS))) < 0)
goto err;
}