int avc_open(struct selinux_opt *options, unsigned nopt);
initializes the userspace AVC and must be called before any other AVC operation can be performed.
destroys the userspace AVC, freeing all internal memory structures. After this call has been made,
must be called again before any AVC operations can be performed.
flushes the userspace AVC, causing it to forget any cached access decisions. The userspace AVC normally calls this function automatically when needed, see
attempts to free unused memory within the userspace AVC, but does not flush any cached access decisions. Under normal operation, calling this function should not be necessary.
The userspace AVC obeys callbacks set via
in particular the logging and audit callbacks.
The options which may be passed to
include the following:
Beginning with version 2.6.4, the Linux kernel supports SELinux status change notification via netlink. Two message types are currently implemented, indicating changes to the enforcing mode and to the loaded policy in the kernel, respectively. The userspace AVC listens for these messages and takes the appropriate action, modifying the behavior of
to reflect the current enforcing mode and flushing the cache on receipt of a policy load notification. Audit messages are produced when netlink notifications are processed.
Functions with a return value return zero on success. On error, -1 is returned and
is set appropriately.
Eamon Walsh <[email protected]>