1. 29 Jun, 2021 3 commits
    • execute: don't exec init, call it · 96294efb
      Tycho Andersen authored
      Instead of having a statically linked init that we put on the host fs
      somewhere via packaging, have to either bind mount in or detect fexecve()
      functionality, let's just call it as a library function. This way we don't
      have to do any of that.
      
      This also fixes up a bunch of conditions from:
      
      if (quiet)
          fprintf(stderr, "log message");
      
      to
      
      if (!quiet)
          fprintf(stderr, "log message");
      
      :)
      
      and it drops all the code for fexecve() detection and bind mounting our
      init in, since we no longer need any of that.
      
      A couple other thoughts:
      
      * I left the lxc-init binary in since we ship it, so someone could be using
        it outside of the internal uses.
      * There are lots of unused arguments to lxc-init (including presumably
        --quiet, since nobody noticed the above); those may be part of the API
        though and so we don't want to drop them.
      Signed-off-by: 's avatarTycho Andersen <tycho@tycho.pizza>
    • Merge pull request #3877 from tomasz-blaszczak-red/fix-crash-after-remove-from-array · f1c64634
      Wolfgang Bumiller authored
      remove_from_array() causes a crash
    • When an item is added to an array, then the array is realloc()ed (to size+1), · bc5f0449
      Tomasz Blaszczak authored
      and the item is copied (strdup()) to the array.
      Thus, when an item is removed from an array, memory allocated for that item
      should be freed, successive items should be left-shifted and the array
      realloc()ed again (size-1).
      
      Additional changes:
      - If strdup() fails in add_to_array(), then an array should be
        realloc()ed again to original size.
      - Initialize an array in list_all_containers().
      Signed-off-by: 's avatarTomasz Blaszczak <tomasz.blaszczak@consult.red>
  2. 28 Jun, 2021 4 commits
  3. 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>
  4. 23 Jun, 2021 1 commit
  5. 16 Jun, 2021 2 commits
  6. 14 Jun, 2021 10 commits
  7. 12 Jun, 2021 1 commit
  8. 08 Jun, 2021 4 commits
  9. 07 Jun, 2021 2 commits
  10. 03 Jun, 2021 2 commits
  11. 28 May, 2021 2 commits
  12. 25 May, 2021 3 commits
  13. 24 May, 2021 1 commit
  14. 21 May, 2021 4 commits