1extern crate linuxver;
2extern crate semver;
3
4use semver::Version;
6
7const SECCOMP_MIN_KERNEL_VERSION: &'static str = "2.6.12";
8
9fn main() {
10
11 println!("[+] Checking Linux kernel version...");
12
13 let ver = linuxver::version().unwrap();
14
15 println!("[+] System is running Linux kernel: {}.{}.{}", ver.major, ver.minor, ver.patch);
16
17 if ver >= Version::parse(SECCOMP_MIN_KERNEL_VERSION).unwrap() {
18 println!("[+] Your kernel version should support SECCOMP.");
19 } else {
20 println!("[+] Your kernel version does not support SECCOMP");
21 };
22
23
24}