diff --git a/bus/activation-helper.c b/bus/activation-helper.c index 5b6a0908..afe57fd3 100644 --- a/bus/activation-helper.c +++ b/bus/activation-helper.c @@ -32,6 +32,7 @@ #include "activation-helper.h" #include "activation-exit-codes.h" +#include #include #include #include @@ -43,6 +44,7 @@ #include #include #include +#include static BusDesktopFile * desktop_file_for_name (BusConfigParser *parser, @@ -337,11 +339,17 @@ exec_for_correct_user (char *exec, char *user, DBusError *error) char **argv; int argc; dbus_bool_t retval; + const char *error_str = NULL; argc = 0; retval = TRUE; argv = NULL; + /* Resetting the OOM score adjustment is best-effort, so we don't + * treat a failure to do so as fatal. */ + if (!_dbus_reset_oom_score_adj (&error_str)) + _dbus_warn ("%s: %s", error_str, strerror (errno)); + if (!switch_user (user, error)) return FALSE;