This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15305] POSIX problem: pathconf/fpathconf modifies errno for XFS filesystems on Linux
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 28 Mar 2013 15:02:15 +0000
- Subject: [Bug libc/15305] POSIX problem: pathconf/fpathconf modifies errno for XFS filesystems on Linux
- Auto-submitted: auto-generated
- References: <bug-15305-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15305
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> 2013-03-28 15:02:15 UTC ---
Jeff,
Thanks for submitting this.
Take care that you're quoting POSIX 2004, and the most recent standard is 2008.
In this case the 2008 standard is still the same.
I agree that there is a problem here and we'll try to fix this for 2.18.
Siddhesh Poyarekar noted that the XFS proc file we check in glibc is now really
out of date e.g.
...
case XFS_SUPER_MAGIC:
/* Read the value from /proc/sys/fs/xfs/restrict_chown. If we cannot
read it default to assume the restriction is in place. */
fd = open_not_cancel_2 ("/proc/sys/fs/xfs/restrict_chown", O_RDONLY);
if (fd != -1)
{
char buf[2];
if (TEMP_FAILURE_RETRY (read_not_cancel (fd, buf, 2)) == 2
&& buf[0] >= '0' && buf[0] <= '1')
retval = buf[0] - '0';
close_not_cancel_no_status (fd);
}
break;
...
The open_not_cancel_2 fails and that sets errno when it shouldn't.
I don't think we've ever had a good test for this.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.