提交 65c3f0a2 编写于 作者: T Thomas Liu 提交者: James Morris

security: Wrap SMACK and SELINUX audit data structs in ifdefs

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: NThomas Liu <tliu@redhat.com>
Acked-by: NEric Paris <eparis@redhat.com>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 d4131ded
......@@ -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;
......@@ -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;
......@@ -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 *);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册