This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix readdir_r with long file names


On 06/06/2013 11:06 PM, KOSAKI Motohiro wrote:
So, only broken applications may hit this? If so, do you really think
such
broken application checks return code correctly?

There's precedent for my approach in realpath, where we don't use
pathconf(path, _PC_PATH_MAX), either, but cap the path length at
PATH_MAX.

PATH_MAX is used VFS as hard coded limitations. So, I don't think any
Linux filesystem have a long path exceed PATH_MAX.

The canonical name of a file can be longer than PATH_MAX characters. This is probably true for all file systems supported by Linux (with the possible exception of FAT). I don't think Linux enforces a directory nesting limit, but if it does, it is significantly larger than 4095 divided by 255.

You cannot directly open such files, but it's possible to reach them with (potentially multiple) calls to openat.

--
Florian Weimer / Red Hat Product Security Team


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]