aboutsummaryrefslogtreecommitdiffstats
path: root/libselinux/src/mapping.h
blob: 22a4ccaff0ecae709fb49ed7e9dd9a088c361e1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * This file describes the class and permission mappings used to 
 * hide the kernel numbers from userspace by allowing userspace object
 * managers to specify a list of classes and permissions.
 */
#ifndef _SELINUX_MAPPING_H_
#define _SELINUX_MAPPING_H_

#include <selinux/selinux.h>

/*
 * Get real, kernel values from mapped values
 */

extern security_class_t
unmap_class(security_class_t tclass);

extern access_vector_t
unmap_perm(security_class_t tclass, access_vector_t tperm);

/*
 * Get mapped values from real, kernel values
 */

extern security_class_t
map_class(security_class_t kclass);

extern access_vector_t
map_perm(security_class_t tclass, access_vector_t kperm);

extern void
map_decision(security_class_t tclass, struct av_decision *avd);

#endif				/* _SELINUX_MAPPING_H_ */