diff options
author | Simon McVittie <smcv@collabora.com> | 2023-01-10 11:59:06 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2023-01-10 11:59:06 +0000 |
commit | 218b35a57cdeab667c75d6ef34f901b8ead00056 (patch) | |
tree | 1303ac029aa0732efdf5741fafa1891b52216af0 | |
parent | 237063358edd9175dfee7835cf4e4379edb8ebd2 (diff) | |
parent | 52b73d511b27de1fde3dd075af5d90393a1cd97d (diff) | |
download | dbus-218b35a57cdeab667c75d6ef34f901b8ead00056.tar.gz |
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
-rw-r--r-- | bus/selinux.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bus/selinux.c b/bus/selinux.c index 359f69a7..16665f45 100644 --- a/bus/selinux.c +++ b/bus/selinux.c @@ -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; |