From 001683e885df3dc5900121a4f455f939f60c4d19 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 24 Oct 2022 10:29:51 +0100 Subject: [PATCH] appliance: Remove LD_PRELOAD=libSegFault.so This feature was removed in glibc 2.35: https://savannah.gnu.org/forum/forum.php?forum_id=10111 --- appliance/init | 10 ---------- daemon/guestfsd.c | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/appliance/init b/appliance/init index 8bc6aa022..d41056659 100755 --- a/appliance/init +++ b/appliance/init @@ -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 diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index 39f093263..f42056875 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -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;