Bug#473682: marked as done (fakechroot does not properly wrap *at syscalls (openat, unlinkat, fstatat, etc))

2008-07-25 Thread Debian Bug Tracking System

Your message dated Fri, 25 Jul 2008 14:17:02 +
with message-id [EMAIL PROTECTED]
and subject line Bug#473682: fixed in fakechroot 2.8-1
has caused the Debian Bug report #473682,
regarding fakechroot does not properly wrap *at syscalls (openat, unlinkat, 
fstatat, etc)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
473682: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473682
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
---BeginMessage---
Package: fakechroot
Version: 2.6-1.3
Severity: important

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I made a simple fakechroot environment including only busybox and
/bin/rm, using these versions:

[0 [EMAIL PROTECTED] ~]$ dpkg -l busybox coreutils
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name   VersionDescription
+++-==-==-
ii  busybox1:1.1.3-5  Tiny utilities for small and embedded system
ii  coreutils  6.10-3 The GNU core utilities
[0 [EMAIL PROTECTED] ~]$ 

fakechroot appears to no longer actually trick /bin/rm into operating
within the chroot, though i recall it doing so successfully back
when i was using coreutils 5.97-5.3 only two weeks ago.

Here's the test setup.  I create a mini chroot environment, create a
new file in the root directory named x, and /bin/rm is unable to
unlink it if the path to /x is specified absolutely:

[0 [EMAIL PROTECTED] cdtemp.o27783]$ rm -rf root
[0 [EMAIL PROTECTED] cdtemp.o27783]$ mkdir -p root/{bin,lib}
[0 [EMAIL PROTECTED] cdtemp.o27783]$ cp /lib/lib{{c,m}.so.6,crypt.so.1} root/lib
[0 [EMAIL PROTECTED] cdtemp.o27783]$ cp /bin/{busybox,rm} root/bin/
[0 [EMAIL PROTECTED] cdtemp.o27783]$ cp /lib/ld-linux.so.2 root/lib
[0 [EMAIL PROTECTED] cdtemp.o27783]$ ln root/bin/busybox root/bin/sh
[0 [EMAIL PROTECTED] cdtemp.o27783]$ fakechroot /usr/sbin/chroot root /bin/sh


BusyBox v1.1.3 (Debian 1:1.1.3-5) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ $ touch /x
/ $ /bin/rm /x
/bin/rm: cannot remove `/x': No such file or directory
/ $ ls -l /x  
- -rw-r--r--1 1000 10000 Mar 31 20:17 /x
/ $ rm /x
/ $ ls -l /x
ls: /x: No such file or directory
/ $ touch /x
/ $ ls -l /x 
- -rw-r--r--1 1000 10000 Mar 31 20:21 /x
/ $ /bin/rm /x   
/bin/rm: cannot remove `/x': No such file or directory
/ $ /bin/rm /tmp/cdtemp.o27783/root/x
/ $ ls -l /x
ls: /x: No such file or directory
/ $ exit
[0 [EMAIL PROTECTED] cdtemp.o27783]$ ls -l /x
ls: cannot access /x: No such file or directory
[2 [EMAIL PROTECTED] cdtemp.o27783]$ 

Note that busybox's rm appears to be capable of unlinking the chrooted
/x, but that /bin/rm is not able to do so.  Even worse, when /bin/rm
uses the *real* (unchrooted) path to the file, it successfully unlinks
it.

I haven't followed all the changes in the recent versions of
coreutils.  Is it possible that there's some new library call that is
being used that fakechroot isn't handling or something?

Thanks for maintaining fakechroot in debian.  If i can help debug this
any further, please let me know.

Regards,

--dkg

- -- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages fakechroot depends on:
ii  libc6 2.7-6  GNU C Library: Shared libraries

fakechroot recommends no packages.

- -- no debconf information

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQIVAwUBR/GCE8zS7ZTSFznpAQJk9xAAjEnjB1oPnDSfhBeSbZiDRoqsau2DsmXv
rkRudwE6VkDqZ3CqSwmXl4OiuaoG4xkiASshzflAEXyDb2B4de+KyibZb7W45dSv
B+IAoZFhqhc6ha/BUvIpM6rr8PY4T9MWwOIONQ7AVCbE3+2PFsKmN02PQ73X8ykD
uV+gmxpiR8/vuo8IBZMhE2D2ZlAd8eL25cWNTVJBrddQQt5xgWooSr8C5lo1fof3
anBa1MxCu8n1a11cn1MJBSt/YmBfuZ0IZVItgraoLdsNWldUvkvOp3k2g/VIVtje
LAF0QcvyobqMI08hOv0GYjMVqVuQFEUvhys3IHikbwoJcF2DRBwG5w9+1npMPZ+p
Kwsr5py7DHNmRd72g4IDP8W4/UbHE68QYo0H7pncztdSB7aVAowpRkRtjqfzJCol
0FaStrjp07WvMY+LkAVCnyCWe0p/mISNTJ8ts2pE8AMIg20jt7u28QXKqkOdNBFz
28YXsaWmTkw39au7iEwIqgyOgtb0vIEF6Z82uc0E+AbnON2cd7Xys2nSmqjZV8HI
TZG4vXlgDRyU1YhjP4cVCFEK1npjf279S/l2jGwmi2TLKEFnpxISpn7nlu7Ht73Z
1YPdumqnrhyLKXGCg7JRhFAAXSQeeYi8TqCBailinmNMahnyW99TPy76SRiUXWvz

