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.
This commit is contained in:
parent
4bf953d91b
commit
955f1c852e
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue