Skip to content

Commit

Permalink
get zipos execve working again
Browse files Browse the repository at this point in the history
  • Loading branch information
G4Vi committed Jan 19, 2024
1 parent f53a1f4 commit a319f34
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion libc/proc/execve.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int execve(const char *prog, char *const argv[], char *const envp[]) {
rc = _weaken(sys_pledge_linux)(__execpromises, __pledge_mode);
}
if (!rc) {
if (0 && _weaken(__zipos_parseuri) &&
if (_weaken(__zipos_parseuri) &&
(_weaken(__zipos_parseuri)(prog, &uri) != -1)) {
rc = _weaken(__zipos_open)(&uri, O_RDONLY | O_CLOEXEC);
if (rc != -1) {
Expand Down
4 changes: 0 additions & 4 deletions test/libc/proc/execve_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ TEST(execve, elfIsUnreadable_mayBeExecuted) {
ASSERT_STREQ("hi\n", buf);
}

/*
TEST(execve, ziposELF) {
if (IsFreebsd()) return; // TODO: fixme on freebsd
if (IsLinux() && !__is_linux_2_6_23()) return; // TODO: fixme on old linux
Expand All @@ -118,9 +117,7 @@ TEST(execve, ziposELF) {
kprintf("execve failed: %m\n");
EXITS(42);
}
*/

/*
TEST(execve, ziposAPE) {
if (IsFreebsd()) return; // TODO: fixme on freebsd
if (IsLinux() && !__is_linux_2_6_23()) return; // TODO: fixme on old linux
Expand All @@ -135,7 +132,6 @@ TEST(execve, ziposAPE) {
kprintf("execve failed: %m\n");
EXITS(42);
}
*/

// clang-format off
#define TINY_ELF_PROGRAM "\
Expand Down

0 comments on commit a319f34

Please sign in to comment.