Imported Upstream version 2.4.3
[platform/upstream/audit.git] / docs / audit_open.3
1 .TH "AUDIT_OPEN" "3" "Oct 2006" "Red Hat" "Linux Audit API"
2 .SH NAME
3 audit_open \- Open a audit netlink socket connection
4 .SH "SYNOPSIS"
5 .B #include <libaudit.h>
6 .sp
7 int audit_open (void);
8
9 .SH "DESCRIPTION"
10
11 audit_open creates a NETLINK_AUDIT socket for communication with the kernel part of the Linux Audit Subsystem. The audit system uses the ACK feature of netlink. This means that every message to the kernel will return a netlink status packet even if the operation succeeds.
12
13 .SH "RETURN VALUE"
14
15 Returns \-1 if an error occurs; otherwise, the return value is a descriptor referencing the socket.
16
17 .SH ERRORS
18
19 The
20 .BR audit_open ()
21 function may fail and set
22 .I errno
23 for any of the errors specified for the
24 .BR socket (2)
25 and
26 .BR fcntl (2)
27 routines.
28
29 .SH "SEE ALSO"
30
31 .BR netlink (7).
32
33 .SH AUTHOR
34 Steve Grubb