yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
9ae3a8
From db7dfa77ec3dc8908f3adb94eea121325e8ecda6 Mon Sep 17 00:00:00 2001
9ae3a8
From: Laszlo Ersek <lersek@redhat.com>
9ae3a8
Date: Wed, 18 Sep 2013 16:05:42 +0200
9ae3a8
Subject: [PATCH 27/29] qga: move logfiles to new directory for easier SELinux labeling (RHEL only)
9ae3a8
9ae3a8
RH-Author: Laszlo Ersek <lersek@redhat.com>
9ae3a8
Message-id: <1379520342-23063-1-git-send-email-lersek@redhat.com>
9ae3a8
Patchwork-id: 54449
9ae3a8
O-Subject: [RHEL-7 qemu-kvm PATCH] qga: move logfiles to new directory for easier SELinux labeling (RHEL only)
9ae3a8
Bugzilla: 1009491
9ae3a8
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
9ae3a8
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1009491
9ae3a8
Brew:     https://brewweb.devel.redhat.com/taskinfo?taskID=6300016
9ae3a8
9ae3a8
Tested by me (with manual labeling for now).
9ae3a8
9ae3a8
While discussing RHEL-6 selinux-policy bug 964345 ("SELinux policy
9ae3a8
prevents qemu guest agent from running main fsfreeze hook script, and from
9ae3a8
creating random files"), SELinux developers suggested that the normal qga
9ae3a8
logfile, and the fsfreeze hook logfile (which is new in RHEL-6.5) be moved
9ae3a8
to a dedicated directory for easier SELinux labeling.
9ae3a8
9ae3a8
In RHEL-7 (selinux-policy bug: 1005890) only the fsfreeze hook log exists
9ae3a8
as a separate file; the normal qga log is part of the system journal.
9ae3a8
9ae3a8
RHEL-7 only patch.
9ae3a8
9ae3a8
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
---
9ae3a8
 redhat/qemu-kvm.spec.template          |    4 ++++
9ae3a8
 scripts/qemu-guest-agent/fsfreeze-hook |    2 +-
9ae3a8
 2 files changed, 5 insertions(+), 1 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 redhat/qemu-kvm.spec.template          |    4 ++++
9ae3a8
 scripts/qemu-guest-agent/fsfreeze-hook |    2 +-
9ae3a8
 2 files changed, 5 insertions(+), 1 deletions(-)
9ae3a8
9ae3a8
diff --git a/scripts/qemu-guest-agent/fsfreeze-hook b/scripts/qemu-guest-agent/fsfreeze-hook
9ae3a8
index 45514fa..dba51c4 100755
9ae3a8
--- a/scripts/qemu-guest-agent/fsfreeze-hook
9ae3a8
+++ b/scripts/qemu-guest-agent/fsfreeze-hook
9ae3a8
@@ -7,7 +7,7 @@
9ae3a8
 # "freeze" argument before the filesystem is frozen. And for fsfreeze-thaw
9ae3a8
 # request, it is issued with "thaw" argument after filesystem is thawed.
9ae3a8
 
9ae3a8
-LOGFILE=/var/log/qemu-ga.fsfreeze-hook.log
9ae3a8
+LOGFILE=/var/log/qemu-ga/fsfreeze-hook.log
9ae3a8
 
9ae3a8
 # Check whether file $1 is a backup or rpm-generated file and should be ignored
9ae3a8
 is_ignored_file() {
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8