From 6e79be5bed0992622a14cc55708b1ba278875198 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 21 Jul 2016 10:55:06 +0100 Subject: [PATCH] _dbus_change_to_daemon_user (audit code path): set DBusError correctly The other error cases here all set the error instead of just warning. Signed-off-by: Simon McVittie --- bus/audit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bus/audit.c b/bus/audit.c index 7705e42..91f2c5c 100644 --- a/bus/audit.c +++ b/bus/audit.c @@ -166,8 +166,9 @@ _dbus_change_to_daemon_user (const char *user, _dbus_strerror (errno)); break; case -5: - _dbus_warn ("Failed to drop supplementary groups: %s\n", - _dbus_strerror (errno)); + dbus_set_error (error, _dbus_error_from_errno (errno), + "Failed to drop supplementary groups: %s", + _dbus_strerror (errno)); break; case -6: dbus_set_error (error, _dbus_error_from_errno (errno), -- 2.8.1