Skip to content

Commit

Permalink
IMA: reject policies with unknown entries
Browse files Browse the repository at this point in the history
Currently the ima policy load code will print what it doesn't understand
but really I think it should reject any policy it doesn't understand.  This
patch makes it so!

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Eric Paris authored and James Morris committed Apr 20, 2010
1 parent b9035b1 commit e9d393b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions security/integrity/ima/ima_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ static int ima_parse_rule(char *rule, struct ima_measure_rule_entry *entry)
AUDIT_SUBJ_TYPE);
break;
case Opt_err:
result = -EINVAL;
audit_log_format(ab, "UNKNOWN=%s ", p);
break;
}
Expand Down

0 comments on commit e9d393b

Please sign in to comment.