From 955f1c852edef4c925ae021d49257c09573abb2c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 20 Mar 2019 21:18:59 +0100 Subject: [PATCH] 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. --- src/core/execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/execute.c b/src/core/execute.c index d46476630c..ac741c2772 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) {