This is the mail archive of the glibc-bugs@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]

[Bug libc/15305] POSIX problem: pathconf/fpathconf modifies errno for XFS filesystems on Linux


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.


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