host: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-11 20:49:31 +01:00
parent d30d3fac6f
commit 8c2009c5be
Notes: sideshowbarker 2024-07-19 10:10:50 +09:00

View file

@ -3,9 +3,15 @@
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char** argv)
{
if (pledge("stdio dns", nullptr) < 0) {
perror("pledge");
return 1;
}
if (argc < 2) {
printf("usage: host <hostname>\n");
return 0;