From: Michael Tremer Date: Wed, 1 Jan 2025 17:00:22 +0000 (+0000) Subject: file: Actually only replace /usr/bin/env as interpreter X-Git-Tag: 0.9.30~608 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8cf2a703c3820469b0ac10fbe732a2a489a6d447;p=pakfire.git file: Actually only replace /usr/bin/env as interpreter Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/file.c b/src/libpakfire/file.c index 1d079db2c..a988d811c 100644 --- a/src/libpakfire/file.c +++ b/src/libpakfire/file.c @@ -1932,6 +1932,12 @@ int pakfire_file_fix_interpreter(struct pakfire_file* file) { while (*p && isspace(*p)) p++; + // Check if the interpreter is /usr/bin/env + if (!pakfire_string_startswith(p, "/usr/bin/env")) { + r = 0; + goto ERROR; + } + // Consume the old interpreter while (*p && !isspace(*p)) p++;