[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG][LIBC] getcwd gives up too easily

From: Ognyan Kulev
Subject: [BUG][LIBC] getcwd gives up too easily
Date: Sat, 08 May 2004 22:27:27 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-0.backports.org.1


getcwd constructs pathname by dir_lookup(".."). When root of translated file system is found, dir_readdir is run for the directory that contains the translator. For each directory entry, dir_lookup is called in order to find the translated node.

The problem is that if dir_lookup fails for some reason, the readdir loop stops and the whole function fails. Imagine we have directories /cdrom and /test, /test is after /cdrom in directory, both has translators attached and /cdrom translator dies (e.g., because there is no cdrom). This means that all calls of getcwd inside /test will fail!

If someone else doesn't do it, I'll provide tested patch next week.


PS Compiling glibc makes me sick. I dream for fixing the Hurd, which compiles for only an hour.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]