lkml.org 
[lkml]   [2020]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] integrity: Add errno field in audit message
From
Date
On 6/12/20 12:25 PM, Mimi Zohar wrote:

> The idea is a good idea, but you're assuming that "result" is always
> errno.  That was probably true originally, but isn't now.  For
> example, ima_appraise_measurement() calls xattr_verify(), which
> compares the security.ima hash with the calculated file hash.  On
> failure, it returns the result of memcmp().  Each and every code path
> will need to be checked.
>

Good catch Mimi.

Instead of "errno" should we just use "result" and log the value given
in the result parameter?

From the audit field dictionary (link given below) "result" is already
a known field that is used to indicate the result of the audited operation.

@Steve\Paul:
Like "res" is "result" also expected to have only values "0" or "1", or
can it be any result code?

https://github.com/linux-audit/audit-documentation/blob/master/specs/fields/field-dictionary.csv

res alphanumeric result of the audited operation(success/fail)

result alphanumeric result of the audited operation(success/fail)

thanks,
-lakshmi

\
 
 \ /
  Last update: 2020-06-12 21:50    [W:0.098 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site