diff --git a/Cargo.lock b/Cargo.lock index dbcab9c19..3f91dbeac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3226,17 +3226,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_repr" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "serde_spanned" version = "0.6.7" @@ -3585,16 +3574,6 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "syscalls" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d0e35dc7d73976a53c7e6d7d177ef804a0c0ee774ec77bcc520c2216fd7cbe" -dependencies = [ - "serde", - "serde_repr", -] - [[package]] name = "tap" version = "1.0.1" @@ -4656,7 +4635,6 @@ dependencies = [ "sha1", "sha2 0.10.8", "smallvec", - "syscalls", "thiserror", "tlsh-fixed", "uuid", diff --git a/lib/Cargo.toml b/lib/Cargo.toml index e6c43d6c2..8651de8c7 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -246,10 +246,6 @@ yara-x-parser = { workspace = true, features = ["serde"] } lingua = { version = "1.6.2", optional = true, default-features = false, features = ["english", "german", "french", "spanish"] } -# syscalls crate is only available for Linux -[target.'cfg(target_os = "linux")'.dependencies] -syscalls = "0.6.18" - [build-dependencies] anyhow = { workspace = true } globwalk = { workspace = true } diff --git a/lib/src/scanner/mod.rs b/lib/src/scanner/mod.rs index cca7fd90e..8e6dad186 100644 --- a/lib/src/scanner/mod.rs +++ b/lib/src/scanner/mod.rs @@ -591,15 +591,6 @@ impl<'r> Scanner<'r> { if self.timeout.is_some() { INIT_HEARTBEAT.call_once(|| { thread::spawn(|| loop { - #[cfg(target_os = "linux")] - unsafe { - // unshare(CLONE_FS) preventing setns syscall to fail - // if a timeout is set for the scanner. - // see issue: https://github.com/VirusTotal/yara-x/issues/182 - syscalls::syscall!(syscalls::Sysno::unshare, 512) - .unwrap(); - } - thread::sleep(Duration::from_secs(1)); ENGINE.increment_epoch(); HEARTBEAT_COUNTER