blob: 2a572e08d53490582a5ac2aa67923f5fe1a28490 [file] [log] [blame]
Joshua Brindle13cd4c82008-08-19 15:30:36 -04001/*
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 */
15extern int __attribute__ ((format(printf, 2, 3)))
16(*selinux_log) (int type, const char *, ...) hidden;
17
18extern int
19(*selinux_audit) (void *, security_class_t, char *, size_t) hidden;
20
21extern int
Stephen Smalley9eb9c932014-02-19 09:16:17 -050022(*selinux_validate)(char **ctx) hidden;
Joshua Brindle13cd4c82008-08-19 15:30:36 -040023
KaiGai Kohei318748d2009-04-07 21:47:52 -040024extern int
25(*selinux_netlink_setenforce) (int enforcing) hidden;
26
27extern int
28(*selinux_netlink_policyload) (int seqno) hidden;
29
Joshua Brindle13cd4c82008-08-19 15:30:36 -040030#endif /* _SELINUX_CALLBACKS_H_ */