diff options
author | Eric Paris <eparis@redhat.com> | 2012-02-14 17:11:07 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2012-02-15 20:01:42 -0500 |
commit | b0d5de4d58803bbcce2b8175a8dd21c559a3abc1 (patch) | |
tree | 08213154dd13ab28eac64e9a87b3a8b7e5660381 /security/integrity | |
parent | bf06189e4d14641c0148bea16e9dd24943862215 (diff) |
IMA: fix audit res field to indicate 1 for success and 0 for failure
The audit res field ususally indicates success with a 1 and 0 for a
failure. So make IMA do it the same way.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/integrity')
-rw-r--r-- | security/integrity/ima/ima_audit.c | 2 | ||||
-rw-r--r-- | security/integrity/ima/ima_policy.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/security/integrity/ima/ima_audit.c b/security/integrity/ima/ima_audit.c index 2ad942fb1e23..21e96bf188df 100644 --- a/security/integrity/ima/ima_audit.c +++ b/security/integrity/ima/ima_audit.c | |||
@@ -61,6 +61,6 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode, | |||
61 | audit_log_untrustedstring(ab, inode->i_sb->s_id); | 61 | audit_log_untrustedstring(ab, inode->i_sb->s_id); |
62 | audit_log_format(ab, " ino=%lu", inode->i_ino); | 62 | audit_log_format(ab, " ino=%lu", inode->i_ino); |
63 | } | 63 | } |
64 | audit_log_format(ab, " res=%d", !result ? 0 : 1); | 64 | audit_log_format(ab, " res=%d", !result); |
65 | audit_log_end(ab); | 65 | audit_log_end(ab); |
66 | } | 66 | } |
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index 0fb643a9c916..d8edff209bf3 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c | |||
@@ -418,7 +418,7 @@ static int ima_parse_rule(char *rule, struct ima_measure_rule_entry *entry) | |||
418 | if (!result && (entry->action == UNKNOWN)) | 418 | if (!result && (entry->action == UNKNOWN)) |
419 | result = -EINVAL; | 419 | result = -EINVAL; |
420 | 420 | ||
421 | audit_log_format(ab, "res=%d", !!result); | 421 | audit_log_format(ab, "res=%d", !result); |
422 | audit_log_end(ab); | 422 | audit_log_end(ab); |
423 | return result; | 423 | return result; |
424 | } | 424 | } |