Bug#473682: marked as done (fakechroot does not properly wrap *at syscalls (openat, unlinkat, fstatat, etc))

2008-07-15 Thread Debian Bug Tracking System

Your message dated Tue, 15 Jul 2008 15:47:09 +
with message-id [EMAIL PROTECTED]
and subject line Bug#473682: fixed in fakechroot 2.7-1
has caused the Debian Bug report #473682,
regarding fakechroot does not properly wrap *at syscalls (openat, unlinkat, 
fstatat, etc)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
473682: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473682
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
---BeginMessage---
Package: fakechroot
Version: 2.6-1.3
Severity: important

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I made a simple fakechroot environment including only busybox and
/bin/rm, using these versions:

[0 [EMAIL PROTECTED] ~]$ dpkg -l busybox coreutils
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name   VersionDescription
+++-==-==-
ii  busybox1:1.1.3-5  Tiny utilities for small and embedded system
ii  coreutils  6.10-3 The GNU core utilities
[0 [EMAIL PROTECTED] ~]$ 

fakechroot appears to no longer actually trick /bin/rm into operating
within the chroot, though i recall it doing so successfully back
when i was using coreutils 5.97-5.3 only two weeks ago.

Here's the test setup.  I create a mini chroot environment, create a
new file in the root directory named x, and /bin/rm is unable to
unlink it if the path to /x is specified absolutely:

[0 [EMAIL PROTECTED] cdtemp.o27783]$ rm -rf root
[0 [EMAIL PROTECTED] cdtemp.o27783]$ mkdir -p root/{bin,lib}
[0 [EMAIL PROTECTED] cdtemp.o27783]$ cp /lib/lib{{c,m}.so.6,crypt.so.1} root/lib
[0 [EMAIL PROTECTED] cdtemp.o27783]$ cp /bin/{busybox,rm} root/bin/
[0 [EMAIL PROTECTED] cdtemp.o27783]$ cp /lib/ld-linux.so.2 root/lib
[0 [EMAIL PROTECTED] cdtemp.o27783]$ ln root/bin/busybox root/bin/sh
[0 [EMAIL PROTECTED] cdtemp.o27783]$ fakechroot /usr/sbin/chroot root /bin/sh


BusyBox v1.1.3 (Debian 1:1.1.3-5) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ $ touch /x
/ $ /bin/rm /x
/bin/rm: cannot remove `/x': No such file or directory
/ $ ls -l /x  
- -rw-r--r--1 1000 10000 Mar 31 20:17 /x
/ $ rm /x
/ $ ls -l /x
ls: /x: No such file or directory
/ $ touch /x
/ $ ls -l /x 
- -rw-r--r--1 1000 10000 Mar 31 20:21 /x
/ $ /bin/rm /x   
/bin/rm: cannot remove `/x': No such file or directory
/ $ /bin/rm /tmp/cdtemp.o27783/root/x
/ $ ls -l /x
ls: /x: No such file or directory
/ $ exit
[0 [EMAIL PROTECTED] cdtemp.o27783]$ ls -l /x
ls: cannot access /x: No such file or directory
[2 [EMAIL PROTECTED] cdtemp.o27783]$ 

Note that busybox's rm appears to be capable of unlinking the chrooted
/x, but that /bin/rm is not able to do so.  Even worse, when /bin/rm
uses the *real* (unchrooted) path to the file, it successfully unlinks
it.

I haven't followed all the changes in the recent versions of
coreutils.  Is it possible that there's some new library call that is
being used that fakechroot isn't handling or something?

Thanks for maintaining fakechroot in debian.  If i can help debug this
any further, please let me know.

Regards,

--dkg

- -- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-3-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages fakechroot depends on:
ii  libc6 2.7-6  GNU C Library: Shared libraries

fakechroot recommends no packages.

- -- no debconf information

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQIVAwUBR/GCE8zS7ZTSFznpAQJk9xAAjEnjB1oPnDSfhBeSbZiDRoqsau2DsmXv
rkRudwE6VkDqZ3CqSwmXl4OiuaoG4xkiASshzflAEXyDb2B4de+KyibZb7W45dSv
B+IAoZFhqhc6ha/BUvIpM6rr8PY4T9MWwOIONQ7AVCbE3+2PFsKmN02PQ73X8ykD
uV+gmxpiR8/vuo8IBZMhE2D2ZlAd8eL25cWNTVJBrddQQt5xgWooSr8C5lo1fof3
anBa1MxCu8n1a11cn1MJBSt/YmBfuZ0IZVItgraoLdsNWldUvkvOp3k2g/VIVtje
LAF0QcvyobqMI08hOv0GYjMVqVuQFEUvhys3IHikbwoJcF2DRBwG5w9+1npMPZ+p
Kwsr5py7DHNmRd72g4IDP8W4/UbHE68QYo0H7pncztdSB7aVAowpRkRtjqfzJCol
0FaStrjp07WvMY+LkAVCnyCWe0p/mISNTJ8ts2pE8AMIg20jt7u28QXKqkOdNBFz
28YXsaWmTkw39au7iEwIqgyOgtb0vIEF6Z82uc0E+AbnON2cd7Xys2nSmqjZV8HI
TZG4vXlgDRyU1YhjP4cVCFEK1npjf279S/l2jGwmi2TLKEFnpxISpn7nlu7Ht73Z
1YPdumqnrhyLKXGCg7JRhFAAXSQeeYi8TqCBailinmNMahnyW99TPy76SRiUXWvz