/* Range of policy versions we understand*/ #define POLICYDB_VERSION_MIN POLICYDB_VERSION_BASE #define POLICYDB_VERSION_MAX POLICYDB_VERSION_NEVERAUDIT
/* Mask for just the mount related flags */ #define SE_MNTMASK 0x0f /* Super block security struct flags for mount options */ /* BE CAREFUL, these need to be the low order bits for selinux_get_mnt_opts */ #define CONTEXT_MNT 0x01 #define FSCONTEXT_MNT 0x02 #define ROOTCONTEXT_MNT 0x04 #define DEFCONTEXT_MNT 0x08 #define SBLABEL_MNT 0x10 /* Non-mount related flags */ #define SE_SBINITIALIZED 0x0100 #define SE_SBPROC 0x0200 #define SE_SBGENFS 0x0400 #define SE_SBGENFS_XATTR 0x0800 #define SE_SBNATIVE 0x1000
/* * type_datum properties * available at the kernel policy version >= POLICYDB_VERSION_BOUNDARY
*/ #define TYPEDATUM_PROPERTY_PRIMARY 0x0001 #define TYPEDATUM_PROPERTY_ATTRIBUTE 0x0002
/* limitation of boundary depth */ #define POLICYDB_BOUNDS_MAXDEPTH 4
struct extended_perms {
u16 len; /* length associated decision chain */
u8 base_perms; /* which base permissions are covered */ struct extended_perms_data drivers; /* flag drivers that are used */
};
int security_context_to_sid_force(constchar *scontext, u32 scontext_len,
u32 *sid);
int security_get_user_sids(u32 fromsid, constchar *username, u32 **sids, u32 *nel);
int security_port_sid(u8 protocol, u16 port, u32 *out_sid);
int security_ib_pkey_sid(u64 subnet_prefix, u16 pkey_num, u32 *out_sid);
int security_ib_endport_sid(constchar *dev_name, u8 port_num, u32 *out_sid);
int security_netif_sid(constchar *name, u32 *if_sid);
int security_node_sid(u16 domain, constvoid *addr, u32 addrlen, u32 *out_sid);
int security_validate_transition(u32 oldsid, u32 newsid, u32 tasksid,
u16 tclass);
int security_validate_transition_user(u32 oldsid, u32 newsid, u32 tasksid,
u16 tclass);
int security_bounded_transition(u32 old_sid, u32 new_sid);
int security_sid_mls_copy(u32 sid, u32 mls_sid, u32 *new_sid);
int security_net_peersid_resolve(u32 nlbl_sid, u32 nlbl_type, u32 xfrm_sid,
u32 *peer_sid);
int security_get_classes(struct selinux_policy *policy, char ***classes,
u32 *nclasses); int security_get_permissions(struct selinux_policy *policy, constchar *class, char ***perms, u32 *nperms); int security_get_reject_unknown(void); int security_get_allow_unknown(void);
#define SECURITY_FS_USE_XATTR 1/* use xattr */ #define SECURITY_FS_USE_TRANS 2/* use transition SIDs, e.g. devpts/tmpfs */ #define SECURITY_FS_USE_TASK 3/* use task SIDs, e.g. pipefs/sockfs */ #define SECURITY_FS_USE_GENFS 4/* use the genfs support */ #define SECURITY_FS_USE_NONE 5/* no labeling support */ #define SECURITY_FS_USE_MNTPOINT 6/* use mountpoint labeling */ #define SECURITY_FS_USE_NATIVE 7/* use native label support */ #define SECURITY_FS_USE_MAX 7/* Highest SECURITY_FS_USE_XXX */
int security_fs_use(struct super_block *sb);
int security_genfs_sid(constchar *fstype, constchar *path, u16 sclass,
u32 *sid);
/* * status notifier using mmap interface
*/ externstruct page *selinux_kernel_status_page(void);
#define SELINUX_KERNEL_STATUS_VERSION 1 struct selinux_kernel_status {
u32 version; /* version number of the structure */
u32 sequence; /* sequence number of seqlock logic */
u32 enforcing; /* current setting of enforcing mode */
u32 policyload; /* times of policy reloaded */
u32 deny_unknown; /* current setting of deny_unknown */ /* * The version > 0 supports above members.
*/
} __packed;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.