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