Bug 69081 - pathconf, fpathconf return invalid PATH_MAX
pathconf, fpathconf return invalid PATH_MAX
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: kernel (Show other bugs)
i386 Linux
high Severity high
: ---
: ---
Assigned To: Larry Woodman
Brian Brock
Depends On: 66521
Blocks: 69077
  Show dependency treegraph
Reported: 2002-07-17 14:57 EDT by Matt Wilson
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-06-23 13:57:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matt Wilson 2002-07-17 14:57:43 EDT
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
Comment 1 Jakub Jelinek 2002-07-23 18:04:49 EDT
This has to change in kernel headers first and then glibc must be rebuilt against
the new kernel headers.
Comment 2 Arjan van de Ven 2002-07-24 02:54:12 EDT
changing this changes the filesystem module abi
Comment 3 Matt Wilson 2002-07-30 17:04:52 EDT
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.
Comment 4 Larry Woodman 2003-06-23 13:40:17 EDT
This problem was fixed in as early AS2.1 kernel errata(e.8 I think).

Larry Woodman
Comment 5 Matt Wilson 2003-06-23 13:57:20 EDT

Note You need to log in before you can comment on or make changes to this bug.