1 /* 2 * This file describes the callbacks passed to selinux_init() and available 3 * for use from the library code. They all have default implementations. 4 */ 5 #ifndef _SELINUX_CALLBACKS_H_ 6 #define _SELINUX_CALLBACKS_H_ 7 8 #include <stdio.h> 9 #include <stdlib.h> 10 #include <string.h> 11 #include <selinux/selinux.h> 12 #include "dso.h" 13 14 /* callback pointers */ 15 extern int __attribute__ ((format(printf, 2, 3))) 16 (*selinux_log) (int type, const char *, ...) hidden; 17 18 extern int 19 (*selinux_audit) (void *, security_class_t, char *, size_t) hidden; 20 21 extern int 22 (*selinux_validate)(char **ctx) hidden; 23 24 extern int 25 (*selinux_netlink_setenforce) (int enforcing) hidden; 26 27 extern int 28 (*selinux_netlink_policyload) (int seqno) hidden; 29 30 #endif /* _SELINUX_CALLBACKS_H_ */ 31