]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Don't leak open fd to virsh in libvirt-guests init script
authorJiri Denemark <jdenemar@redhat.com>
Tue, 22 Jun 2010 14:47:02 +0000 (16:47 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 22 Jun 2010 15:48:14 +0000 (17:48 +0200)
Running virsh while having /var/lib/libvirt/libvirt-guests file open
makes SELinux emit messages about preventing virsh from reading that
file. Since virsh doesn't really want to read anything, it's better to
run it with /dev/null on stdin to prevent those messages.

daemon/libvirt-guests.init.in

index 17e68249ef8e170f8a43a0938d868c21e6e7df51..f99c0705c081caacb366e8c8fe6925b16598910a 100644 (file)
@@ -61,7 +61,7 @@ run_virsh() {
         conn="-c $uri"
     fi
 
-    virsh $conn "$@"
+    virsh $conn "$@" </dev/null
 }
 
 run_virsh_c() {