Richard W.M. Jones d14acc97be 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
(cherry picked from commit e1c9bbb3d1)
2022-11-21 18:19:27 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2022-11-21 18:11:07 +00:00
2021-04-08 11:36:40 +01:00
2021-04-09 14:27:11 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2022-11-21 18:13:43 +00:00
2021-04-08 11:36:40 +01:00
2018-02-22 15:06:13 +00:00
2021-04-08 11:36:40 +01:00
2022-05-26 11:19:57 +01:00
2020-01-14 16:21:22 +01:00
2019-11-13 12:49:55 +00:00
2020-03-06 19:32:32 +00:00
2022-07-06 16:29:28 +01:00
2021-04-08 12:55:19 +01:00
2022-03-09 09:28:02 +00:00

Libguestfs is tools and a library for accessing and modifying guest
disk images.  For more information see the home page:

  http://libguestfs.org/

For discussion, development, patches, etc. please use the mailing
list:

  http://www.redhat.com/mailman/listinfo/libguestfs

To find out how to build libguestfs from source, read:

  docs/guestfs-building.pod
  http://libguestfs.org/guestfs-building.1.html
  man docs/guestfs-building.1

Copyright (C) 2009-2020 Red Hat Inc.

The library is distributed under the LGPLv2+.  The programs are
distributed under the GPLv2+.  Please see the files COPYING and
COPYING.LIB for full license information.  The examples are under a
very liberal license.
Languages
C 42.7%
OCaml 35.5%
Shell 7.1%
Makefile 4%
Perl 2.6%
Other 8%