summaryrefslogtreecommitdiff
path: root/storage/myisam
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/myisam
parentbbee025370d885103cba55716c9c2ab44e533283 (diff)
downloadmariadb-git-d3c0e34bdc99ee57fd5d63237d29531d1afdef2b.tar.gz
MDEV-8743: protect myisam/aria MYI with O_CLOEXEC
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/mi_open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c
index 8e739109c0d..9775aade9c1 100644
--- a/storage/myisam/mi_open.c
+++ b/storage/myisam/mi_open.c
@@ -117,13 +117,13 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
DEBUG_SYNC_C("mi_open_kfile");
if ((kfile= mysql_file_open(mi_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(mi_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;
}