]> git.ipfire.org Git - thirdparty/systemd.git/commit
execute: check whether the specified fd is a tty before chowning/chmoding it (#3457)
authorLennart Poettering <lennart@poettering.net>
Thu, 9 Jun 2016 08:01:16 +0000 (10:01 +0200)
committerDaniel Mack <github@zonque.org>
Thu, 9 Jun 2016 08:01:16 +0000 (10:01 +0200)
commit1ff74fb6e3243a2ade9ac38aa5effccb25432ad1
tree4ae6d6ffca3550b4bdef36569935a01675f48c8a
parent867476a30a01aeb22cc696bec9f9df788ca58ac1
execute: check whether the specified fd is a tty before chowning/chmoding  it (#3457)

Let's add an extra safety check before we chmod/chown a TTY to the right user,
as we might end up having connected something to STDIN/STDOUT that is actually
not a TTY, even though this might have been requested, due to permissive
StandardInput= settings or transient service activation with fds passed in.

Fixes:

https://bugs.freedesktop.org/show_bug.cgi?id=85255
src/core/execute.c