Imported Upstream version 2.4.3
[platform/upstream/audit.git] / docs / audit_log_semanage_message.3
1 .TH "AUDIT_LOG_SEMANAGE_MESSAGE" "3" "Jan 2012" "Red Hat" "Linux Audit API"
2 .SH NAME
3 audit_log_semanage_message \- log a semanage message
4 .SH SYNOPSIS
5 .B #include <libaudit.h>
6 .sp
7 .B int audit_log_semanage_message(int audit_fd, int type,
8 .B const char *pgname, const char *op, const char *name, unsigned int id,
9 .B const char *new_seuser, const char *new_role, const char *new_range,
10 .B const char *old_seuser, const char *old_role, const char *old_range,
11 .B const char *host, const char *addr, const char *tty, int result)
12
13 .SH DESCRIPTION
14
15 This function will log a message to the audit system using a predefined
16 message format. It should be used for all SE linux user and role
17 manipulation operations. The function parameters are as follows:
18
19 .nf
20 audit_fd - The fd returned by audit_open
21 type - type of message: AUDIT_ROLE_ASSIGN/REMOVE for changing any SE Linux user or role attributes.
22 pgname - program's name
23 op  -  operation. "adding-user", "adding-role", "deleting-user", "deleting-role"
24 name - user's account. If not available use NULL.
25 id  -  uid that the operation is being performed on. This is used only when name is NULL.
26 new_seuser - the new seuser that the login user is getting
27 new_role - the new_role that the login user is getting
28 new_range - the new mls range that the login user is getting
29 old_seuser - the old seuser that the login usr had
30 old_role - the old role that the login user had
31 old_range - the old mls range that the login usr had
32 host - The hostname if known
33 addr - The network address of the user
34 tty  - The tty of the user
35 result - 1 is "success" and 0 is "failed"
36 .fi
37
38 .SH "RETURN VALUE"
39
40 It returns the sequence number which is > 0 on success or <= 0 on error.
41
42 .SH "ERRORS"
43
44 This function returns \-1 on failure. Examine errno for more info.
45
46 .SH "SEE ALSO"
47 .BR audit_log_user_message (3),
48 .BR audit_log_acct_message (3),
49 .BR audit_log_user_avc_message (3),
50 .BR audit_log_user_comm_message (3).
51
52 .SH AUTHOR
53 Steve Grubb