libtt: Avoid an infinite loop in ttsession (tooltalk daemon) when /etc/mtab is a symlink, using lstat instead of stat.
Patch from Frederic Koehler <f.koehler427@gmail.com>
This commit is contained in:
parent
a7562a8009
commit
b49872206b
|
|
@ -427,9 +427,10 @@ updateFileSystemEntries ()
|
|||
pollfd poll_fd;
|
||||
while (mount_table_stat.st_size == 0) {
|
||||
(void)poll (&poll_fd, 0, 100);
|
||||
if (stat(TtMntTab, &mount_table_stat)) {
|
||||
// Must use lstat here; mtab is often a symlink
|
||||
if (lstat(TtMntTab, &mount_table_stat)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FILE *mount_table = ttOpenMntTbl(TtMntTab, "r");
|
||||
|
|
|
|||
Loading…
Reference in New Issue