tools/qvm-sync-clock: don't start clockvm

Since bda9264, a qubes.GetDate call from a VM will not cause clockvm
startup. Also avoid causing it with /etc/cron.d/qubes-sync-clock.cron.

Fixes QubesOS/qubes-issues#3588
This commit is contained in:
Rusty Bird 2018-08-27 23:31:16 +00:00
parent fbdf460db8
commit 8b2b26134e
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

View File

@ -32,6 +32,11 @@ def main():
app = Qubes()
clockvm = app.clockvm
if not clockvm.is_running():
sys.stderr.write('ClockVM {} is not running, aborting.\n'.format(
clockvm.name))
sys.exit(0)
p = clockvm.run_service('qubes.GetDate')
untrusted_date_out = p.stdout.read(25).decode('ascii', errors='strict')
untrusted_date_out = untrusted_date_out.strip()