Files
libguestfs/lib
Richard W.M. Jones e1c9bbb3d1 lib: Avoid calling setenv between fork and exec
setenv can call malloc and is not safe to call here.  Glibc is usually
tolerant of this and we haven't had problems before, but if you use
GLIBC_TUNABLES glibc.malloc.check=1 (or any alternate malloc / libc
which serializes) then you would see hangs if starting multiple
libguestfs handles from different threads at the same time.

This commit also updates the common submodule to pick up:

  commit 3c64bcdeaf684f05f46f3928b55aadafdfe72720
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Fri Oct 14 11:07:21 2022 +0100

    utils: Add function for copying the environment and adding new entries

    libguestfs is currently calling setenv at an unsafe location between
    fork and exec.  To fix this we need a way to copy and modify the
    environment before fork and then we can pass the modified environ to
    execve-like functions.  nbdkit already does the same so use that code.

    This function is copied and adapted from here under a compatible license:
    https://gitlab.com/nbdkit/nbdkit/-/blob/master/common/utils/environ.c

Thanks: Siddhesh Poyarekar
2022-10-14 11:40:12 +01:00
..
2020-03-06 19:32:32 +00:00
2020-08-24 16:24:38 +01:00
2022-03-09 09:28:02 +00:00
2017-01-26 15:05:46 +00:00
2020-03-06 19:32:32 +00:00
2021-12-09 13:46:28 +00:00
2021-04-08 11:12:17 +01:00
2021-04-08 11:12:17 +01:00
2017-01-26 15:05:46 +00:00
2017-01-26 15:05:46 +00:00
2021-04-08 11:12:17 +01:00
2021-04-08 11:12:17 +01:00
2017-01-26 15:05:46 +00:00
2022-08-16 15:42:30 +01:00
2017-01-26 15:05:46 +00:00
2017-01-26 15:05:46 +00:00
2020-03-06 19:32:32 +00:00