Don't log audit messages when -audit 0 specified

make the auditTrailLevel check more general and don't log when not
using DTRACE and -audit 0 is set.
This commit is contained in:
Francis Giraldeau 2008-12-17 09:49:39 +02:00 committed by Timo Aaltonen
parent 295a3fa721
commit d61e902aab

View File

@ -602,8 +602,8 @@ AuthAudit (ClientPtr client, Bool letin,
#ifdef XSERVER_DTRACE
XSERVER_CLIENT_AUTH(client->index, addr, client_pid, client_zid);
if (auditTrailLevel > 1) {
#endif
if (auditTrailLevel > 1) {
if (proto_n)
AuditF("client %d %s from %s%s\n Auth name: %.*s ID: %d\n",
client->index, letin ? "connected" : "rejected", addr,
@ -613,9 +613,7 @@ AuthAudit (ClientPtr client, Bool letin,
client->index, letin ? "connected" : "rejected", addr,
client_uid_string);
#ifdef XSERVER_DTRACE
}
#endif
}
XID