GNU bug report logs - #39236
[musl] coreutils cp mishandles error return from lchmod

Previous Next

Package: coreutils;

Reported by: Florian Weimer <fweimer <at> redhat.com>

Date: Wed, 22 Jan 2020 14:36:02 UTC

Severity: normal

Full log


Message #35 received at 39236 <at> debbugs.gnu.org (full text, mbox):

From: Florian Weimer <fweimer <at> redhat.com>
To: Rich Felker <dalias <at> libc.org>
Cc: musl <at> lists.openwall.com, 39236 <at> debbugs.gnu.org
Subject: Re: [musl] coreutils cp mishandles error return from lchmod
Date: Wed, 22 Jan 2020 22:05:52 +0100
* Rich Felker:

> On Wed, Jan 22, 2020 at 09:48:14PM +0100, Florian Weimer wrote:
>> * Rich Felker:
>> 
>> >> Hmm.  The way I read the musl code, the O_PATH descriptor already
>> >> exists.  At this point, you can just chmod the O_PATH descriptor, and
>> >> have the kernel report EOPNOTSUPP if the file system does not support
>> >> that.
>> >
>> > Oh, you mean the second one after it's already open? Maybe that's ok.
>> 
>> Yes, that's what I meant.
>> 
>> > I was concerned it might follow the link and chmod the target at that
>> > point.
>> 
>> In my tests, it works.  I think it's also documented behavior for chown
>> on these pseudo-files.
>
> Do you know where we might find that documentation?

Ugh.  I'm probably misremembering.  It may have been a rejection of
patch to implement another f*at system call with AT_EMPTY_PATH support.
(I did find your 2013 message describing the chmod and chown behavior.)

Thanks,
Florian





This bug report was last modified 5 years and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.