3 ms·
I think OpenBSD's `pledge` syscall would be sufficient in this case. Calling pledge("stdio rpath wpath", {"path/to/input", "path/to/output"}); would black
by doomrobo 10y ago
I think OpenBSD's `pledge` syscall would be sufficient in this case. Calling
pledge("stdio rpath wpath", {"path/to/input", "path/to/output"});
would blacklist any subsequent syscall that are not in the stdio or rpath or wpath lists [0] or pertain to a file that is not the input or output.
[0] http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/pledge.2 http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/...