* NEWS, libmisc/console.c: Fix CONSOLE parser. This caused login

to hang when CONSOLE was configured with a colon separated list of
	TTYs.  See http://bugs.gentoo.org/show_bug.cgi?id=324419
This commit is contained in:
nekral-guest
2010-11-19 21:54:41 +00:00
parent dffc624b37
commit 8b4f07692e
3 changed files with 14 additions and 2 deletions

View File

@ -69,13 +69,15 @@ static bool is_listed (const char *cfgin, const char *tty, bool def)
*/
if (*cons != '/') {
char *pbuf;
strcpy (buf, cons);
while ((s = strtok (buf, ":")) != NULL) {
pbuf = &buf[0];
while ((s = strtok (pbuf, ":")) != NULL) {
if (strcmp (s, tty) == 0) {
return true;
}
cons = NULL;
pbuf = NULL;
}
return false;
}