don't need the extra param

This commit is contained in:
Jōshin 2024-01-07 01:43:58 -05:00
parent 3725b77e8d
commit 872e8c4e56
No known key found for this signature in database

View file

@ -768,7 +768,7 @@ __attribute__((__noreturn__)) static void Spawn(const char *exe, int fd,
static const char *TryElf(struct ApeLoader *M, union ElfEhdrBuf *ebuf, static const char *TryElf(struct ApeLoader *M, union ElfEhdrBuf *ebuf,
const char *exe, int fd, long *sp, long *auxv, const char *exe, int fd, long *sp, long *auxv,
char *execfn, char literally) { char *execfn) {
long i, rc; long i, rc;
unsigned size; unsigned size;
struct ElfEhdr *e; struct ElfEhdr *e;
@ -865,7 +865,7 @@ static const char *TryElf(struct ApeLoader *M, union ElfEhdrBuf *ebuf,
auxv[8] = AT_PAGESZ; auxv[8] = AT_PAGESZ;
auxv[9] = pagesz; auxv[9] = pagesz;
auxv[10] = AT_FLAGS; auxv[10] = AT_FLAGS;
auxv[11] = literally ? AT_FLAGS_PRESERVE_ARGV0 : 0; auxv[11] = M->ps.literally ? AT_FLAGS_PRESERVE_ARGV0 : 0;
auxv[12] = AT_UID; auxv[12] = AT_UID;
auxv[13] = getuid(); auxv[13] = getuid();
auxv[14] = AT_EUID; auxv[14] = AT_EUID;
@ -1081,9 +1081,9 @@ int main(int argc, char **argv, char **envp) {
} }
} }
if (i >= sizeof(ebuf->ehdr)) { if (i >= sizeof(ebuf->ehdr)) {
TryElf(M, ebuf, exe, fd, sp, auxv, execfn, M->ps.literally); TryElf(M, ebuf, exe, fd, sp, auxv, execfn);
} }
} }
} }
Pexit(exe, 0, TryElf(M, ebuf, exe, fd, sp, auxv, execfn, M->ps.literally)); Pexit(exe, 0, TryElf(M, ebuf, exe, fd, sp, auxv, execfn));
} }