Re: [PATCHES] glibc 2.1, Linux, and chown
>>>>> "RH" == Richard Henderson <email@example.com> writes:
RH> Debian should be using
RH> ret = lchown(foo, bar); if (ret < 0 && errno ==
RH> ENOSYS) ret = chown(foo, bar);
RH> That will work everywhere.
Being the one that wrote the original fix to this (there's a
somewhat better one now that's probably going to go in instead), I'll
point out that there were a few issues to be dealt with.
The only reason that there's been such a fuss about this under alpha
a) 2.0 kernels *didn't* return ENOSYS to unimplemented syscalls,
they returned EPERM (up until 2.0.36presomething), and
b) the first (and pretty much only) thing to break was dpkg, the
actual package manager.
Someone (Andreas?) contacted me with the PowerPC solution ex glibc
2.1 - I didn't go with that for the reason that suddenly inverting the
semantics of chown/lchown between versions of the same library package
was guaranteed to break something. We went with the solution that rth
mentioned above, basically planning to run with a partially crippled
system under 2.0 kernels (lchown and chown mean lchown) to give people
time to recompile and relink packages.
The glibc 2.1 thing will be far less of a problem since it already
has the lchown stub (right?), so anything that should be using lchown
*is* using lchown (or it's going to break anyway). Just don't do
anything to glibc 2.0 or you'll earn the undying enmity of Debian
users worldwide. Just FYI :)