policy.h: Don't allow `user' actions in user policy files.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 21 Oct 2012 14:01:36 +0000 (15:01 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 24 Oct 2012 09:24:31 +0000 (10:24 +0100)
The turtles will overwhelm us.

policy.c

index 06475f3..3d3eedb 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -249,6 +249,7 @@ static int parse_action(FILE *fp, struct action *act)
       m = 0;
       for (;;) {
        if ((t = parse_actname(fp, &a)) != 0) break;
+       if (a == A_USER) return (T_ERROR);
        m |= (1 << a);
       }
       if (t != T_EOL && t != T_EOF) return (t);