|
Message-ID: <20200122205605.GF30412@brightrain.aerifal.cx> Date: Wed, 22 Jan 2020 15:56:05 -0500 From: Rich Felker <dalias@...c.org> To: Florian Weimer <fweimer@...hat.com> Cc: 39236@...bugs.gnu.org, musl@...ts.openwall.com Subject: Re: coreutils cp mishandles error return from lchmod 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? > I also verified that closing an O_PATH descriptor does not release POSIX > advisory locks for the same file. But I'm wondering if there's still > something we are missing. Thanks, I hadn't thought to check that, but wouldn't have expected it to be a problem since O_PATH is not actually open to the file. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.