提交 b0d5de4d 编写于 作者: E Eric Paris 提交者: James Morris

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: NEric Paris <eparis@redhat.com>
Signed-off-by: NMimi Zohar <zohar@us.ibm.com>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 bf06189e
......@@ -61,6 +61,6 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode,
audit_log_untrustedstring(ab, inode->i_sb->s_id);
audit_log_format(ab, " ino=%lu", inode->i_ino);
}
audit_log_format(ab, " res=%d", !result ? 0 : 1);
audit_log_format(ab, " res=%d", !result);
audit_log_end(ab);
}
......@@ -418,7 +418,7 @@ static int ima_parse_rule(char *rule, struct ima_measure_rule_entry *entry)
if (!result && (entry->action == UNKNOWN))
result = -EINVAL;
audit_log_format(ab, "res=%d", !!result);
audit_log_format(ab, "res=%d", !result);
audit_log_end(ab);
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册