mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:17:46 +00:00
host: Use pledge()
This commit is contained in:
parent
d30d3fac6f
commit
8c2009c5be
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue