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)
Tue, May 7, 6:47 PM
Unknown Object (File)
Apr 24 2024, 10:33 PM
Unknown Object (File)
Apr 19 2024, 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
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.