]> git.ipfire.org Git - pakfire.git/commitdiff
execute: Drop setting LD_PRELOAD
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 14 Jun 2021 14:21:50 +0000 (14:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 14 Jun 2021 14:21:50 +0000 (14:21 +0000)
This should no longer be required because the QEMU emulation will set an
appropriate value. This was also quite fragile and required some binary
code in the build container.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/execute.c

index 33d0d5cfe04edfd421ce77a76d4d14bb24a2ca27..e0f290fde007dd8e6691020abd2bd7042ccc8f98 100644 (file)
@@ -465,10 +465,6 @@ PAKFIRE_EXPORT int pakfire_execute(Pakfire pakfire, const char* argv[], char* en
                .cgroup = "pakfire/execute-XXXXXX",
        };
 
-       // Fetch architectures
-       const char* native_arch = pakfire_arch_native();
-       const char* arch = pakfire_get_arch(pakfire);
-
        // argv is invalid
        if (!argv || !argv[0])
                return -EINVAL;
@@ -557,17 +553,6 @@ PAKFIRE_EXPORT int pakfire_execute(Pakfire pakfire, const char* argv[], char* en
                }
        }
 
-       // Fake architecture
-       if (strcmp(arch, native_arch) != 0) {
-               r = set_environ(&env, "LD_PRELOAD", "/usr/lib/libpakfire_preload.so");
-               if (r)
-                       goto ERROR;
-
-               r = set_environ(&env, "UTS_MACHINE", arch);
-               if (r)
-                       goto ERROR;
-       }
-
        // Make cgroup name
        r = pakfire_cgroup_random_name(env.cgroup);
        if (r)