* libmisc/console.c (console): Remove the leading /dev/ from the
tty before comparing with the lines specified by CONSOLE. * src/su.c: Do not remove the /dev/ prefix since it is done by console().
This commit is contained in:
@ -121,6 +121,10 @@ static bool is_listed (const char *cfgin, const char *tty, bool def)
|
||||
|
||||
bool console (const char *tty)
|
||||
{
|
||||
if (strncmp (tty, "/dev/", 5) == 0) {
|
||||
tty += 5;
|
||||
}
|
||||
|
||||
return is_listed ("CONSOLE", tty, true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user