yeahuh / rpms / qemu-kvm

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