summaryrefslogtreecommitdiff
path: root/src/callbacks.h
blob: 2a572e08d53490582a5ac2aa67923f5fe1a28490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * This file describes the callbacks passed to selinux_init() and available
 * for use from the library code.  They all have default implementations.
 */
#ifndef _SELINUX_CALLBACKS_H_
#define _SELINUX_CALLBACKS_H_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <selinux/selinux.h>
#include "dso.h"

/* callback pointers */
extern int __attribute__ ((format(printf, 2, 3)))
(*selinux_log) (int type, const char *, ...) hidden;

extern int
(*selinux_audit) (void *, security_class_t, char *, size_t) hidden;

extern int
(*selinux_validate)(char **ctx) hidden;

extern int
(*selinux_netlink_setenforce) (int enforcing) hidden;

extern int
(*selinux_netlink_policyload) (int seqno) hidden;

#endif				/* _SELINUX_CALLBACKS_H_ */