Joshua Brindle | 13cd4c8 | 2008-08-19 15:30:36 -0400 | [diff] [blame] | 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 |
Stephen Smalley | 9eb9c93 | 2014-02-19 09:16:17 -0500 | [diff] [blame] | 22 | (*selinux_validate)(char **ctx) hidden; |
Joshua Brindle | 13cd4c8 | 2008-08-19 15:30:36 -0400 | [diff] [blame] | 23 | |
KaiGai Kohei | 318748d | 2009-04-07 21:47:52 -0400 | [diff] [blame] | 24 | extern int |
| 25 | (*selinux_netlink_setenforce) (int enforcing) hidden; |
| 26 | |
| 27 | extern int |
| 28 | (*selinux_netlink_policyload) (int seqno) hidden; |
| 29 | |
Joshua Brindle | 13cd4c8 | 2008-08-19 15:30:36 -0400 | [diff] [blame] | 30 | #endif /* _SELINUX_CALLBACKS_H_ */ |