mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-06 02:18:05 +02:00
Merge branch 'jepio/fix-log-callback-segfault' into 'master'
bus/selinux: Move vsnprintf call to avoid va_list reuse See merge request dbus/dbus!386
This commit is contained in:
commit
218b35a57c
1 changed files with 2 additions and 3 deletions
|
|
@ -114,9 +114,6 @@ log_callback (int type, const char *fmt, ...)
|
|||
* syslog if OOM, like the equivalent AppArmor code does. */
|
||||
char buf[PATH_MAX*2];
|
||||
|
||||
/* FIXME: need to change this to show real user */
|
||||
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case SELINUX_AVC:
|
||||
|
|
@ -139,6 +136,8 @@ log_callback (int type, const char *fmt, ...)
|
|||
}
|
||||
|
||||
if (audit_type > 0) {
|
||||
/* FIXME: need to change this to show real user */
|
||||
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
audit_log_user_avc_message(audit_fd, audit_type, buf, NULL, NULL,
|
||||
NULL, getuid());
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue