runtime_loader: Rewrite all "/usr/bin/" shebangs to "/bin/".

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 <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Augustin Cavalier
2019-04-07 17:50:31 +00:00
committed by waddlesplash
parent a0710a23d2
commit 938d81f658
+2 -2
View File
@@ -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);
}