1AUDIT_LOG_USER_COMMAND(3)       Linux Audit API      AUDIT_LOG_USER_COMMAND(3)
2
3
4

NAME

6       audit_log_user_command - log a user command
7

SYNOPSIS

9       #include <libaudit.h>
10
11       int audit_log_user_command(int audit_fd, int type, const char *command,
12       const char *tty, int result);
13
14

DESCRIPTION

16       This function will log a command to the audit system using a predefined
17       message  format. It encodes the command as the audit system expects for
18       untrusted strings. This function should be used by  all  apps  need  to
19       record commands. The function parameters are as follows:
20
21       audit_fd - The fd returned by audit_open
22       type - type of message, ex: AUDIT_USYS_CONFIG, AUDIT_USER_LOGIN
23       command - the command being logged
24       tty - The tty of the user, if NULL will attempt to figure out
25       result - 1 is "success" and 0 is "failed"
26
27

RETURN VALUE

29       It  returns  the  sequence  number  which  is > 0 on success or <= 0 on
30       error.
31
32

ERRORS

34       This function returns -1 on failure. Examine errno for more info.
35
36

SEE ALSO

38       audit_log_user_message(3),              audit_log_user_comm_message(3),
39       audit_log_acct_message(3),               audit_log_user_avc_message(3),
40       audit_log_semanage_message(3).
41
42

AUTHOR

44       Steve Grubb
45
46
47
48Red Hat                            Feb 2007          AUDIT_LOG_USER_COMMAND(3)
Impressum