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
F81663351: D15853.diff
Fri, Apr 19, 3:41 PM
Unknown Object (File)
Feb 22 2024, 1:46 PM
Unknown Object (File)
Feb 3 2024, 10:30 AM
Unknown Object (File)
Jan 27 2024, 1:09 AM
Unknown Object (File)
Jan 27 2024, 1:09 AM
Unknown Object (File)
Jan 27 2024, 1:09 AM
Unknown Object (File)
Jan 27 2024, 1:09 AM
Unknown Object (File)
Jan 27 2024, 12:51 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.