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...
This commit is contained in:
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…
Reference in New Issue
Block a user