Page MenuHomeFreeBSD

audit(4): Add tests for connect(2), connectat(2) and accept(2)
ClosedPublic

Authored by aniketp on Jun 16 2018, 5:01 PM.
Tags
None
Referenced Files
F170683099: D15853.id43907.diff
Sun, Sep 6, 12:28 AM
F170643769: D15853.id43951.diff
Sat, Sep 5, 7:01 PM
F170628126: D15853.id43907.diff
Sat, Sep 5, 5:21 PM
Unknown Object (File)
Fri, Sep 4, 11:29 PM
Unknown Object (File)
Fri, Sep 4, 9:59 PM
Unknown Object (File)
Fri, Sep 4, 11:49 AM
Unknown Object (File)
Fri, Sep 4, 6:35 AM
Unknown Object (File)
Fri, Sep 4, 5:49 AM
Subscribers

Details

Summary

This revision introduces atf-c(3) test cases to check the auditablity of 3 system calls
classified in nework audit class, in both success and failure mode
The system calls are:

  • connect(2)
  • connectat(2)
  • accept(2)
Test Plan

Execute make install from usr.sbin/praudit/tests.
Execute kyua test from /usr/test/usr.sbin/praudit. The test case should succeed.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17376
Build 17209: arc lint + arc unit

Event Timeline

asomers requested changes to this revision.Jun 17 2018, 3:37 PM
asomers added inline comments.
tests/sys/audit/network.c
409

You can combine the socket and fcntl calls by putting SOCK_NONBLOCK in socket's type argument.

457

0 is standard input. Better to use -1 for the bad file descriptor.

566

Since you don't use client, you may as well set it to NULL.

This revision now requires changes to proceed.Jun 17 2018, 3:37 PM

Changes as suggested in the review

This revision is now accepted and ready to land.Jun 17 2018, 5:41 PM
This revision was automatically updated to reflect the committed changes.