[libvirt] [PATCH] Don't use O_TRUNC when opening QEMU logfiles
Michal Privoznik
mprivozn at redhat.com
Fri Sep 21 09:49:13 UTC 2012
On 21.09.2012 11:39, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> 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 at redhat.com>
> ---
> src/qemu/qemu_domain.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
ACK
Michal
More information about the libvir-list
mailing list