From: Lennart Poettering Date: Wed, 20 Mar 2019 20:18:59 +0000 (+0100) Subject: execute: use path_equal() to compare tty names X-Git-Tag: v242-rc1~96^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=955f1c852edef4c925ae021d49257c09573abb2c;p=thirdparty%2Fsystemd.git execute: use path_equal() to compare tty names After all they might be strings such as pts/1 which we really should consider the same as pts//1. --- diff --git a/src/core/execute.c b/src/core/execute.c index d46476630cc..ac741c2772c 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -4157,7 +4157,7 @@ static bool tty_may_match_dev_console(const char *tty) { return true; /* if we could not resolve, assume it may */ /* "tty0" means the active VC, so it may be the same sometimes */ - return streq(resolved, tty) || (streq(resolved, "tty0") && tty_is_vc(tty)); + return path_equal(resolved, tty) || (streq(resolved, "tty0") && tty_is_vc(tty)); } bool exec_context_may_touch_console(const ExecContext *ec) {