Skip to content

Commit 9e0df91

Browse files
committed
Document that the openat crate doesn't follow symlinks.
Add a note to the related crates section of the top-level README mentioning that the openat crate doesn't follow symlinks, while cap-std does (and sandboxes them).
1 parent 3ce3f2f commit 9e0df91

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,11 @@ encoding arbitrary host byte sequences within UTF-8 strings, using the
195195
`cap-std` provides similar functionality to the [`openat`] crate, with a similar
196196
`Dir` type with associated functions corresponding to `*at` functions.
197197
`cap-std`'s `Dir` type performs sandboxing, including for multiple-component
198-
paths.
198+
paths. And `cap-std` supports symlinks as long as they remain within the
199+
sandbox, while `openat` doesn't support following symlinks.
199200

200201
`cap-std` has some similar functionality to [`pathrs`] in that it also
201-
explicitly verifies that `/proc` has actual `/proc` mounted on it and nothing
202+
explicitly verifies that `/proc` has actual `procfs` mounted on it and nothing
202203
mounted on top, and it can also use `openat2`. However, `cap-std` uses
203204
`RESOLVE_BENEATH`-style resolution where absolute paths are considered errors,
204205
while `pathrs` uses `RESOLVE_IN_ROOT` where absolute paths are interpreted as

0 commit comments

Comments
 (0)