From: Eric Paris Date: Tue, 20 Apr 2010 14:21:07 +0000 (-0400) Subject: IMA: set entry->action to UNKNOWN rather than hard coding X-Git-Tag: v2.6.35-rc1~488^2^2~30 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b9035b1fd7933c11e68dbbf49b530cc43bf1da65;p=~shefty%2Frdma-dev.git IMA: set entry->action to UNKNOWN rather than hard coding ima_parse_rule currently sets entry->action = -1 and then later tests if (entry->action == UNKNOWN). It is true that UNKNOWN == -1 but actually setting it to UNKNOWN makes a lot more sense in case things change in the future. Signed-off-by: Eric Paris Acked-by: Mimi Zohar Signed-off-by: James Morris --- diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index c771a203669..01270115737 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -264,7 +264,7 @@ static int ima_parse_rule(char *rule, struct ima_measure_rule_entry *entry) ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_INTEGRITY_RULE); entry->uid = -1; - entry->action = -1; + entry->action = UNKNOWN; while ((p = strsep(&rule, " ")) != NULL) { substring_t args[MAX_OPT_ARGS]; int token;