Fix limits on reading user policy files.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 23 Jun 2013 22:24:17 +0000 (23:24 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 23 Jun 2013 22:24:17 +0000 (23:24 +0100)
The old code only checked the line code after a successful policy line.
A policy file consisting only of blank lines, comments, and erroneous
lines could cause the daemon to loop forever.

Modify `read_policy_file' to return `T_*' codes (like the comment says
it should!), and handle the various codes in the caller.  Most
particularly, `client_line' gives up after the first error to avoid
spamming the log.  Getting this to work properly involves applying a
different ordering to the `T_*' codes.


No differences found