]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
_dbus_change_to_daemon_user (audit code path): set DBusError correctly
authorSimon McVittie <smcv@debian.org>
Thu, 21 Jul 2016 09:55:06 +0000 (10:55 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 12 Aug 2016 16:34:29 +0000 (17:34 +0100)
The other error cases here all set the error instead of just warning.

Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97009

bus/audit.c

index 7705e4250f49836113bced69020383799fa0f1c3..91f2c5cf65eff82814595a6c5dbb786d9f996ff5 100644 (file)
@@ -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),