]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - security/selinux/include/objsec.h
UBUNTU: SAUCE: LSM stacking: LSM: Manage file security blobs
[mirror_ubuntu-bionic-kernel.git] / security / selinux / include / objsec.h
index 3d54468ce3342851169396813c48fc3a0428a813..8117051eef41aad05ae1202ee544618bd26b87af 100644 (file)
@@ -25,6 +25,9 @@
 #include <linux/binfmts.h>
 #include <linux/in.h>
 #include <linux/spinlock.h>
+#include <linux/lsm_hooks.h>
+#include <linux/msg.h>
+#include <net/sock.h>
 #include <net/net_namespace.h>
 #include "flask.h"
 #include "avc.h"
@@ -155,5 +158,16 @@ struct bpf_security_struct {
 };
 
 extern unsigned int selinux_checkreqprot;
+extern struct lsm_blob_sizes selinux_blob_sizes;
+
+static inline struct task_security_struct *selinux_cred(const struct cred *cred)
+{
+       return cred->security;
+}
+
+static inline struct file_security_struct *selinux_file(const struct file *file)
+{
+       return file->f_security;
+}
 
 #endif /* _SELINUX_OBJSEC_H_ */