This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: XFS reports lchmod failure, but changes file system contents
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Christoph Hellwig <hch at infradead dot org>
- Cc: "Darrick J. Wong" <darrick dot wong at oracle dot com>, linux-xfs at vger dot kernel dot org, libc-alpha at sourceware dot org, linux-fsdevel at vger dot kernel dot org, viro at zeniv dot linux dot org dot uk
- Date: Wed, 12 Feb 2020 19:50:01 +0100
- Subject: Re: XFS reports lchmod failure, but changes file system contents
- References: <874kvwowke.fsf@mid.deneb.enyo.de> <20200212161604.GP6870@magnolia> <20200212181128.GA31394@infradead.org>
* Christoph Hellwig:
> xfs doesn't seem all that different from the other file systems,
> so I suspect you'll also see it with other on-disk file systems.
> We probably need a check high up in the chmod and co code to reject
> the operation early for O_PATH file descriptors pointing to symlinks.
We will change the glibc emulation to avoid trying to lchmod symbolic
links in this way. This will avoid triggering the kernel bug.
(We'd really like to get a proper fchmodat system call with a flags
argument, though, for AT_EMPTY_PATH and AT_SYMLINK_NOFOLLOW.)
And part of my testing was wrong, this is a symbolic-link-only issue.