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

Began looking into updating the project #76

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# pauditd

[![CircleCI](https://circleci.com/gh/pantheon-systems/pauditd/tree/master.svg?style=svg)](https://circleci.com/gh/pantheon-systems/pauditd/tree/master)
[![Unsupported](https://img.shields.io/badge/Pantheon-Unsupported-yellow?logo=pantheon&color=FFDC28)](https://pantheon.io/docs/oss-support-levels#unsupported)

[![Unsupported](https://img.shields.io/badge/Pantheon-Unsupported-yellow?logo=pantheon&color=FFDC28)](https://pantheon.io/docs/oss-support-levels#unsupported) ![GitHub](https://img.shields.io/github/license/pantheon-systems/pauditd?color=FFDC28&logo=go)

## About

pauditd is an alternative to the auditd daemon that ships with many distros.

[![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](http://opensource.org/licenses/MIT)

## Audit Documentation

Kernel Audit System: [audit.c](https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/kernel/audit.c?id=refs/tags/v3.14.56) [audit.h](https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/include/uapi/linux/audit.h?h=linux-3.14.y)
Expand Down Expand Up @@ -175,22 +172,22 @@ This is likely because you are running `journald` which is also reading audit ev
sudo systemctl mask systemd-journald-audit.socket
```

You may have to restart the _systemd-journald.service_ after masking the socket.
You may have to restart the *systemd-journald.service* after masking the socket.

if this problem persists it is because the netlink socket buffers are getting full and the default for overflow is to dump to the kernel logging sub-system. This can be disabled by setting the audit configuration option for what to do when the enqueue on the buffer fails. You can set this setting by using a special audit rule in the `pauditd.yaml` configuration file:

```
```console
-f N
```

Where the `N` is either 0, 1 or 2.

```
```console
0 -> discard
1 -> kernel logging subsystem
2 -> panic
```

## Thanks
## Thank You

To slackhq for the inspiration via https://github.com/slackhq/go-audit
To slackhq for the inspiration via [Slack go-audit](https://github.com/slackhq/go-audit)
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
var Endianness = binary.LittleEndian

const (
// MAX_AUDIT_MESSAGE_LENGTH see http://lxr.free-electrons.com/source/include/uapi/linux/audit.h#L398
MAX_AUDIT_MESSAGE_LENGTH = 8970
// MAX_AUDIT_MESSAGE_LENGTH see https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/uapi/linux/audit.h#n454
MAX_AUDIT_MESSAGE_LENGTH = 8560
)

//TODO: this should live in a marshaller
// TODO: this should live in a marshaller
type AuditStatusPayload struct {
Mask uint32
Enabled uint32
Expand Down
1 change: 1 addition & 0 deletions examples/pauditd.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ socket_buffer:
# Maximum max is net.core.rmem_max (/proc/sys/net/core/rmem_max)
receive: 16384

# Netlink message types and ranges https://github.com/torvalds/linux/blob/master/include/uapi/linux/audit.h#L31-L53
events:
# Minimum event type to capture, default 1300
min: 1300
Expand Down