integrity: Report error code in integrity_audit_msg() call sites

integrity_audit_msg() hides error codes by wrapping
integrity_audit_message() which obfuscates the underlying reason for the
failure.

Update integrity_audit_msg() to take a errno argument, and pass that
through to integrity_audit_message(). Then update call sites to
take caller's respective error codes.

ima_appraise_measurement() stores xattr_len as the return code, but
can replace it with a error code later. Therefore conditionally use
a code if rc < 0, otherwise report zero. Lastly, conditionally use
-EINVAL for ima_release_policy().

Signed-off-by: Frederick Lawler <fred@cloudflare.com>
Reviewed-by: Enrico Bravi <enrico.bravi@polito.it>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
11 files changed