Skip to content

Conversation

goffrie
Copy link
Contributor

@goffrie goffrie commented Apr 20, 2022

On older Linux kernels (I tested on 4.4, corresponding to Ubuntu 16.04), opening a symlink using O_DIRECTORY | O_NOFOLLOW returns ELOOP instead of ENOTDIR. We should handle it the same, since a symlink is still not a directory and needs to be unlinked.

@rust-highfive
Copy link
Contributor

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with r? rust-lang/libs-api @rustbot label +T-libs-api -T-libs to request review from a libs-api team reviewer. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Apr 20, 2022
@rust-highfive
Copy link
Contributor

r? @thomcc

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 20, 2022
@thomcc
Copy link
Member

thomcc commented Apr 20, 2022

According to https://man7.org/linux/man-pages/man2/open.2.html, ELOOP is a valid return value for O_NOFOLLOW, so this seems fine (I guess in later versions O_DIRECTORY overrides this).

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 20, 2022

📌 Commit cff3f1e has been approved by thomcc

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 20, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 20, 2022
Rollup of 6 pull requests

Successful merges:

 - rust-lang#93313 (Check if call return type is visibly uninhabited when building MIR)
 - rust-lang#96160 (Miri/interpreter debugging tweaks)
 - rust-lang#96167 (Replace sys/unix/weak AtomicUsize with AtomicPtr)
 - rust-lang#96168 (Improve AddrParseError description)
 - rust-lang#96206 (Use sys::unix::locks::futex* on wasm+atomics.)
 - rust-lang#96234 (remove_dir_all_recursive: treat ELOOP the same as ENOTDIR)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2443cf2 into rust-lang:master Apr 20, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 20, 2022
@goffrie goffrie deleted the eloop branch April 21, 2022 08:10
hkratz added a commit to rusticstuff/rust that referenced this pull request Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants