Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage)', 'cfg(coverage_
tail_expr_drop_order = "warn"
unsafe_op_in_unsafe_fn = "warn"
unused_unsafe = "warn"
long_running_const_eval = "allow"

[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
Expand Down
3 changes: 3 additions & 0 deletions crates/fspy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ anyhow = { workspace = true }
flate2 = { workspace = true }
tar = { workspace = true }
xxhash-rust = { workspace = true, features = ["xxh3"] }

[lints]
workspace = true
3 changes: 1 addition & 2 deletions crates/fspy/src/unix/syscall_handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use fspy_seccomp_unotify::{
supervisor::handler::arg::{CStrPtr, Caller, Fd},
};
use fspy_shared::ipc::{AccessMode, NativeStr, PathAccess};
use nix::NixPath;

use crate::arena::PathAccessArena;

Expand Down Expand Up @@ -53,7 +52,7 @@ impl SyscallHandler {
let mut path = Cow::Borrowed(Path::new(OsStr::from_bytes(&self.path_read_buf[..path_len])));
if !path.is_absolute() {
let mut resolved_path = PathBuf::from(dir_fd.get_path(caller)?);
if !path.is_empty() {
if !nix::NixPath::is_empty(path.as_ref()) {
resolved_path.push(&path);
}
path = Cow::Owned(resolved_path);
Expand Down
3 changes: 3 additions & 0 deletions crates/fspy_e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ fspy = { workspace = true }
serde = { workspace = true, features = ["derive"] }
tokio = { workspace = true, features = ["full"] }
toml = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/fspy_preload_unix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ fspy_shared = { workspace = true }
fspy_shared_unix = { workspace = true }
libc = { workspace = true }
nix = { workspace = true, features = ["signal", "fs", "socket", "mman", "time"] }

[lints]
workspace = true
24 changes: 12 additions & 12 deletions crates/fspy_preload_unix/src/interceptions/spawn/exec/with_argv.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{
ffi::VaListImpl,
ffi::VaList,
mem::{self, MaybeUninit, transmute},
slice,
};
Expand All @@ -9,19 +9,19 @@ use nix::Error;

// https://github.com/redox-os/relibc/blob/710911febb07a43716a6236cc9e5b864e227e36e/src/header/unistd/mod.rs#L1094
pub unsafe fn with_argv(
mut va: VaListImpl,
mut va: VaList,
arg0: *const c_char,
f: impl FnOnce(&[*const c_char], VaListImpl) -> c_int,
f: impl FnOnce(&[*const c_char], VaList) -> c_int,
) -> c_int {
let argc = 1 + unsafe {
va.with_copy(|mut copy| {
core::iter::from_fn(|| Some(copy.arg::<*const c_char>()))
.position(|s| {
// Find the NULL terminator
s.is_null()
})
.unwrap()
})
let argc = 1 + {
let mut va = va.clone();
// Safety: argv is guaranteed to be NULL-terminated
core::iter::from_fn(|| Some(unsafe { va.arg::<*const c_char>() }))
.position(|s| {
// Find the NULL terminator
s.is_null()
})
.unwrap()
};

let mut stack: [MaybeUninit<*const c_char>; 32] = [MaybeUninit::uninit(); 32];
Expand Down
3 changes: 3 additions & 0 deletions crates/fspy_preload_windows/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ winsafe = { workspace = true }

[target.'cfg(target_os = "windows")'.dev-dependencies]
tempfile = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/fspy_seccomp_unotify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ tokio = { workspace = true, features = ["macros", "time"] }
[features]
supervisor = ["dep:passfd", "passfd/async"]
target = ["dep:passfd"]

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/fspy_shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ assert2 = { workspace = true }
ctor = { workspace = true }
fspy_test_utils = { workspace = true }
shared_memory = { workspace = true, features = ["logging"] }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/fspy_shared_unix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ memmap2 = { workspace = true }

[target.'cfg(target_os = "macos")'.dependencies]
phf = { workspace = true }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/vite_glob/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ wax = { workspace = true }

[dev-dependencies]
vite_str = { workspace = true }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Needed nightly features:
# - cargo `Z-bindeps` to build and embed preload shared libraries as dependencies of fspy
# - `windows_process_extensions_main_thread_handle` to get the main thread handle for Detours injection
channel = "nightly-2025-10-31"
channel = "nightly-2025-12-11"
profile = "default"
Loading