Skip to content

Commit

Permalink
LSM Audit: rename LSM_AUDIT_NO_AUDIT to LSM_AUDIT_DATA_NONE
Browse files Browse the repository at this point in the history
Most of the LSM common audit work uses LSM_AUDIT_DATA_* for the naming.
This was not so for LSM_AUDIT_NO_AUDIT which means the generic initializer
cannot be used.  This patch just renames the flag so the generic
initializer can be used.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
eparis authored and James Morris committed Apr 27, 2010
1 parent b03df87 commit cb84aa9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/linux/lsm_audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct common_audit_data {
#define LSM_AUDIT_DATA_IPC 4
#define LSM_AUDIT_DATA_TASK 5
#define LSM_AUDIT_DATA_KEY 6
#define LSM_AUDIT_NO_AUDIT 7
#define LSM_AUDIT_DATA_NONE 7
#define LSM_AUDIT_DATA_KMOD 8
struct task_struct *tsk;
union {
Expand Down
2 changes: 1 addition & 1 deletion security/lsm_audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static void dump_common_audit_data(struct audit_buffer *ab,
}

switch (a->type) {
case LSM_AUDIT_NO_AUDIT:
case LSM_AUDIT_DATA_NONE:
return;
case LSM_AUDIT_DATA_IPC:
audit_log_format(ab, " key=%d ", a->u.ipc_id);
Expand Down
3 changes: 1 addition & 2 deletions security/selinux/avc.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,7 @@ void avc_audit(u32 ssid, u32 tsid,
return;
if (!a) {
a = &stack_data;
memset(a, 0, sizeof(*a));
a->type = LSM_AUDIT_NO_AUDIT;
COMMON_AUDIT_DATA_INIT(a, NONE);
}
a->selinux_audit_data.tclass = tclass;
a->selinux_audit_data.requested = requested;
Expand Down

0 comments on commit cb84aa9

Please sign in to comment.