[LWN Logo]

From: dichro-7abdb5@eris.rcpt.to (Mikolaj J. Habryn)
To: Jeff Noxon <jeff@planetfall.com>
Subject: Re: What do you think?
Date: 02 Oct 1998 10:00:31 +0800

>>>>> "JN" == Jeff Noxon <jeff@planetfall.com> writes:

    JN> Are you talking about glibc versions above (2.0, 2.1) or
    JN> kernel versions?

  Kernel versions.

    JN> First of all, what is the real problem?  The lchown syscall?
    JN> How is it broken and what else is affected?

  lchown(2) gets added in kernel 2.1. In 2.0, chown(2) behaves like
the POSIX lchown. In 2.1, a POSIX lchown is added, and the chown
behaviour is changed to be POSIX chown (ie, the symlink breakage that
dpkg shows up so well). Why is this a problem? The syscall numbers
didn't change. So, linux aware applications blithely use chown when
they really mean lchown. This works fine, until the symlink behaviour
counts and you run a 2.1 kernel. At which stage, boom.

    JN> I'm lost.  I'm using 2.1.x kernels.  What do I need to do to
    JN> make everything work?  

  Text of a mail I sent to Chris a while back:

To: Christopher C Chimelis <chris@classnet.med.miami.edu>
Subject: Re: libc/kernel dilemma

  Executive summary: there's two ways to fix this.

  We can, as originally suggested, cp
sysdeps/unix/sysv/linux/{i386,alpha}/chown.c. That's the wrong way. It
means we *only* have lchown, worse, that we pretend to have a POSIX
chown but really don't.

  Alternatively, we can patch the 2.0 kernel to return ENOSYS to
unimplemented system calls, update glibc to probe for chown and
lchown, recompile everything that uses lchown or chown, *and*, and
this is the good bit, make them all depend on each other. I hate to
say it, but I think that this is the *right* way to do it.

  Thoughts? I've got all the code that we need to do it - it's
literally two tiny patches, one libc, one kernel. It's just that it
means that we suddenly have cross-dependencies between libc and
kernel. Should we get comments on this from other people
(debian-alpha, debian-policy, debian-meddlers, whoever)?

m.

  We decided that we'd fix it the right way. In the meantime, the
.debs I have available at http://www.eris.rcpt.to/libc-lchown/ fix it
the wrong way. BTW, I've uploaded a 2.0.7u version now.

    JN> More importantly, what steps must be
    JN> taken to fix this for Debian/Alpha in general without breaking
    JN> everything?  And what has RedHat done about this?

  I don't know what RedHat has done (I haven't checked, in all
honesty). It's entirely possible that they haven't noticed yet. I've
only had two things break - dpkg, and the build process for the glibc
package :)

m.


--  
To UNSUBSCRIBE, email to debian-alpha-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org