LSM: shrink the common_audit_data data union
[firefly-linux-kernel-4.4.55.git] / include / linux / lsm_audit.h
index 6f4fb37aac8866a713849c12d642871eeae7193d..d1b073ffec240ca0a818fe4f9d387faaad2049e8 100644 (file)
 #include <linux/key.h>
 #include <linux/skbuff.h>
 
+struct lsm_network_audit {
+       int netif;
+       struct sock *sk;
+       u16 family;
+       __be16 dport;
+       __be16 sport;
+       union {
+               struct {
+                       __be32 daddr;
+                       __be32 saddr;
+               } v4;
+               struct {
+                       struct in6_addr daddr;
+                       struct in6_addr saddr;
+               } v6;
+       } fam;
+};
 
 /* Auxiliary data to use in generating the audit record. */
 struct common_audit_data {
@@ -41,23 +58,7 @@ struct common_audit_data {
                struct path path;
                struct dentry *dentry;
                struct inode *inode;
-               struct {
-                       int netif;
-                       struct sock *sk;
-                       u16 family;
-                       __be16 dport;
-                       __be16 sport;
-                       union {
-                               struct {
-                                       __be32 daddr;
-                                       __be32 saddr;
-                               } v4;
-                               struct {
-                                       struct in6_addr daddr;
-                                       struct in6_addr saddr;
-                               } v6;
-                       } fam;
-               } net;
+               struct lsm_network_audit *net;
                int cap;
                int ipc_id;
                struct task_struct *tsk;