123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- #ifndef _SELINUX_OBJSEC_H_
- #define _SELINUX_OBJSEC_H_
- #include <linux/list.h>
- #include <linux/sched.h>
- #include <linux/fs.h>
- #include <linux/binfmts.h>
- #include <linux/in.h>
- #include <linux/spinlock.h>
- #include <net/net_namespace.h>
- #include "security.h"
- struct task_security_struct {
- u32 osid;
- u32 sid;
- u32 exec_sid;
- u32 create_sid;
- u32 keycreate_sid;
- u32 sockcreate_sid;
- };
- enum label_initialized {
- LABEL_INVALID,
- LABEL_INITIALIZED
- };
- struct inode_security_struct {
- struct inode *inode;
- union {
- struct list_head list;
- struct rcu_head rcu;
- };
- u32 task_sid;
- u32 sid;
- u16 sclass;
- unsigned char initialized;
- void *pfk_data;
- struct mutex lock;
- };
- struct file_security_struct {
- u32 sid;
- u32 fown_sid;
- u32 isid;
- u32 pseqno;
- };
- struct superblock_security_struct {
- struct super_block *sb;
- u32 sid;
- u32 def_sid;
- u32 mntpoint_sid;
- unsigned short behavior;
- unsigned short flags;
- struct mutex lock;
- struct list_head isec_head;
- spinlock_t isec_lock;
- };
- struct msg_security_struct {
- u32 sid;
- };
- struct ipc_security_struct {
- u16 sclass;
- u32 sid;
- };
- struct netif_security_struct {
- struct net *ns;
- int ifindex;
- u32 sid;
- };
- struct netnode_security_struct {
- union {
- __be32 ipv4;
- struct in6_addr ipv6;
- } addr;
- u32 sid;
- u16 family;
- };
- struct netport_security_struct {
- u32 sid;
- u16 port;
- u8 protocol;
- };
- struct sk_security_struct {
- #ifdef CONFIG_NETLABEL
- enum {
- NLBL_UNSET = 0,
- NLBL_REQUIRE,
- NLBL_LABELED,
- NLBL_REQSKB,
- NLBL_CONNLABELED,
- } nlbl_state;
- struct netlbl_lsm_secattr *nlbl_secattr;
- #endif
- u32 sid;
- u32 peer_sid;
- u16 sclass;
- };
- struct tun_security_struct {
- u32 sid;
- };
- struct key_security_struct {
- u32 sid;
- };
- struct bpf_security_struct {
- u32 sid;
- };
- extern unsigned int selinux_checkreqprot;
- #endif
|