[libvirt] [PATCH 5/5] Make taint warnings also go into the domain logfile

Eric Blake eblake at redhat.com
Thu May 5 21:06:17 UTC 2011


On 05/05/2011 05:51 AM, Daniel P. Berrange wrote:
> As well as taint warnings going to the main libvirt log,
> add taint warnings to the per-domain logfile
> 
>   Domain id=3 is tainted: high-privileges
>   Domain id=3 is tainted: disk-probing
>   Domain id=3 is tainted: shell-scripts
>   Domain id=3 is tainted: custom-monitor
> 
> * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Enhance
>   qemuDomainTaint to also log to the domain logfile
> * src/qemu/qemu_driver.c: Pass -1 for logFD to taint methods to
>   auto-append to logfile
> * src/qemu/qemu_process.c: Pass open logFD at startup for taint
>   methods
> ---
>  src/qemu/qemu_domain.c  |   44 ++++++++++++++++++++++++++++++++------------
>  src/qemu/qemu_domain.h  |   12 ++++++++----
>  src/qemu/qemu_driver.c  |    6 +++---
>  src/qemu/qemu_process.c |    2 +-
>  4 files changed, 44 insertions(+), 20 deletions(-)

> @@ -909,7 +929,7 @@ int qemuDomainAppendLog(struct qemud_driver *driver,
>          virReportOOMError();
>          goto cleanup;
>      }
> -    if (safewrite(logFD, message, strlen(message)) < 0) {
> +    if (safewrite(fd, message, strlen(message)) < 0) {

Oops. Let's squash this hunk into 4, where it belongs.

ACK, modulo the reshuffling of one hunk.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110505/3f47a173/attachment-0001.sig>


More information about the libvir-list mailing list