Commit 41a6475b authored by Marko Mäkelä's avatar Marko Mäkelä

InnoDB: Use access() instead of open()

parent 06041ade
...@@ -3321,15 +3321,8 @@ os_file_get_status_posix( ...@@ -3321,15 +3321,8 @@ os_file_get_status_posix(
&& (stat_info->type == OS_FILE_TYPE_FILE && (stat_info->type == OS_FILE_TYPE_FILE
|| stat_info->type == OS_FILE_TYPE_BLOCK)) { || stat_info->type == OS_FILE_TYPE_BLOCK)) {
int fh = open(path, read_only ? O_RDONLY : O_RDWR, stat_info->rw_perm = !access(path, read_only
os_innodb_umask); ? R_OK : R_OK | W_OK);
if (fh == -1) {
stat_info->rw_perm = false;
} else {
stat_info->rw_perm = true;
close(fh);
}
} }
return(DB_SUCCESS); return(DB_SUCCESS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment