]> xenbits.xensource.com Git - libvirt.git/commit
Don't use O_TRUNC when opening QEMU logfiles
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 21 Sep 2012 09:37:53 +0000 (10:37 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 26 Sep 2012 09:37:15 +0000 (10:37 +0100)
commit639d5c4966478d28a96bf06f2ccc9ef6418f4736
tree353af3603707bc0dd6efb955ebc6e0ee9f99e0ac
parent7307c3c00c8e6814a4d413d7dace684e55dea5f8
Don't use O_TRUNC when opening QEMU logfiles

SELinux wants all log files opened with O_APPEND. When
running non-root though, libvirtd likes to use O_TRUNC
to avoid log files growing in size indefinitely. Instead
of using O_TRUNC though, we can use O_APPEND and then
call ftruncate() which keeps SELinux happier.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/qemu/qemu_domain.c