Red Hat Bugzilla – Bug 69081
pathconf, fpathconf return invalid PATH_MAX
Last modified: 2007-11-30 17:06:51 EST
pathconf, fpathconf return 4095 for PATH_MAX. The POSIX compliant value (per
the behavior in the kernel) is 4096 (which includes the NULL at the end of the
This has to change in kernel headers first and then glibc must be rebuilt against
the new kernel headers.
changing this changes the filesystem module abi
We don't need to change the value of PATH_MAX in the kernel itself. We just
need to make sure that the value used by userspace matches the behavior of the
All kernel code uses "PATH_MAX + 1" for allocations and checks. This means that
the user space PATH_MAX value, per SUS version 3, MUST be 4096. We can't change
the kernel headers (thus the fs interface) to use PATH_MAX as 4096, because then
the kernel would ACTUALLY be using 4097 as the PATH_MAX when counting the null,
as SUSv3 does.
This problem was fixed in as early AS2.1 kernel errata(e.8 I think).