There's another consequence of this bug. Later on, after the
(Ubuntu noble) chroot has had more packages (e.g. apparmor)
installed, I see this:

    # aa-enforce --no-reload /etc/apparmor.d/usr.sbin.dnsmasq

    ERROR: Syntax Error: Unknown line found in file 
/etc/apparmor.d/local/usr.sbin.rsyslogd line 1:
        /bin/systemd-tmpfiles

That file was created during the debootstrap process, by the postinst
script of the rsyslog package, relevant excerpt below:

        # Add the local/ include
        LOCAL_APP_PROFILE="/etc/apparmor.d/local/usr.sbin.rsyslogd"

        test -e "$LOCAL_APP_PROFILE" || {
            mkdir -p `dirname "$LOCAL_APP_PROFILE"`
            install --mode 644 /dev/null "$LOCAL_APP_PROFILE"
        }

Since /dev/null was a non-empty regular file at the time, the "install"
command copied its contents (the "/bin/systemd-tmpfiles" line) to the
destination. Obviously, the intended result was an empty file.

Comparing the chroot to one generated on a classic (root-ful) Docker
host, I did not find that any other files were created incorrectly in
this way. However, this will be a problem for any distro whose package
scripts use /dev/null as a source rather than a sink.


--Daniel

Reply via email to