2 677d90f7 2021-03-12 op * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
4 677d90f7 2021-03-12 op * Permission to use, copy, modify, and distribute this software for any
5 677d90f7 2021-03-12 op * purpose with or without fee is hereby granted, provided that the above
6 677d90f7 2021-03-12 op * copyright notice and this permission notice appear in all copies.
8 677d90f7 2021-03-12 op * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 677d90f7 2021-03-12 op * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 677d90f7 2021-03-12 op * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 677d90f7 2021-03-12 op * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 677d90f7 2021-03-12 op * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 677d90f7 2021-03-12 op * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 677d90f7 2021-03-12 op * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 677d90f7 2021-03-12 op #include "compat.h"
19 677d90f7 2021-03-12 op #ifdef __OpenBSD__
21 2b1f38ab 2021-03-13 op # include <err.h>
22 677d90f7 2021-03-12 op # include <stddef.h>
23 2b1f38ab 2021-03-13 op # include <unistd.h>
26 677d90f7 2021-03-12 op sandbox_network_process(void)
28 677d90f7 2021-03-12 op if (pledge("stdio inet dns", NULL) == -1)
29 677d90f7 2021-03-12 op err(1, "pledge");
33 b1d4d01b 2021-03-14 op sandbox_ui_process(void)
35 b1d4d01b 2021-03-14 op if (pledge("stdio tty", NULL))
36 b1d4d01b 2021-03-14 op err(1, "pledge");
41 68a9b7d2 2021-03-13 op #warning "No sandbox for this OS"
44 68a9b7d2 2021-03-13 op sandbox_network_process(void)