[Whonix-devel] Bug#921163: coreutils such as /bin/mkdir are duplicated in /usr/bin/mkdir

Patrick Schleizer adrelanos at riseup.net
Sat Feb 2 15:05:00 CET 2019


Package: mmdebstrap
Severity: normal
X-Debbugs-CC: whonix-devel at whonix.org

Dear maintainer,

# How to reproduce:

sudo mmdebstrap --mode=root
--aptopt=/home/user/whonix_binary/aptgetopt.conf stretch
/var/cache/pbuilder/base.cow
/home/user/whonix_dot/Whonix/build_sources/debian_stable_current_clearnet.list

(Could probably simplified but I hope you can reproduce this easily /
hope you also have usr/bin/mkdir.)

# Expected result:

base.cow/bin/mkdir exists.

base.cow/usr/bin/mkdir does not exist

# Actual result:

base.cow/bin/mkdir exists.

base.cow/usr/bin/mkdir exists.

base.cow/usr/bin/mkdir matches base.cow/bin/mkdir.

diff base.cow/usr/bin/mkdir base.cow/bin/mkdir ; echo $?
0

Also many (if not all) other coreutils that should only reside in /bin
such as /bin/rm are duplicated in /usr/bin such as /usr/bin/rm.

# Why this is a problem:

/usr/bin is preferred over /bin with default $PATH setting.

- When coreutils is later updated, it will only update /bin/mkdir and so
forth but not /usr/bin/mkdir. This is because /bin/mkdir is owned by
coreutils (dpkg -S /bin/mkdir) but /usr/bin/mkdir is owned by no package
(dpkg -S /usr/bin/mkdir).

- This leads to apparmor issues. In apparmor profiles one has to
hardcode for example /bin/mkdir but since /usr/bin/mkdir exists, this
call will be denied.

# Misc:

I couldn't figure out from the source code why this is happening.
Intended or unintended behavior? If intended, can this be turned off?
Are also other files in unusual places?

Kind regards,
Patrick


More information about the Whonix-devel mailing list