Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"protocol not supported" error when CONFIG_AUDIT is disabled #32

Closed
andrewkroh opened this issue May 1, 2018 · 0 comments
Closed

"protocol not supported" error when CONFIG_AUDIT is disabled #32

andrewkroh opened this issue May 1, 2018 · 0 comments
Labels

Comments

@andrewkroh
Copy link
Member

libaudit.NewAuditClient() returns EPROTONOSUPPORT (protocol not supported) if the kernel does not have audit supported compiled in (CONFIG_AUDIT=y). For example, CONFIG_AUDIT is disabled in the Arch Linux kernel packages so a custom kernel is required to use auditing, and anyone who tries to use this library will see "protocol not supported" errors.

When creating the netlink audit socket we can wrap the EPROTONOSUPPORT error in a more informative message to help users.

@andrewkroh andrewkroh added the bug label May 1, 2018
andrewkroh added a commit to andrewkroh/go-libaudit that referenced this issue May 1, 2018
libaudit.NewAuditClient() returns EPROTONOSUPPORT (protocol not supported) if the kernel does not have audit supported compiled in (CONFIG_AUDIT=y).

This change adds "audit not supported by kernel" to the error message when EINVAL, EPROTONOSUPPORT, or EAFNOSUPPORT are returned by the socket syscall.

Fixes elastic#32
@ruflin ruflin closed this as completed in #33 May 3, 2018
ruflin pushed a commit that referenced this issue May 3, 2018
libaudit.NewAuditClient() returns EPROTONOSUPPORT (protocol not supported) if the kernel does not have audit supported compiled in (CONFIG_AUDIT=y).

This change adds "audit not supported by kernel" to the error message when EINVAL, EPROTONOSUPPORT, or EAFNOSUPPORT are returned by the socket syscall.

Fixes #32
andrewkroh added a commit to andrewkroh/beats that referenced this issue May 3, 2018
- Added better error messages for when the auditd module fails due to the
  Linux kernel not supporting auditing (CONFIG_AUDIT=n). elastic/go-libaudit#32
ph pushed a commit to elastic/beats that referenced this issue May 3, 2018
- Added better error messages for when the auditd module fails due to the
  Linux kernel not supporting auditing (CONFIG_AUDIT=n). elastic/go-libaudit#32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant