From 0d5b4a60629497efd37eb79f410e585a7610467f Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Wed, 26 Jan 2022 18:14:39 +0100 Subject: [PATCH] Ensure that the binary is named lockcd In pull request #142 we made a mistake of converting lockc into full binary crate, therefore renaming lockcd to lockc and removing a possibility of creating multiple binaries (if there will be a need - i.e. for some CLI tool). This change fixes that by creating a bin/ directory with binaries again. Signed-off-by: Michal Rostecki --- lockc/src/{main.rs => bin/lockcd.rs} | 20 +++++++------------- lockc/src/lib.rs | 7 +++++++ 2 files changed, 14 insertions(+), 13 deletions(-) rename lockc/src/{main.rs => bin/lockcd.rs} (96%) create mode 100644 lockc/src/lib.rs diff --git a/lockc/src/main.rs b/lockc/src/bin/lockcd.rs similarity index 96% rename from lockc/src/main.rs rename to lockc/src/bin/lockcd.rs index fe2338c..a65a2c2 100644 --- a/lockc/src/main.rs +++ b/lockc/src/bin/lockcd.rs @@ -10,19 +10,13 @@ use tokio::{ use tracing::{debug, error, Level}; use tracing_subscriber::FmtSubscriber; -mod bpfstructs; -mod communication; -mod load; -mod maps; -mod runc; -mod settings; -mod sysutils; - -use communication::EbpfCommand; -use load::{attach_programs, load_bpf}; -use maps::{add_container, add_process, delete_container, init_allowed_paths}; -use runc::RuncWatcher; -use sysutils::check_bpf_lsm_enabled; +use lockc::{ + communication::EbpfCommand, + load::{attach_programs, load_bpf}, + maps::{add_container, add_process, delete_container, init_allowed_paths}, + runc::RuncWatcher, + sysutils::check_bpf_lsm_enabled, +}; #[derive(Error, Debug)] enum FanotifyError { diff --git a/lockc/src/lib.rs b/lockc/src/lib.rs new file mode 100644 index 0000000..bfcc37b --- /dev/null +++ b/lockc/src/lib.rs @@ -0,0 +1,7 @@ +pub mod bpfstructs; +pub mod communication; +pub mod load; +pub mod maps; +pub mod runc; +pub mod settings; +pub mod sysutils;