Download layerfault_fixture.c from LayerFault/native-capability-library: direct link, hf CLI and curl.
- Browser
- Download file 487 Bytes
-
https://huggingface.co/LayerFault/native-capability-library/resolve/main/layerfault_fixture.c
- Command line
-
hf download hf://LayerFault/native-capability-library/layerfault_fixture.c
-
curl -L -o layerfault_fixture.c https://huggingface.co/LayerFault/native-capability-library/resolve/main/layerfault_fixture.c
487 Bytes
| /* | |
| * Inert security fixture: capabilities are present in the import table. | |
| * The function is never called by the generator or validation harness. | |
| */ | |
| int layerfault_capability_fixture(void) { | |
| void *h = dlopen("libc.so.6", RTLD_LAZY); | |
| if (h) dlclose(h); | |
| int fd = socket(AF_INET, SOCK_STREAM, 0); | |
| if (fd >= 0) close(fd); | |
| return system("/bin/echo LAYERFAULT_CANARY >/dev/null"); | |
| } | |