Skip to content

Commit 8e71168

Browse files
WOnder93pcmoore
authored andcommitted
lsm_audit: avoid overloading the "key" audit field
The "key" field is used to associate records with the rule that triggered them, os it's not a good idea to overload it with an additional IPC key semantic. Moreover, as the classic "key" field is a text field, while the IPC key is numeric, AVC records containing the IPC key info actually confuse audit userspace, which tries to interpret the number as a hex-encoded string, thus showing garbage for example in the ausearch "interpret" output mode. Hence, change it to "ipc_key" to fix both issues and also make the meaning of this field more clear. Signed-off-by: Ondrej Mosnacek <[email protected]> Reviewed-by: Richard Guy Briggs <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent d680c6b commit 8e71168

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/lsm_audit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static void dump_common_audit_data(struct audit_buffer *ab,
224224
case LSM_AUDIT_DATA_NONE:
225225
return;
226226
case LSM_AUDIT_DATA_IPC:
227-
audit_log_format(ab, " key=%d ", a->u.ipc_id);
227+
audit_log_format(ab, " ipc_key=%d ", a->u.ipc_id);
228228
break;
229229
case LSM_AUDIT_DATA_CAP:
230230
audit_log_format(ab, " capability=%d ", a->u.cap);

0 commit comments

Comments
 (0)