From: Mike Yuan Date: Sun, 2 Mar 2025 13:45:28 +0000 (+0100) Subject: run: log about osc_context_open_chpriv() failure X-Git-Tag: v258-rc1~1206^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=02fc6c55e5b1f5ee62ba3702e39b37871dd2193e;p=thirdparty%2Fsystemd.git run: log about osc_context_open_chpriv() failure Follow-up for 575922c914c732bb77c99aee54c84dc365d60631 --- diff --git a/src/run/run.c b/src/run/run.c index 816fd8dd9a4..21d7a94e29f 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -2205,10 +2205,10 @@ static int start_transient_service(sd_bus *bus) { _cleanup_(osc_context_closep) sd_id128_t osc_context_id = SD_ID128_NULL; if (pty_fd >= 0) { - if (!terminal_is_dumb() && arg_exec_user) { + if (arg_exec_user && !terminal_is_dumb()) { r = osc_context_open_chpriv(arg_exec_user, /* ret_seq= */ NULL, &osc_context_id); if (r < 0) - return r; + return log_error_errno(r, "Failed to set OSC context: %m"); } (void) sd_event_set_signal_exit(c.event, true);