dispvm: prevent any output from qfile-daemon-dvm

This script is connected directly to calling process, so any output here
will disrupt qrexec service data. For example in case of qubes.OpenInVM
this will be prepended to modified file while sending it back to the
source VM - in case of no modification, it will override that file in
the source VM...
This commit is contained in:
Marek Marczykowski-Górecki 2015-04-10 19:01:46 +02:00
parent 913cc27023
commit f2aa0f3e2f

View File

@ -111,7 +111,8 @@ class QfileDaemonDvm:
root_mtime = os.stat(dvmdata_dir+'savefile-root').st_mtime root_mtime = os.stat(dvmdata_dir+'savefile-root').st_mtime
if dvm_mtime < root_mtime: if dvm_mtime < root_mtime:
template_name = os.path.basename(os.path.dirname(os.readlink(dvmdata_dir+'savefile-root'))) template_name = os.path.basename(os.path.dirname(os.readlink(dvmdata_dir+'savefile-root')))
if subprocess.call(["xl", "domid", template_name]) == 0: if subprocess.call(["xl", "domid", template_name],
stdout=open(os.devnull, "w")) == 0:
tray_notify("For optimum performance, you should not " tray_notify("For optimum performance, you should not "
"start DispVM when its template is running.", "red") "start DispVM when its template is running.", "red")
return False return False