~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/security/selinux/include/security.h

Version: ~ [ linux-5.9 ] ~ [ linux-5.8.14 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.70 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.150 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.200 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.238 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.238 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Security server interface.
  3  *
  4  * Author : Stephen Smalley, <sds@epoch.ncsc.mil>
  5  */
  6 #ifndef _SELINUX_SECURITY_H_
  7 #define _SELINUX_SECURITY_H_
  8 
  9 #include "flask.h"
 10 
 11 #define SECSID_NULL                     0x00000000 /* unspecified SID */
 12 #define SECSID_WILD                     0xffffffff /* wildcard SID */
 13 #define SECCLASS_NULL                   0x0000 /* no class */
 14 
 15 #define SELINUX_MAGIC 0xf97cff8c
 16 #define POLICYDB_VERSION 15
 17 
 18 #ifdef CONFIG_SECURITY_SELINUX_BOOTPARAM
 19 extern int selinux_enabled;
 20 #else
 21 #define selinux_enabled 1
 22 #endif
 23 
 24 int security_load_policy(void * data, size_t len);
 25 
 26 struct av_decision {
 27         u32 allowed;
 28         u32 decided;
 29         u32 auditallow;
 30         u32 auditdeny;
 31         u32 seqno;
 32 };
 33 
 34 int security_compute_av(u32 ssid, u32 tsid,
 35         u16 tclass, u32 requested,
 36         struct av_decision *avd);
 37 
 38 int security_transition_sid(u32 ssid, u32 tsid,
 39         u16 tclass, u32 *out_sid);
 40 
 41 int security_member_sid(u32 ssid, u32 tsid,
 42         u16 tclass, u32 *out_sid);
 43 
 44 int security_change_sid(u32 ssid, u32 tsid,
 45         u16 tclass, u32 *out_sid);
 46 
 47 int security_sid_to_context(u32 sid, char **scontext,
 48         u32 *scontext_len);
 49 
 50 int security_context_to_sid(char *scontext, u32 scontext_len,
 51         u32 *out_sid);
 52 
 53 int security_get_user_sids(u32 callsid, char *username,
 54                            u32 **sids, u32 *nel);
 55 
 56 int security_port_sid(u16 domain, u16 type, u8 protocol, u16 port,
 57         u32 *out_sid);
 58 
 59 int security_netif_sid(char *name, u32 *if_sid,
 60         u32 *msg_sid);
 61 
 62 int security_node_sid(u16 domain, void *addr, u32 addrlen,
 63         u32 *out_sid);
 64 
 65 #define SECURITY_FS_USE_XATTR 1 /* use xattr */
 66 #define SECURITY_FS_USE_TRANS 2 /* use transition SIDs, e.g. devpts/tmpfs */
 67 #define SECURITY_FS_USE_TASK  3 /* use task SIDs, e.g. pipefs/sockfs */
 68 #define SECURITY_FS_USE_GENFS 4 /* use the genfs support */
 69 #define SECURITY_FS_USE_NONE  5 /* no labeling support */
 70 int security_fs_use(const char *fstype, unsigned int *behavior,
 71         u32 *sid);
 72 
 73 int security_genfs_sid(const char *fstype, char *name, u16 sclass,
 74         u32 *sid);
 75 
 76 #endif /* _SELINUX_SECURITY_H_ */
 77 
 78 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp