16cd6a6acSopenharmony_ci/* 26cd6a6acSopenharmony_ci * This file describes the class and permission mappings used to 36cd6a6acSopenharmony_ci * hide the kernel numbers from userspace by allowing userspace object 46cd6a6acSopenharmony_ci * managers to specify a list of classes and permissions. 56cd6a6acSopenharmony_ci */ 66cd6a6acSopenharmony_ci#ifndef _SELINUX_MAPPING_H_ 76cd6a6acSopenharmony_ci#define _SELINUX_MAPPING_H_ 86cd6a6acSopenharmony_ci 96cd6a6acSopenharmony_ci#include <selinux/selinux.h> 106cd6a6acSopenharmony_ci 116cd6a6acSopenharmony_ci/* 126cd6a6acSopenharmony_ci * Get real, kernel values from mapped values 136cd6a6acSopenharmony_ci */ 146cd6a6acSopenharmony_ci 156cd6a6acSopenharmony_ciextern security_class_t 166cd6a6acSopenharmony_ciunmap_class(security_class_t tclass); 176cd6a6acSopenharmony_ci 186cd6a6acSopenharmony_ciextern access_vector_t 196cd6a6acSopenharmony_ciunmap_perm(security_class_t tclass, access_vector_t tperm); 206cd6a6acSopenharmony_ci 216cd6a6acSopenharmony_ci/* 226cd6a6acSopenharmony_ci * Get mapped values from real, kernel values 236cd6a6acSopenharmony_ci */ 246cd6a6acSopenharmony_ci 256cd6a6acSopenharmony_ciextern security_class_t 266cd6a6acSopenharmony_cimap_class(security_class_t kclass); 276cd6a6acSopenharmony_ci 286cd6a6acSopenharmony_ciextern access_vector_t 296cd6a6acSopenharmony_cimap_perm(security_class_t tclass, access_vector_t kperm); 306cd6a6acSopenharmony_ci 316cd6a6acSopenharmony_ciextern void 326cd6a6acSopenharmony_cimap_decision(security_class_t tclass, struct av_decision *avd); 336cd6a6acSopenharmony_ci 346cd6a6acSopenharmony_ci#endif /* _SELINUX_MAPPING_H_ */ 35