From fc8e99ab75157a7c3d563a5cfaf27b0779291983 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Thu, 18 Jul 2024 16:39:59 +1000 Subject: [PATCH] deps: update bitflags to v2 Signed-off-by: Aleksa Sarai --- Cargo.toml | 2 +- src/resolvers/kernel.rs | 2 +- src/resolvers/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bd1e1be..5d56c45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } diff --git a/src/resolvers/kernel.rs b/src/resolvers/kernel.rs index dbfc437..0a2c713 100644 --- a/src/resolvers/kernel.rs +++ b/src/resolvers/kernel.rs @@ -45,7 +45,7 @@ pub(crate) fn resolve>( // 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 diff --git a/src/resolvers/mod.rs b/src/resolvers/mod.rs index 3fc9522..bfe4d73 100644 --- a/src/resolvers/mod.rs +++ b/src/resolvers/mod.rs @@ -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; }