From d3c0e34bdc99ee57fd5d63237d29531d1afdef2b Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 2 Mar 2018 16:19:14 +1100 Subject: MDEV-8743: protect myisam/aria MYI with O_CLOEXEC --- storage/myisam/mi_open.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'storage/myisam') 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; } -- cgit v1.2.1