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
F103246609: D15853.diff
Fri, Nov 22, 2:36 PM
Unknown Object (File)
Tue, Nov 12, 8:24 PM
Unknown Object (File)
Sep 25 2024, 7:41 AM
Unknown Object (File)
Sep 25 2024, 7:41 AM
Unknown Object (File)
Sep 25 2024, 7:41 AM
Unknown Object (File)
Sep 25 2024, 7:41 AM
Unknown Object (File)
Sep 25 2024, 7:33 AM
Unknown Object (File)
Sep 17 2024, 8:48 PM
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.