Skip to content

Commit

Permalink
deps: update bitflags to v2
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksa Sarai <[email protected]>
  • Loading branch information
cyphar committed Jul 18, 2024
1 parent 3597b36 commit fc8e99a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ panic = "abort"

[dependencies]
backtrace = "^0.3"
bitflags = "^1"
bitflags = "^2"
lazy_static = "^1"
libc = "^0.2"
snafu = { version = "^0.6", features = ["backtraces-impl-backtrace-crate"] }
2 changes: 1 addition & 1 deletion src/resolvers/kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub(crate) fn resolve<P: AsRef<Path>>(
// resolving magic-links. RESOLVE_IN_ROOT already blocks magic-link
// crossings, but that may change in the future (if the magic-links are
// considered "safe") but we should still explicitly avoid them entirely.
how.resolve = libc::RESOLVE_IN_ROOT | libc::RESOLVE_NO_MAGICLINKS | flags.bits;
how.resolve = libc::RESOLVE_IN_ROOT | libc::RESOLVE_NO_MAGICLINKS | flags.bits();

// openat2(2) can fail with -EAGAIN if there was a racing rename or mount
// *anywhere on the system*. This can happen pretty frequently, so what we
Expand Down
2 changes: 1 addition & 1 deletion src/resolvers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ bitflags! {
/// Optional flags to modify the resolution of paths inside a [`Root`].
///
/// [`Root`]: struct.Root.html
#[derive(Default)]
#[derive(Default, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
pub struct ResolverFlags: u64 {
const NO_SYMLINKS = libc::RESOLVE_NO_SYMLINKS;
}
Expand Down

0 comments on commit fc8e99a

Please sign in to comment.