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

RETURN VALUE

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

ERRORS

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

SEE ALSO

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

AUTHOR

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