bug-gzip
[Top][All Lists]
Advanced

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

Re: Re: sequence of chmod and chown in unrestricted chown environment


From: Vladimir Marek
Subject: Re: Re: sequence of chmod and chown in unrestricted chown environment
Date: Wed, 10 Jul 2013 09:54:21 +0200
User-agent: Mutt/ (2012-12-30)

> > 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.

That is true (unless the user has special privileges). But the chown
will be executed anyway just in a different sequence, so I don't see the
difference. At least I don't see the difference for Solaris.


> > 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.

I'm on it.

Thank you
-- 
        Vlad



reply via email to

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