diff options
author | Klemens Nanni | 2021-01-22 22:02:00 +0100 |
---|---|---|
committer | C. McEnroe | 2021-01-23 00:48:19 -0500 |
commit | c93c56e4e558e1877cfcd85580a826a4002166eb (patch) | |
tree | 32b51b510e95c357db832ed53bfcf85178da9ed9 /chat.c | |
parent | a19f48d8400583f72648ce506f6dc0f14d7d9442 (diff) |
Drop network capability after ircConnect()
catgirl has no reconnect feature and generally must not do anything but read/write from/to the connected socket which does not require "inet" or "dns" promises.
Diffstat (limited to 'chat.c')
-rw-r--r-- | chat.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chat.c b/chat.c index 87daccd..bc035e3 100644 --- a/chat.c +++ b/chat.c @@ -307,6 +307,11 @@ int main(int argc, char *argv[]) { uiDraw(); int irc = ircConnect(bind, host, port); +#ifdef __OpenBSD__ + error = pledge("stdio rpath wpath cpath tty proc exec", NULL); + if (error) err(EX_OSERR, "pledge"); +#endif + if (pass) ircFormat("PASS :%s\r\n", pass); if (sasl) ircFormat("CAP REQ :sasl\r\n"); ircFormat("CAP LS\r\n"); |