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:
Richard W.M. Jones
2022-10-24 10:29:51 +01:00
parent 3f5bdce111
commit 001683e885
2 changed files with 0 additions and 20 deletions

View File

@@ -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

View File

@@ -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;