Page MenuHomeFreeBSD

audit(4): Add tests for setsid(2), wait4(2), wait6(2) and kill(2)
ClosedPublic

Authored by aniketp on Jun 27 2018, 11:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 16 2024, 9:25 AM
Unknown Object (File)
Oct 16 2024, 9:25 AM
Unknown Object (File)
Oct 16 2024, 9:24 AM
Unknown Object (File)
Oct 16 2024, 9:24 AM
Unknown Object (File)
Oct 16 2024, 9:24 AM
Unknown Object (File)
Oct 16 2024, 8:54 AM
Unknown Object (File)
Oct 11 2024, 4:30 AM
Unknown Object (File)
Oct 1 2024, 4:07 AM
Subscribers

Details

Summary

This revision introduces atf-c(3) tests for verifying the proper auditability for
syscalls categorized within process-control audit class.
List of syscalls:

  • setsid(2)
  • wait4(2)
  • wait6(2)
  • kill(2)
Test Plan

Execute make && make install from test/sys/audit.
Execute kyua test from /usr/tests/sys/audit. All testcases 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 27 2018, 3:37 PM
asomers added inline comments.
tests/sys/audit/process-control.c
986 ↗(On Diff #44517)

This assumes too much about Kyua's execution model. You shouldn't assume that it's already a process group leader. For example, if you invoke the test as sudo ./process-control setsid_failure, then it will fail.

This revision now requires changes to proceed.Jun 27 2018, 3:37 PM
  • Call setsid() prematurely to intentionally fail the tests
asomers requested changes to this revision.Jun 27 2018, 4:59 PM
asomers added inline comments.
tests/sys/audit/process-control.c
982 ↗(On Diff #44536)

This should work. But I would prefer a comment that indicates that we're intentionally ignoring the output of the first setsid call, because we don't know whether we're already a session leader.

This revision now requires changes to proceed.Jun 27 2018, 4:59 PM
  • Update comment explaining why we are ignoring the output of first setsid()
This revision is now accepted and ready to land.Jun 29 2018, 4:37 AM
This revision was automatically updated to reflect the committed changes.