Skip to content

Commit

Permalink
security: Wrap SMACK and SELINUX audit data structs in ifdefs
Browse files Browse the repository at this point in the history
Wrapped the smack_audit_data and selinux_audit_data
structs in include/linux/lsm_audit.h in ifdefs so that the
union will always be the correct size.

Signed-off-by: Thomas Liu <[email protected]>
Acked-by: Eric Paris <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
Thomas Liu authored and James Morris committed Jul 9, 2009
1 parent d4131de commit 65c3f0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/lsm_audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ struct common_audit_data {
} u;
/* this union contains LSM specific data */
union {
#ifdef CONFIG_SECURITY_SMACK
/* SMACK data */
struct smack_audit_data {
const char *function;
Expand All @@ -76,6 +77,8 @@ struct common_audit_data {
char *request;
int result;
} smack_audit_data;
#endif
#ifdef CONFIG_SECURITY_SELINUX
/* SELinux data */
struct {
u32 ssid;
Expand All @@ -86,6 +89,7 @@ struct common_audit_data {
struct av_decision *avd;
int result;
} selinux_audit_data;
#endif
};
/* these callback will be implemented by a specific LSM */
void (*lsm_pre_audit)(struct audit_buffer *, void *);
Expand Down

0 comments on commit 65c3f0a

Please sign in to comment.