Skip to content

Comments

Fix: Ignore ENOENT in OS_RemoveCounter to prevent bening error messages#2171

Merged
atomicturtle merged 1 commit intoossec:mainfrom
atomicturtle:key-import-01
Jan 24, 2026
Merged

Fix: Ignore ENOENT in OS_RemoveCounter to prevent bening error messages#2171
atomicturtle merged 1 commit intoossec:mainfrom
atomicturtle:key-import-01

Conversation

@atomicturtle
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves error handling in the OS_RemoveCounter function by suppressing ENOENT (file not found) errors when attempting to unlink counter files. The change prevents benign error messages from being logged when the counter file doesn't exist, which is a valid scenario during agent removal or key management operations.

Changes:

  • Modified OS_RemoveCounter to only log errors when unlinking fails for reasons other than the file not existing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@atomicturtle atomicturtle merged commit 3467bb4 into ossec:main Jan 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant