diff --git a/Cargo.lock b/Cargo.lock index 788bbfdbb..38eb787b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1198,6 +1198,8 @@ name = "devinfo" version = "1.0.0" dependencies = [ "bindgen", + "nix", + "semver", "snafu", "udev 0.8.0", "url", @@ -3432,9 +3434,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" diff --git a/control-plane/csi-driver/src/bin/node/mount.rs b/control-plane/csi-driver/src/bin/node/mount.rs index 8b7de55ed..f644d6187 100644 --- a/control-plane/csi-driver/src/bin/node/mount.rs +++ b/control-plane/csi-driver/src/bin/node/mount.rs @@ -1,7 +1,7 @@ //! Utility functions for mounting and unmounting filesystems. use crate::filesystem_ops::FileSystem; use csi_driver::filesystem::FileSystem as Fs; -use devinfo::mountinfo::{MountInfo, MountIter}; +use devinfo::mountinfo::{MountInfo, SafeMountIter}; use std::{collections::HashSet, io::Error}; use sys_mount::{unmount, FilesystemType, Mount, MountFlags, UnmountFlags}; @@ -31,7 +31,7 @@ impl ReadOnly for &str { pub(crate) fn find_mount(source: Option<&str>, target: Option<&str>) -> Option { let mut found: Option = None; - for mount in MountIter::new().unwrap().flatten() { + for mount in SafeMountIter::get().unwrap().flatten() { if let Some(value) = source { if mount.source.to_string_lossy() == value { if let Some(value) = target { @@ -57,7 +57,7 @@ pub(crate) fn find_mount(source: Option<&str>, target: Option<&str>) -> Option) -> Vec { - MountIter::new() + SafeMountIter::get() .unwrap() .flatten() .filter(|mount| { diff --git a/utils/dependencies b/utils/dependencies index 86be28510..efb8d4caf 160000 --- a/utils/dependencies +++ b/utils/dependencies @@ -1 +1 @@ -Subproject commit 86be28510cc4b08a62c5679c5a96c559ee12c09c +Subproject commit efb8d4caf9d40024a50bf6d69efdffd9c0286bd0