Project

General

Profile

Actions

Bug #11086

closed

File content directive - Audit mode is not correctly supported

Added by Hamlyn Mootoo over 7 years ago. Updated almost 5 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Small
Priority:
0
Name check:
Reviewed
Fix check:
Checked
Regression:

Description

I created a directive in audit mode from the File content technique. The directive has a regex to replace lines. When it gets a regex match within the file, (but of course can't actually do the replacement because of audit mode) it reports an error, both when a 'rudder agent run' is done as well as in the GUI. Is this expected?

The interactive output follows:

A| compliant     checkGenericFileContent   File                      /etc/login.defs    The file /etc/login.defs was already in accordance with the policy
A| non-compliant checkGenericFileContent   File                      /etc/login.defs    The file /etc/login.defs could not be updated
A| compliant     checkGenericFileContent   Line deletion regular ex| /etc/login.defs    The file /etc/login.defs was not set for any line deletion
A| error         checkGenericFileContent   Line replacement regular| /etc/login.defs    The file /etc/login.defs was successfully updated using the replacement policy
A| compliant     checkGenericFileContent   Permission adjustment     /etc/login.defs    The file /etc/login.defs uses default permissions
A| compliant     checkGenericFileContent   Enforce content by secti| /etc/login.defs    The file /etc/login.defs was not set for section edition, skipping
A| compliant     checkGenericFileContent   Post-modification hook    /etc/login.defs    No command for /etc/login.defs was to be executed

## Summary #####################################################################
20 components verified in 7 directives
   => 13 components in Enforce mode
      -> 10 compliant
      -> 1 repaired
      -> 2 not-applicable
   => 7 components in Audit mode
      -> 5 compliant
      -> 1 non-compliant
      -> 1 error
execution time: 3.42s

Files


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #16178: Agent is not correctly aborted when repaired is happening in audit modeReleasedNicolas CHARLESActions
Actions

Also available in: Atom PDF