This revision introduces atf-c(3) tests for 2 Capability mode syscalls and _exit(2).
- cap_enter(2)
- cap_getmode(2)
- _exit(2)
Differential D16099
Introduce tests for Capability mode System calls and _exit(2) aniketp on Jul 2 2018, 5:41 PM. Authored by Tags None Referenced Files
Details This revision introduces atf-c(3) tests for 2 Capability mode syscalls and _exit(2).
Execute make && make install from test/sys/audit.
Diff Detail
Event TimelineComment Actions For me cap_enter_success passes intermittently. On a case when it failed, the global audit trail showed the cap_enter call we were looking for (as well as the child's exit(2), which is also in class "pc"). But the auditpipe showed nothing after fork. I think we're looking at a buffering issue. When I run "./process_control cap_enter_success" the last thing I see is the fork record. Then the process pauses for 10 seconds. But while it's paused, if I run any command at all in another terminal, then the test immediately passes. So I think that the auditpipe(4) device is buffering up some amount of data before its read(2) returns. Comment Actions
Comment Actions using AUDITPIPE_FLUSH doesn't work. You should remove that part and fix the bug in utils.c instead. Comment Actions
Comment Actions There's nothing special about exit or cap_enter. You need to disable buffering everywhere, anytime you combine fread(3) with something like ppoll(2). Comment Actions
This comment was removed by aniketp. |