qvm-prefs: refuse negative 'qrexec_timeout' value

This should be done in QubesVm class (property setter). But since we're
going to rewrite both qvm-prefs and QubesVm, settle on smaller change
for now.

Fixes QubesOS/qubes-issues#1273
This commit is contained in:
Marek Marczykowski-Górecki 2015-10-05 05:54:21 +02:00
parent 0e37ac617a
commit d2617917be
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -461,6 +461,10 @@ def set_qrexec_timeout(vms, vm, args):
print >> sys.stderr, "Missing timeout value (seconds)!"
return False
if int(args[0]) < 0:
print >> sys.stderr, "Negative timeout value not allowed!"
return False
vm.qrexec_timeout = int(args[0])
return True