diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-10 01:07:27 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-10 01:07:27 +0000 |
commit | 7c7d47d2369881f8ea22da34077459771276786a (patch) | |
tree | 425e5797ef04374b65dbf51a0f780b9f8bbc683d | |
parent | 60a1dceafc593ca7043f35d7f8b4b7d986408e3c (diff) | |
download | ruby-7c7d47d2369881f8ea22da34077459771276786a.tar.gz |
dir.c: pass flags to openat(2) correctly
Flags are 3rd argument of openat(2) while the 4th argument
(mode_t) is unnecessary for our uses. This bug exists since
Ruby 2.5 from r58860 and was discoverd by strace.
* dir.c (nogvl_opendir_at): use openat correctly
[Feature #13056] [Feature #14346]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1447,7 +1447,7 @@ nogvl_opendir_at(void *ptr) O_DIRECTORY| # endif /* O_DIRECTORY */ 0); - int fd = openat(oaa->basefd, oaa->path, 0, opendir_flags); + int fd = openat(oaa->basefd, oaa->path, opendir_flags); dirp = fd >= 0 ? fdopendir(fd) : 0; if (!dirp) { @@ -1455,7 +1455,7 @@ nogvl_opendir_at(void *ptr) switch (gc_for_fd_with_gvl(e)) { default: - if (fd < 0) fd = openat(oaa->basefd, oaa->path, 0, opendir_flags); + if (fd < 0) fd = openat(oaa->basefd, oaa->path, opendir_flags); if (fd >= 0) dirp = fdopendir(fd); if (dirp) return dirp; |