xselinux: send more specific message types to libaudit.

This commit is contained in:
Eamon Walsh 2008-10-30 15:35:33 -04:00
parent 4ce19b4477
commit 0f2fd0577f

View File

@ -657,7 +657,19 @@ SELinuxLog(int type, const char *fmt, ...)
{
va_list ap;
char buf[MAX_AUDIT_MESSAGE_LENGTH];
int rc, aut = AUDIT_USER_AVC;
int rc, aut;
switch (type) {
case SELINUX_INFO:
aut = AUDIT_USER_MAC_POLICY_LOAD;
break;
case SELINUX_AVC:
aut = AUDIT_USER_AVC;
break;
default:
aut = AUDIT_USER_SELINUX_ERR;
break;
}
va_start(ap, fmt);
vsnprintf(buf, MAX_AUDIT_MESSAGE_LENGTH, fmt, ap);