stabbish

:)
git clone https://git.sr.ht/~ashymad/stabbish
Log | Files | Refs | README | LICENSE

commit 4398cff49f7b9d2b65348d3857206deb777957f2
parent 5b273417240686b58b772e9e21ae0a9f032e6ad2
Author: Szymon Mikulicz <szymon.mikulicz@posteo.net>
Date:   Tue,  7 Jul 2026 14:51:04 +0200

string

Diffstat:
Msrc/magic.h | 2+-
Msrc/main.c | 2+-
Msrc/payload.c | 2+-
Msrc/payload.h | 2+-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/magic.h b/src/magic.h @@ -4,7 +4,7 @@ #include "utils.h" struct magic { - const char *tool; + string tool; size_t length; unsigned char byte[16]; }; diff --git a/src/main.c b/src/main.c @@ -23,7 +23,7 @@ int main(int argc, char **argv) { fd trys(busybox, memfd_create("busybox", 0)); fd trys(rcfile, memfd_create("rcfile", 0)); - fd trys(payload, elf_payload("/proc/self/exe")); + fd trys(payload, get_payload("/proc/self/exe")); try(write(busybox, _inc_busybox, _inc_busybox_size)); diff --git a/src/payload.c b/src/payload.c @@ -14,7 +14,7 @@ #define ElfW(type) Elf32_##type #endif -fd elf_payload(const char *path) { +fd get_payload(string path) { static fd try_return = -1; fd trys(in, open(path, O_RDONLY)); diff --git a/src/payload.h b/src/payload.h @@ -4,4 +4,4 @@ #define ENOPAYLOAD -2 -fd elf_payload(string path); +fd get_payload(string path);