From 938d81f65894443dc5a614aa90faaca679aa3ec7 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 6 Apr 2019 13:51:51 -0400 Subject: [PATCH] runtime_loader: Rewrite all "/usr/bin/" shebangs to "/bin/". MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously we only rewrote ones pointing to "env" with that. Change-Id: I775fedc4a3b8e0e590c76f50f4c3fb259c5df32c Reviewed-on: https://review.haiku-os.org/c/1389 Reviewed-by: Axel Dörfler Reviewed-by: waddlesplash --- src/system/runtime_loader/runtime_loader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/runtime_loader/runtime_loader.cpp b/src/system/runtime_loader/runtime_loader.cpp index b92f01eb1e..1cdc9056d5 100644 --- a/src/system/runtime_loader/runtime_loader.cpp +++ b/src/system/runtime_loader/runtime_loader.cpp @@ -371,8 +371,8 @@ fixup_shebang(char *invoker) ++current; } - // replace /usr/bin/env with /bin/env - if (memcmp(commandStart, "/usr/bin/env", current - commandStart) == 0) + // replace /usr/bin/ with /bin/ + if (memcmp(commandStart, "/usr/bin/", current - commandStart) == 0) memmove(commandStart, commandStart + 4, strlen(commandStart + 4) + 1); }