Skip to content

Commit 2316f6f

Browse files
committed
Auto merge of rust-lang#93351 - anp:fuchsia-remove-dir-all, r=tmandry
Bump libc and fix remove_dir_all on Fuchsia after CVE fix With the previous `is_dir` impl, we would attempt to unlink a directory in the None branch, but Fuchsia supports returning ENOTEMPTY from unlinkat() without the AT_REMOVEDIR flag because we don't currently differentiate unlinking files and directories by default. On the Fuchsia side I've opened https://fxbug.dev/92273 to discuss whether this is the correct behavior, but it doesn't seem like addressing the error code is necessary to make our tests happy. Depends on rust-lang/libc#2654 since we apparently haven't needed to reference DT_UNKNOWN before this.
2 parents 9d57354 + 40551ff commit 2316f6f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cfg-if = { version = "0.1.8", features = ['rustc-dep-of-std'] }
1515
panic_unwind = { path = "../panic_unwind", optional = true }
1616
panic_abort = { path = "../panic_abort" }
1717
core = { path = "../core" }
18-
libc = { version = "0.2.108", default-features = false, features = ['rustc-dep-of-std'] }
18+
libc = { version = "0.2.116", default-features = false, features = ['rustc-dep-of-std'] }
1919
compiler_builtins = { version = "0.1.66" }
2020
profiler_builtins = { path = "../profiler_builtins", optional = true }
2121
unwind = { path = "../unwind" }

std/src/sys/unix/fs.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,7 +1653,6 @@ mod remove_dir_impl {
16531653
target_os = "illumos",
16541654
target_os = "haiku",
16551655
target_os = "vxworks",
1656-
target_os = "fuchsia"
16571656
))]
16581657
fn is_dir(_ent: &DirEntry) -> Option<bool> {
16591658
None
@@ -1664,7 +1663,6 @@ mod remove_dir_impl {
16641663
target_os = "illumos",
16651664
target_os = "haiku",
16661665
target_os = "vxworks",
1667-
target_os = "fuchsia"
16681666
)))]
16691667
fn is_dir(ent: &DirEntry) -> Option<bool> {
16701668
match ent.entry.d_type {

0 commit comments

Comments
 (0)