Skip to content

Commit

Permalink
chore(file-system-monitor): rename elf check configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
banditopazzo committed Sep 19, 2024
1 parent cece664 commit 8343eee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions crates/modules/file-system-monitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ in its first bytes.

|Config|Type|Description|
|------|----|-----------|
|`elf_check_enabled`|boolean|Enable ELF check|
|`elf_check`|boolean|Enable ELF check|
|`elf_check_whitelist`|path list|Paths ignored by ELF check|

Default configuration:

```ini
[file-system-monitor]
enabled=true
elf_check_enabled=true
elf_check=true
elf_check_whitelist=/proc,/sys,/dev
```

You disable this module or the ELF check with:

```sh
pulsar config --set file-system-monitor.enabled=false
pulsar config --set file-system-monitor.elf_check_enabled=false
pulsar config --set file-system-monitor.elf_check=false
```

## Testing
Expand Down
6 changes: 3 additions & 3 deletions crates/modules/file-system-monitor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub mod pulsar {
_state: &mut Self::State,
ctx: &ModuleContext,
) -> Result<(), ModuleError> {
if config.elf_check_enabled {
if config.elf_check {
check_elf(ctx, &config.elf_check_whitelist, event).await;
}
Ok(())
Expand Down Expand Up @@ -171,7 +171,7 @@ pub mod pulsar {

#[derive(Clone, Debug, Default)]
pub struct Config {
elf_check_enabled: bool,
elf_check: bool,
elf_check_whitelist: Vec<String>,
}

Expand All @@ -180,7 +180,7 @@ pub mod pulsar {

fn try_from(config: &ModuleConfig) -> Result<Self, Self::Error> {
Ok(Config {
elf_check_enabled: config.with_default("elf_check_enabled", true)?,
elf_check: config.with_default("elf_check", true)?,
elf_check_whitelist: config.get_list_with_default(
"elf_check_whitelist",
vec![
Expand Down

0 comments on commit 8343eee

Please sign in to comment.