Debian Codegraph @

include/sepol/policydb/flask_types.h

raw
1 /* -*- linux-c -*- */
2
3 /*
4 * Author : Stephen Smalley, <[email protected]>
5 */
6
7 #ifndef _SEPOL_POLICYDB_FLASK_TYPES_H_
8 #define _SEPOL_POLICYDB_FLASK_TYPES_H_
9
10 /*
11 * The basic Flask types and constants.
12 */
13
14 #include <sys/types.h>
15 #include <stdint.h>
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 /*
22 * A security context is a set of security attributes
23 * associated with each subject and object controlled
24 * by the security policy. The security context type
25 * is defined as a variable-length string that can be
26 * interpreted by any application or user with an
27 * understanding of the security policy.
28 */
29 typedef char *sepol_security_context_t;
30 typedef const char *sepol_const_security_context_t;
31
32 /*
33 * An access vector (AV) is a collection of related permissions
34 * for a pair of SIDs. The bits within an access vector
35 * are interpreted differently depending on the class of
36 * the object. The access vector interpretations are specified
37 * in policy.
38 */
39 typedef uint32_t sepol_access_vector_t;
40
41 /*
42 * Each object class is identified by a fixed-size value.
43 * The set of security classes is specified in policy.
44 */
45 typedef uint16_t sepol_security_class_t;
46 #define SEPOL_SECCLASS_NULL 0x0000 /* no class */
47
48 #define SELINUX_MAGIC 0xf97cff8c
49 #define SELINUX_MOD_MAGIC 0xf97cff8d
50
51 typedef uint32_t sepol_security_id_t;
52 #define SEPOL_SECSID_NULL 0
53
54 struct sepol_av_decision {
55 sepol_access_vector_t allowed;
56 sepol_access_vector_t decided;
57 sepol_access_vector_t auditallow;
58 sepol_access_vector_t auditdeny;
59 uint32_t seqno;
60 };
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif