Skip to content

Commit

Permalink
tests + add devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
rkanson committed Jul 16, 2024
1 parent 295624b commit 1d05e85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "pauditd",
"image": "golang:1.13.15"
}
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]),
Expand Down
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1d05e85

Please sign in to comment.