From: Lennart Poettering Date: Wed, 6 Dec 2023 15:38:53 +0000 (+0100) Subject: execute: improve log message about TTY ownership reset failures X-Git-Tag: v256-rc1~1508 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=026a8b022e1f0883b09d99c360a738506814407a;p=thirdparty%2Fsystemd.git execute: improve log message about TTY ownership reset failures --- diff --git a/src/core/execute.c b/src/core/execute.c index 455d7e80132..ef0bf886874 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1466,7 +1466,7 @@ void exec_context_revert_tty(ExecContext *c) { if (!path) return; - fd = open(path, O_PATH|O_CLOEXEC); + fd = open(path, O_PATH|O_CLOEXEC); /* Pin the inode */ if (fd < 0) return (void) log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_WARNING, errno, "Failed to open TTY inode of '%s' to adjust ownership/access mode, ignoring: %m", @@ -1485,7 +1485,7 @@ void exec_context_revert_tty(ExecContext *c) { r = fchmod_and_chown(fd, TTY_MODE, 0, TTY_GID); if (r < 0) - log_warning_errno(r, "Failed to reset TTY ownership/access mode of %s, ignoring: %m", path); + log_warning_errno(r, "Failed to reset TTY ownership/access mode of %s to " UID_FMT ":" GID_FMT ", ignoring: %m", path, (uid_t) 0, (gid_t) TTY_GID); } int exec_context_get_clean_directories(