Imported Upstream version 2.4.3
[platform/upstream/audit.git] / docs / audit_log_user_comm_message.3
1 .TH "AUDIT_LOG_USER_COMM_MESSAGE" "3" "Oct 2006" "Red Hat" "Linux Audit API"
2 .SH NAME
3 audit_log_user_comm_message \- log a user message from a console app
4 .SH SYNOPSIS
5 .B #include <libaudit.h>
6 .sp
7 .B int audit_log_user_comm_message(int audit_fd, int type, const char *message,
8 const char *comm, const char *hostname, const char *addr, const char *tty,
9 int result)
10
11 .SH DESCRIPTION
12 This function will log a message to the audit system using a predefined
13 message format. This function should be used by all console apps that do
14 not manipulate accounts or groups and are executing a script. An example
15 would be python or crond wanting to say what they are executing. The function
16 parameters are as follows:
17
18 .nf
19 audit_fd - The fd returned by audit_open
20 type - type of message, ex: AUDIT_USYS_CONFIG, AUDIT_USER_LOGIN
21 message - the message text being sent
22 comm - the program command line name
23 hostname - the hostname if known, NULL if unknown
24 addr - The network address of the user, NULL if unknown
25 tty - The tty of the user, if NULL will attempt to figure out
26 result - 1 is "success" and 0 is "failed"
27 .fi
28
29 .SH "RETURN VALUE"
30
31 It returns the sequence number which is > 0 on success or <= 0 on error.
32
33 .SH "ERRORS"
34
35 This function returns \-1 on failure. Examine errno for more info.
36
37 .SH "SEE ALSO"
38
39 .BR audit_log_user_message (3),
40 .BR audit_log_acct_message (3),
41 .BR audit_log_user_avc_message (3),
42 .BR audit_log_semanage_message (3).
43
44 .SH AUTHOR
45 Steve Grubb