Hello, ...

Well, i gave this bug a bit of a test.

on a 2.6.18 powerpc/pegasos system, which is mostly etch with sid kernels, i
tested both proposed fixes :

  if ! [ -r /proc/1/root -a /proc/1/root/ -ef /proc/self/root/ ]

returned FALSE in both cases (Well, i think i forgot the !, so it probably
did return TRUE in both cases). So, this solution is not working.

On the other hand this check :

  [ "$(stat -c "%d/%i" /)" = "$(stat -Lc "%d/%i" /proc/1/root)" ]

works fine (returning TRUE on the real system and FALSE in the chroot).

Given the critic Christoph had (warnings on pre-2.6.18, altough we hardly care
for this in etch, which will have 2.6.18), mayeb something like this : 

  if [ "`uname -r`" -ge 2.6.18 ] &&
        [ "$(stat -c "%d/%i" /)" = "$(stat -Lc "%d/%i" /proc/1/root)" ]; then
        # WE ARE IN THE REAL SYSTEM 
  else
        # WE ARE IN THE CHROOT
  fi

Should be best. Well, this will not work, since uname -r will return something
like 2.6.18-2-powerpc which is not test friendly, but you get the idea.
Finding the right comparison is left as an exercice for the one which is going
to fix this bug.

Let's fix this ASAP, so we can get a fixed version uploaded to unstable, and
do some widespread tests, and then move the fixed udev and 2.6.18 kernels into
testing.

Friendly,

Sven Luther



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to