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
F103820017: D16035.diff
Fri, Nov 29, 9:07 PM
F103818232: D16035.id44517.diff
Fri, Nov 29, 8:32 PM
Unknown Object (File)
Thu, Nov 28, 8:52 PM
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
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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17672
Build 17477: arc lint + arc unit

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

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

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.