diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..73f5dd8 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,4 @@ +{ + "name": "pauditd", + "image": "golang:1.13.15" +} \ No newline at end of file diff --git a/client.go b/client.go index 86c3f4a..1fa2c94 100644 --- a/client.go +++ b/client.go @@ -20,7 +20,7 @@ const ( MAX_AUDIT_MESSAGE_LENGTH = 8970 ) -//TODO: this should live in a marshaller +// TODO: this should live in a marshaller type AuditStatusPayload struct { Mask uint32 Enabled uint32 @@ -129,7 +129,7 @@ func (n *NetlinkClient) Receive() (*syscall.NetlinkMessage, error) { return nil, errors.New("Got a 0 length packet") } - msg := syscall.NetlinkMessage{ + msg := &syscall.NetlinkMessage{ Header: syscall.NlMsghdr{ Len: Endianness.Uint32(n.buf[0:4]), Type: Endianness.Uint16(n.buf[4:6]), diff --git a/client_test.go b/client_test.go index 7079174..689bed6 100644 --- a/client_test.go +++ b/client_test.go @@ -41,7 +41,7 @@ func TestNetlinkClient_KeepConnection(t *testing.T) { func TestNetlinkClient_SendReceive(t *testing.T) { var err error - var msg syscall.NetlinkMessage + var msg *syscall.NetlinkMessage // Build our client n := makeNelinkClient(t)