diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-12-20 16:23:35 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-12-20 16:23:49 -0500 |
commit | 1393a97ea97b5f7d7b90e3e8c58b5996b600e0c6 (patch) | |
tree | 8e5ab18c380b9ef0dda1f83338f99f7f790e5c14 | |
parent | 42802a8e6b3d3795acc4f8b7597ea5a48619b5cd (diff) |
xselinux: Send AVC messages to audit system instead of log file/stderr.
-rw-r--r-- | Xext/xselinux.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Xext/xselinux.c b/Xext/xselinux.c index bbae483a8..bbd8d1a46 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -462,8 +462,12 @@ static int SELinuxLog(int type, const char *fmt, ...) { va_list ap; + char buf[MAX_AUDIT_MESSAGE_LENGTH]; + int rc, aut = AUDIT_USER_AVC; + va_start(ap, fmt); - VErrorF(fmt, ap); + vsnprintf(buf, MAX_AUDIT_MESSAGE_LENGTH, fmt, ap); + rc = audit_log_user_avc_message(audit_fd, aut, buf, NULL, NULL, NULL, 0); va_end(ap); return 0; } |