https://bugzilla.novell.com/show_bug.cgi?id=408959 Summary: chroot detection code in pre/postinstall broken Product: openSUSE 11.0 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Installation AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: martin.koegler@brz.gv.at QAContact: jsrain@novell.com Found By: --- Many packages (eg. udev, sysvinit) use something like the following for chroot detection: if test -f /proc/1/exe -a -d /proc/1/root; then if test $(stat -Lc '%i' /) -eq $(stat -Lc '%i' /proc/1/root); then if test -x /sbin/udevd; then echo "DO SOMETHING" fi fi fi This code is broken, if the chroot is on a different file system than /. In this case, the inode numbers of the chroot directory can be the same as the inode number of /. HowTo reproduce: * format / and /chroot as XFS filesystem and install a system into both * mount /chroot * chroot /chroot => stat -Lc '%i' / and stat -Lc '%i' /proc/1/root are the same (128) To fix it, the device must be checked too, eg: if test -f /proc/1/exe -a -d /proc/1/root; then if test $(stat -Lc '%D-%i' /) -eq $(stat -Lc '%D-%i' /proc/1/root); then if test -x /sbin/udevd; then echo "DO SOMETHING" fi fi fi mfg Martin Kögler -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.