Projects STRLCPY ebpfguard Commits 50981490
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■
    Cargo.toml
    skipped 4 lines
    5 5   "xtask",
    6 6   "examples/*",
    7 7  ]
     8 +exclude = ["ebpfguard-ebpf"]
    8 9   
    9 10  [patch.crates-io]
    10 11  aya = { git = "https://github.com/deepfence/aya-rs", branch = "btf-fixes" }
    skipped 1 lines
  • ■ ■ ■ ■ ■ ■
    ebpfguard/src/lib.rs
    skipped 229 lines
    230 230   
    231 231  impl PolicyManager {
    232 232   /// Default path for storage of eBPFGuard maps
    233  - const DEFAULT_BPFFS_MAPS_PATH: &str = "/sys/fs/bpf/ebpfguard_default";
     233 + pub const DEFAULT_BPFFS_MAPS_PATH: &str = "/sys/fs/bpf/ebpfguard_default";
    234 234   
    235 235   /// Creates a new policy manager with default maps path.
    236 236   ///
    skipped 5 lines
    242 242   /// let mut policy_manager = PolicyManager::with_default_path().unwrap();
    243 243   /// ```
    244 244   pub fn with_default_path() -> Result<Self, EbpfguardError> {
     245 + std::fs::create_dir_all(Self::DEFAULT_BPFFS_MAPS_PATH)?;
    245 246   Self::new(Self::DEFAULT_BPFFS_MAPS_PATH)
    246 247   }
    247 248   
    skipped 12 lines
    260 261   let bpf = BpfLoader::new()
    261 262   .map_pin_path(&bpf_path)
    262 263   .load(include_bytes_aligned!(
    263  - "../../target/bpfel-unknown-none/debug/ebpfguard"
     264 + "../../ebpfguard-ebpf/ebpfguard.debug.obj"
    264 265   ))?;
    265 266   #[cfg(not(debug_assertions))]
    266 267   let bpf = BpfLoader::new()
    267 268   .map_pin_path(&bpf_path)
    268 269   .load(include_bytes_aligned!(
    269  - "../../target/bpfel-unknown-none/release/ebpfguard"
     270 + "../../ebpfguard-ebpf/ebpfguard.release.obj"
    270 271   ))?;
    271 272   
    272 273   Ok(Self { bpf })
    skipped 274 lines
  • ■ ■ ■ ■
    ebpfguard-common/Cargo.toml
    skipped 7 lines
    8 8  user = ["aya"]
    9 9   
    10 10  [dependencies]
    11  -aya = { version = ">=0.11", optional = true }
     11 +aya = { git = "https://github.com/deepfence/aya-rs", branch = "btf-fixes", optional=true }
    12 12   
    13 13  [lib]
    14 14  path = "src/lib.rs"
    skipped 1 lines
  • ebpfguard-ebpf/ebpfguard.debug.obj
    Binary file.
Please wait...
Page is in error, reload to recover