Bug 69081 - pathconf, fpathconf return invalid PATH_MAX
Summary: pathconf, fpathconf return invalid PATH_MAX
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: kernel
Version: 2.1
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Larry Woodman
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On: 66521
Blocks: 69077
TreeView+ depends on / blocked
 
Reported: 2002-07-17 18:57 UTC by Matt Wilson
Modified: 2007-11-30 22:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-06-23 17:57:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Matt Wilson 2002-07-17 18:57:43 UTC
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
path).

Comment 1 Jakub Jelinek 2002-07-23 22:04:49 UTC
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 06:54:12 UTC
changing this changes the filesystem module abi

Comment 3 Matt Wilson 2002-07-30 21:04:52 UTC
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
kernel.

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 17:40:17 UTC
This problem was fixed in as early AS2.1 kernel errata(e.8 I think).

Larry Woodman


Comment 5 Matt Wilson 2003-06-23 17:57:20 UTC
correct.



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