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)
Mar 11 2024, 3:07 PM
Unknown Object (File)
Mar 11 2024, 2:45 PM
Unknown Object (File)
Dec 20 2023, 1:50 AM
Unknown Object (File)
Dec 10 2023, 6:18 PM
Unknown Object (File)
Dec 6 2023, 11:00 PM
Unknown Object (File)
Nov 26 2023, 12:50 AM
Unknown Object (File)
Nov 25 2023, 2:59 AM
Unknown Object (File)
Nov 22 2023, 10: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.