1. 30 Jun, 2021 2 commits
    • conf: improve read-only /sys with read-write /sys/devices/virtual/net · cb4889ab
      Christian Brauner authored
      Some tools require /sys/devices/virtual/net to be read-write. At the
      same time we want all other parts of /sys to be read-only. To do this we
      created a layout where we hade a read-only instance of sysfs mounted on
      top of a read-write instance of sysfs:
      
      `-/sys                                  sysfs                                                        sysfs      rw,nosuid,nodev,noexec,relatime
        `-/sys                                sysfs                                                        sysfs      ro,nosuid,nodev,noexec,relatime
          |-/sys/devices/virtual/net          sysfs                                                        sysfs      rw,relatime
          | `-/sys/devices/virtual/net        sysfs[/devices/virtual/net]                                  sysfs      rw,nosuid,nodev,noexec,relatime
      
      This causes issues for systemd services that create a separate mount
      namespace as they get confused to what mount options need to be
      respected.
      
      Simplify our mounting logic so we end up with a single read-only mount
      of sysfs on /sys and a read-write bind-mount of /sys/devices/virtual/net:
      
      ├─/sys                                sysfs                                                                                  sysfs         ro,nosuid,nodev,noexec,relatime
      │ ├─/sys/devices/virtual/net          sysfs[/devices/virtual/net]                                                            sysfs         rw,nosuid,nodev,noexec,relatime
      
      Link: systemd/systemd#20032
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
  2. 29 Jun, 2021 7 commits
  3. 28 Jun, 2021 4 commits
  4. 25 Jun, 2021 1 commit
    • Resize array in remove_from_array() and fix a crash · 5364ae41
      Tomasz Blaszczak authored
      When an item is added to an array, then the array is realloc()ed (to size+1),
      and the item is copied (strdup()) to the array.
      Thus, when an item is removed from an array, allocated memory pointed by
      the item (not the item itself) should be freed, successive items should
      be left-shifted and the array realloc()ed again (size-1).
      
      Additional changes:
      - Initialize an array in list_all_containers().
      Signed-off-by: 's avatarTomasz Blaszczak <tomasz.blaszczak@consult.red>
  5. 23 Jun, 2021 1 commit
  6. 16 Jun, 2021 2 commits
  7. 14 Jun, 2021 10 commits
  8. 12 Jun, 2021 1 commit
  9. 08 Jun, 2021 4 commits
  10. 07 Jun, 2021 2 commits
  11. 03 Jun, 2021 2 commits
  12. 28 May, 2021 2 commits
  13. 25 May, 2021 2 commits