qrexec-policy: warn if some data is ignored

Something like vm1 vm2 allow, user=foo would be 4 items,
and the user part would be ignored by the parser.
It might or might not be better to error out instead of
just warning, though...
release2
Vincent Penquerc'h 11 years ago committed by Marek Marczykowski-Górecki
parent 7ad1183793
commit 97c7c97420

@ -38,6 +38,11 @@ def line_to_dict(line):
paramval=iter.split("=")
dict["action."+paramval[0]]=paramval[1]
# Warn if we're ignoring extra data after a space, such as:
# vm1 vm2 allow, user=foo
if len(tokens) > 3:
print >>sys.stderr, "Trailing data ignored in %s" % line
return dict

Loading…
Cancel
Save