freebsd-dev/contrib/openbsm/bin
Alan Somers fb2cd86a54 auditd(8): register signal handlers interrutibly
auditd_wait_for_events() relies on read(2) being interrupted by signals,
but it registers signal handlers with signal(3), which sets SA_RESTART.
That breaks asynchronous signal handling. It means that signals don't
actually get handled until after an audit(8) trigger is received.
Symptoms include:

* Sending SIGTERM to auditd doesn't kill it right away; you must send
  SIGTERM and then send a trigger with auditon(2).
* Same with SIGHUP
* Zombie child processes don't get reaped until auditd receives a trigger
  sent by auditon. This includes children created by expiring audit trails
  at auditd startup.

Fix by using sigaction(2) instead of signal(3).

Cherry pick https://github.com/openbsm/openbsm/commit/d060887

PR:		229381
Reviewed by:	cem
Obtained from:	OpenBSM
MFC after:	2 weeks
Differential Revision:	https://github.com/openbsm/openbsm/pull/36
2018-07-03 17:37:16 +00:00
..
audit Merge OpenBSM 1.2-alpha5 from vendor branch to FreeBSD -CURRENT: 2017-03-26 21:14:49 +00:00
auditd auditd(8): register signal handlers interrutibly 2018-07-03 17:37:16 +00:00
auditdistd Merge OpenBSM 1.2-alpha5 from vendor branch to FreeBSD -CURRENT: 2017-03-26 21:14:49 +00:00
auditfilterd Merge OpenBSM 1.2-alpha5 from vendor branch to FreeBSD -CURRENT: 2017-03-26 21:14:49 +00:00
auditreduce Merge OpenBSM 1.2-alpha5 from vendor branch to FreeBSD -CURRENT: 2017-03-26 21:14:49 +00:00
praudit praudit(1): return 0 on success 2018-06-17 17:10:35 +00:00
Makefile.am Merge OpenBSM 1.2 alpha 4. 2015-12-18 09:48:01 +00:00
Makefile.in Merge OpenBSM 1.2-alpha5 from vendor branch to FreeBSD -CURRENT: 2017-03-26 21:14:49 +00:00