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.
master
Klemens Nanni 2021-01-22 22:02:00 +01:00 committed by C. McEnroe
parent a19f48d840
commit c93c56e4e5
1 changed files with 5 additions and 0 deletions

5
chat.c
View File

@ -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");