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
Unknown Object (File)
Thu, Jul 23, 2:09 PM
Unknown Object (File)
Thu, Jul 16, 4:01 AM
Unknown Object (File)
Tue, Jul 14, 2:27 PM
Unknown Object (File)
Sun, Jul 5, 8:41 AM
Unknown Object (File)
Sun, Jul 5, 2:41 AM
Unknown Object (File)
Sat, Jul 4, 5:17 AM
Unknown Object (File)
Fri, Jul 3, 3:44 AM
Unknown Object (File)
Thu, Jul 2, 9:09 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

asomers requested changes to this revision.Jun 17 2018, 3:37 PM
asomers added inline comments.
tests/sys/audit/network.c
409 ↗(On Diff #43907)

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

457 ↗(On Diff #43907)

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

566 ↗(On Diff #43907)

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.