Dan Gohman

Results 179 issues of Dan Gohman

This function is a higher-level abstraction that doesn't really fit in rustix, and complicates an upcoming rustix refactoring, so move it out to cap-std.

As @kubkon observed, `NtOpenFile` provides a more efficient and likely more reliable way to implement `openat`-like behavior on Windows. As an example, Rust is now using it this way in...

enhancement

Rust 1.56 stablizes [`std::os::unix::fs::chroot`](std::os::unix::fs::chroot). Should cap-std add a `chroot` function that can be called on a `Dir`? It'd be implemented in terms of `fchroot` on platforms that have that, or...

On Windows, files on network shares have a canonical path which starts with the UNC "\\?\" prefix. With these prefixes, the OS no longer handles "." paths and trailing slashes,...

FreeBSD 13.0 added a `O_RESOLVE_BENEATH` flag to [`open`](https://www.freebsd.org/cgi/man.cgi?query=open&sektion=2&format=html#end) which appears to implement similar behavior to Linux's `openat2`'s `RESOLVE_BENEATH` flag, which should allow us to implement sandboxed `open` with a single...

enhancement

According to [this blog post](https://blog.malwarebytes.com/mac/2021/08/macos-11s-hidden-security-improvements/#O_NOFOLLOW_ANY), macos 11 has a new `O_NOFOLLOW_ANY` flag that causes `open` to fail if any path component is a symlink. Assuming symlinks are relatively rare, cap-std...

enhancement

[`walkdir`] is a popular cross platform Rust library for efficiently walking a directory recursively. It'd be interesting to either wrap or port this crate to `cap-std` to allow recursively walking...

help wanted

`create_dir_all` uses the algorithm from `libstd` for recursively creating all components. However, `cap-primitives`' `mkdir` function performs a system call per path component per call, so calling it once per path...

good first issue

Update the Wasmtime and Cranelift URLs and descriptions to match the current repository.

The component AST permits multiple `start` functions. Currently, the canonical ABI mangles them with the cabi version number and the signature, so if two start functions have the same signature,...