Bug 1802018

Summary: glibc: Implement /proc-based fchmodat, lchmod emulation
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: glibcAssignee: Florian Weimer <fweimer>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: aoliva, arjun.is, codonell, dj, fweimer, law, mfabian, pfrankli, rth, siddhesh, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: glibc-2.31.9000-1.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1810141 (view as bug list) Environment:
Last Closed: 2021-05-18 13:16:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1810141    

Description Florian Weimer 2020-02-12 07:50:15 UTC
gnulib has added emulation of lchmod, fchmodat based on /proc, and glibc upstream will do so as well. We need to integrate the glibc changes into Fedora so that GNU applications can be built properly.

Comment 1 Florian Weimer 2020-02-12 11:53:04 UTC
We're hitting an XFS bug in this area: https://www.sourceware.org/ml/libc-alpha/2020-02/msg00467.html

Comment 3 Florian Weimer 2020-03-04 15:30:40 UTC
The kernel bug is worked around with this glibc commit:

commit a492b1e5ef7ab50c6fdd4e4e9879ea5569ab0a6c
Author: Florian Weimer <fweimer>
Date:   Tue Feb 18 17:52:27 2020 +0100

    Linux: Work around kernel bugs in chmod on /proc/self/fd paths [BZ #14578]
    
    It appears that the ability to change symbolic link modes through such
    paths is unintended.  On several file systems, the operation fails with
    EOPNOTSUPP, even though the symbolic link permissions are updated.
    The expected behavior is a failure to update the permissions, without
    file system changes.
    
    Reviewed-by: Matheus Castanho <msc.com>

Comment 4 Florian Weimer 2020-06-09 13:55:58 UTC
I'd really like to wait with the backports until the kernel system call has landed. I've pinged the most recent submission.

Comment 5 Ben Cotton 2020-08-11 13:07:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 6 Florian Weimer 2020-09-15 13:45:22 UTC
Rick Felker posted an implementation of the required system call: https://lore.kernel.org/linux-api/20200910142335.GG3265@brightrain.aerifal.cx/

Comment 7 Florian Weimer 2020-10-13 13:40:03 UTC
Rich Felker's patch was rejected because it did not come with a test case.

We probably need to contribute that test case so that the kernel change can move forward.

Comment 8 Florian Weimer 2021-05-18 13:16:26 UTC
Fixed by:

* Wed Feb 26 2020 Patsy Franklin <patsy> - 2.31.9000-1
- Auto-sync with upstream branch master,
  commit 758599bc9dcc5764e862bd9e1613c5d1e6efc5d3.