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:
committed by
waddlesplash
parent
a0710a23d2
commit
938d81f658
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user