bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sequence of chmod and chown in unrestricted chown environment


From: Paul Eggert
Subject: Re: sequence of chmod and chown in unrestricted chown environment
Date: Tue, 09 Jul 2013 07:54:54 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7

On 07/09/2013 03:46 AM, Vladimir Marek wrote:
> Right. On the other hand, doing always chmod before chown on Solaris
> would also work, if I understand things correctly.

But chown sometimes fiddles with setuid and setgid bits, and when it
does that, that would introduce a bug.

> Sure. It's detectable by pathconf(2) syscall, looking for
> _PC_CHOWN_RESTRICTED. If you will consider such a change I'm more than
> happy to work on the implementation.

That sounds like the right way to go.  Of course systems lacking
_PC_CHOWN_RESTRICTED could simply behave as now.  If the fix is
trivial (less than 10 lines) please just submit it.  If not,
please let me know, and I'll send you the copyright paperwork
form.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]