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 13 /* callback pointers */ 14 extern int __attribute__ ((format(printf, 2, 3))) 15 (*selinux_log) (int type, const char *, ...) ; 16 17 extern int 18 (*selinux_audit) (void *, security_class_t, char *, size_t) ; 19 20 extern int 21 (*selinux_validate)(char **ctx) ; 22 23 extern int 24 (*selinux_netlink_setenforce) (int enforcing) ; 25 26 extern int 27 (*selinux_netlink_policyload) (int seqno) ; 28 29 #endif /* _SELINUX_CALLBACKS_H_ */ 30