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:
parent
0e37ac617a
commit
d2617917be
@ -461,6 +461,10 @@ def set_qrexec_timeout(vms, vm, args):
|
|||||||
print >> sys.stderr, "Missing timeout value (seconds)!"
|
print >> sys.stderr, "Missing timeout value (seconds)!"
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if int(args[0]) < 0:
|
||||||
|
print >> sys.stderr, "Negative timeout value not allowed!"
|
||||||
|
return False
|
||||||
|
|
||||||
vm.qrexec_timeout = int(args[0])
|
vm.qrexec_timeout = int(args[0])
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user