libvirt/src/security
Eric Blake 208a044a54 command: properly diagnose process exit via signal
Child processes don't always reach _exit(); if they die from a
signal, then any messages should still be accurate.  Most users
either expect a 0 status (thankfully, if status==0, then
WIFEXITED(status) is true and WEXITSTATUS(status)==0 for all
known platforms) or were filtering on WIFEXITED before printing
a status, but a few were missing this check.  Additionally,
nwfilter_ebiptables_driver was making an assumption that works
on Linux (where WEXITSTATUS shifts and WTERMSIG just masks)
but fails on other platforms (where WEXITSTATUS just masks and
WTERMSIG shifts).

* src/util/command.h (virCommandTranslateStatus): New helper.
* src/libvirt_private.syms (command.h): Export it.
* src/util/command.c (virCommandTranslateStatus): New function.
(virCommandWait): Use it to also diagnose status from signals.
* src/security/security_apparmor.c (load_profile): Likewise.
* src/storage/storage_backend.c
(virStorageBackendQEMUImgBackingFormat): Likewise.
* src/util/util.c (virExecDaemonize, virRunWithHook)
(virFileOperation, virDirCreate): Likewise.
* daemon/remote.c (remoteDispatchAuthPolkit): Likewise.
* src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesExecCLI):
Likewise.
2011-03-25 05:34:48 -06:00
..
security_apparmor.c command: properly diagnose process exit via signal 2011-03-25 05:34:48 -06:00
security_apparmor.h Refactor the security drivers to simplify usage 2011-01-10 18:10:52 +00:00
security_dac.c build: avoid compiler warning on cygwin 2011-03-08 21:56:18 -07:00
security_dac.h Refactor the security drivers to simplify usage 2011-01-10 18:10:52 +00:00
security_driver.c Refactor the security drivers to simplify usage 2011-01-10 18:10:52 +00:00
security_driver.h Add a function to the security driver API that sets the label of an open fd. 2011-01-26 09:03:11 -05:00
security_manager.c Add a function to the security driver API that sets the label of an open fd. 2011-01-26 09:03:11 -05:00
security_manager.h Add a function to the security driver API that sets the label of an open fd. 2011-01-26 09:03:11 -05:00
security_nop.c Add a function to the security driver API that sets the label of an open fd. 2011-01-26 09:03:11 -05:00
security_nop.h Refactor the security drivers to simplify usage 2011-01-10 18:10:52 +00:00
security_selinux.c smartcard: enable SELinux support 2011-02-03 19:28:53 -07:00
security_selinux.h Refactor the security drivers to simplify usage 2011-01-10 18:10:52 +00:00
security_stack.c security: avoid memory leak 2011-02-22 09:50:34 -07:00
security_stack.h Refactor the security drivers to simplify usage 2011-01-10 18:10:52 +00:00
virt-aa-helper.c Put <stdbool.h> into internal.h so it is available everywhere 2011-02-24 12:04:06 +00:00