Re: new module write-any-file

2007-03-29 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: >> Perhaps it's the "else #else" which confused you? (It certainly confuses >> me...) > > If it confuses even you, then it's late time to make this code more > readable! OK, thanks, I installed this. It's not exactly what you recommended, but it should b

Re: new module write-any-file

2007-03-29 Thread Bruno Haible
Paul Eggert wrote: > > And if priv_allocset succeeds, it will not cache the result, > > but instead redo the same system calls next time. Is this intentional? > > I don't follow this point; it looks to me like it caches. When priv_allocset is callable, the function looks like this: bool can_wr

Re: new module write-any-file

2007-03-29 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > - The code uses the Solaris 10 APIs. How about also using the Linux API > for "capabilities" - capget() - that was added in Linux 2.2 and glibc-2.1.x? Thanks, I wasn't aware of this API. That would be nice to add. > - If priv_allocset fails, the func

Re: new module write-any-file

2007-03-23 Thread Bruno Haible
Hello Paul, Please accept some nitpicking: - The code uses the Solaris 10 APIs. How about also using the Linux API for "capabilities" - capget() - that was added in Linux 2.2 and glibc-2.1.x? - If priv_allocset fails, the function returns false without considering geteuid (). And if priv_alloc