mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
appliance: Remove LD_PRELOAD=libSegFault.so
This feature was removed in glibc 2.35: https://savannah.gnu.org/forum/forum.php?forum_id=10111
This commit is contained in:
@@ -17,16 +17,6 @@ if [ ! -d /tmp ] || [ ! -d /var/tmp ]; then
|
||||
chmod 1777 /tmp /var/tmp
|
||||
fi
|
||||
|
||||
# Try to print a stack trace for segfaults inside the appliance.
|
||||
for d in /lib64 /lib; do
|
||||
f=$d/libSegFault.so
|
||||
if [ -f "$f" ]; then
|
||||
LD_PRELOAD=$f
|
||||
export LD_PRELOAD
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
mkdir -p /proc /sys
|
||||
mount -t proc /proc /proc
|
||||
mount -t sysfs /sys /sys
|
||||
|
||||
@@ -104,16 +104,6 @@ main (int argc, char *argv[])
|
||||
if (winsock_init () == -1)
|
||||
error (EXIT_FAILURE, 0, "winsock initialization failed");
|
||||
|
||||
/* XXX The appliance /init script sets LD_PRELOAD=../libSegFault.so.
|
||||
* However if we CHROOT_IN to the sysroot that file might not exist,
|
||||
* resulting in all commands failing. What we'd really like to do
|
||||
* is to have LD_PRELOAD only set while outside the chroot. I
|
||||
* suspect the proper way to solve this is to remove the
|
||||
* CHROOT_IN/_OUT hack and replace it properly (fork), but that is
|
||||
* for another day.
|
||||
*/
|
||||
unsetenv ("LD_PRELOAD");
|
||||
|
||||
struct stat statbuf;
|
||||
if (stat ("/", &statbuf) == 0)
|
||||
root_device = statbuf.st_dev;
|
||||
|
||||
Reference in New Issue
Block a user