From cf427cebd194a3788b5723cf860ed944db010753 Mon Sep 17 00:00:00 2001 From: David Mulder Date: Thu, 7 Nov 2024 14:40:38 -0700 Subject: [PATCH] Revert "deps(rust): update notify-debouncer-full requirement from 0.3 to 0.4" This reverts commit 5d5b5936f1d5c6d1dcd8dff138ce5d80198a7bb2. The latest version of notify-debouncer-full caused himmelblaud to get stuck in a runaway loop reprocesing /etc/passwd over and over again, checking for local users/groups. Reverting this broken version and pegging the version to 0.3. Signed-off-by: David Mulder --- .github/dependabot.yml | 1 + Cargo.toml | 2 +- src/daemon/src/daemon.rs | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bf7c823..1bb37bf 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -20,5 +20,6 @@ updates: - dependency-name: "opentelemetry-stdout" - dependency-name: "tracing-opentelemetry" - dependency-name: "utoipa" + - dependency-name: "notify-debouncer-full" # This requires an update to compact-jwt first, awaiting that update - dependency-name: "kanidm-hsm-crypto" diff --git a/Cargo.toml b/Cargo.toml index 3355811..da61265 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,7 +83,7 @@ kanidm_lib_crypto = { path = "./src/crypto" } kanidm_utils_users = { path = "./src/users" } walkdir = "2" csv = "1.2.2" -notify-debouncer-full = { version = "0.4" } +notify-debouncer-full = { version = ">=0.3, <0.4" } utoipa = "4.2.0" utoipa-swagger-ui = "4.0.0" opentelemetry = { version = "0.20.0" } diff --git a/src/daemon/src/daemon.rs b/src/daemon/src/daemon.rs index e197706..862ee3f 100644 --- a/src/daemon/src/daemon.rs +++ b/src/daemon/src/daemon.rs @@ -61,7 +61,7 @@ use tokio_util::codec::{Decoder, Encoder, Framed}; use kanidm_hsm_crypto::{soft::SoftTpm, AuthValue, BoxedDynTpm, Tpm}; -use notify_debouncer_full::{new_debouncer, notify::RecursiveMode}; +use notify_debouncer_full::{new_debouncer, notify::RecursiveMode, notify::Watcher}; mod broker; use broker::Broker; @@ -1051,10 +1051,10 @@ async fn main() -> ExitCode { let _ = inotify_tx.try_send(true); }) .and_then(|mut debouncer| { - debouncer.watch(Path::new("/etc/passwd"), RecursiveMode::NonRecursive) + debouncer.watcher().watch(Path::new("/etc/passwd"), RecursiveMode::NonRecursive) .map(|()| debouncer) }) - .and_then(|mut debouncer| debouncer.watch(Path::new("/etc/group"), RecursiveMode::NonRecursive) + .and_then(|mut debouncer| debouncer.watcher().watch(Path::new("/etc/group"), RecursiveMode::NonRecursive) .map(|()| debouncer) )