1 #ifndef _SELINUX_ANDROID_H_ 2 #define _SELINUX_ANDROID_H_ 3 4 #include <sys/types.h> 5 #include <unistd.h> 6 7 #include <selinux/label.h> 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 extern struct selabel_handle* selinux_android_file_context_handle(void); 14 15 extern int selinux_android_load_policy(void); 16 17 extern int selinux_android_reload_policy(void); 18 19 extern int selinux_android_setcontext(uid_t uid, 20 int isSystemServer, 21 const char *seinfo, 22 const char *name); 23 24 extern int selinux_android_setfilecon(const char *pkgdir, 25 const char *pkgname, 26 uid_t uid); 27 28 extern int selinux_android_setfilecon2(const char *pkgdir, 29 const char *pkgname, 30 const char *seinfo, 31 uid_t uid); 32 33 extern int selinux_android_restorecon(const char *file); 34 35 extern int selinux_android_seapp_context_reload(void); 36 37 #ifdef __cplusplus 38 } 39 #endif 40 #endif 41