Skip to content

Commit ca43894

Browse files
committed
Auto merge of #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 24ae996 + 8c9944c commit ca43894

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1986,9 +1986,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
19861986

19871987
[[package]]
19881988
name = "libc"
1989-
version = "0.2.108"
1989+
version = "0.2.116"
19901990
source = "registry+https://github.com/rust-lang/crates.io-index"
1991-
checksum = "8521a1b57e76b1ec69af7599e75e38e7b7fad6610f037db8c79b127201b5d119"
1991+
checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74"
19921992
dependencies = [
19931993
"rustc-std-workspace-core",
19941994
]

library/std/Cargo.toml

+1-1
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" }

library/std/src/sys/unix/fs.rs

-2
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)