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

2013-08-19 Thread Vladimir Marek
Hi, I'm sorry for being silent for such a long time. At the end the customer decided that he does not want the fix. So I won't push either. For the record, to test whether chown and chmod operation should be swapped one can use if (pathconf(ifname, _PC_CHOWN_RESTRICTED) == -1 && errno == 0) Tha

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

2013-07-10 Thread Vladimir Marek
> > 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).

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

2013-07-09 Thread Vladimir Marek
Hi, > > On solaris you can mount given filesystem with norstchown parameter > > which gives the owner of the file the ability to chown the file to > > someone else. > > Yes, that's true. But this is unusual -- I've never > seen it done, and I've used a lot of Solaris systems. > Who uses it and w