Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-2596

netboot: incorrect SMACK labels for /tmp and /run

XMLWordPrintable

    • Intel Minnowboard, Intel Upsquare, NXP i.MX6, TI Vayu, Raspberry Pi 3, Renesas H3, Renesas M3, Renesas M3+KF

      With recent changes introduced for the "run as non-root" feature, some services now need to use /tmp as a temp folder (before, it was in the root user directory).

      Everything works correctly when booting from a normal storage device (usb, sd-card, ...) on all platforms because systemd is responsible for mounting /tmp and /root and applies the correct smack label, as specified in the config fragment /lib/systemd/system/tmp.mount.d/smack.conf .

      But when using netboot, the initrd script is responsible for mounting /tmp and /run before pivoting on new rootfs and running systemd. As a consequence, systemd doesn't try to remount /tmp or /run (and correct smack label is not applied).

      I see 2 potential fixes ATM:

      • make the initrd not mount /tmp or /run (or mount then umount them)
      • make the initrd mount /tmp and /run as systemd usually does (with option 'smackfsroot=*')

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sdesneux Stephane Desneux
            sdesneux Stephane Desneux
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: