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
والد 0e37ac617a
کامیت d2617917be
هیچ کلید شناخته شده ای برای این امضا در پایگاه داده ها یافت نشد
شناسه کلید GPG: 063938BA42CFA724

مشاهده پرونده

@ -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