1. 23 4月, 2021 1 次提交
  2. 31 8月, 2020 1 次提交
  3. 08 2月, 2019 1 次提交
    • R
      fail fdopendir for O_PATH file descriptors · 042b3ee4
      Rich Felker 提交于
      fdopendir is specified to fail with EBADF if the file descriptor
      passed is not open for reading. while O_PATH is an extension and
      arguably exempt from this requirement, it's used, albeit incompletely,
      to implement O_SEARCH, and fdopendir should fail when passed an
      O_SEARCH file descriptor.
      
      the new check is performed after fstat so that we don't have to
      consider the possibility that the fd is invalid.
      
      an alternate solution would be attempting to pre-fill the buffer using
      getdents, which would fail with EBADF for us, but that seems more
      complex and error-prone and involves either code duplication or
      refactoring, so the simple fix with an additional inexpensive syscall
      is what I've made for now.
      042b3ee4
  4. 12 12月, 2013 1 次提交
  5. 22 7月, 2011 1 次提交
  6. 12 2月, 2011 1 次提交