On Monday 14 January 2008 06:06:33 kunal chandarana wrote:
In audit logs one field which is always present is "TYPE".
What does this type indicate ?
It signifies the record's type.
If this type indicates the symbolic constants which are defined in
linux/audit.h then types like USER_AUTH, USER_ACCT, CRED_ACQ etc are not
defined in that particular file.
in audit.h, things are name spaced so they don't collide with defines
elsewhere. They all have an AUDIT_ prefix. So, if you wanted to mape them,
AUDIT_USER_LOGIN would be printed as USER_LOGIN. There is a function that
does this mapping from number to string and another string to number. From
libaudit.h:
extern int audit_name_to_msg_type(const char *msg_type);
extern const char *audit_msg_type_to_name(int msg_type);
You should not have to write this function yourself since the audit libraries
have conversion functions.
-Steve