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.
weechat-hashes
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(); uiDraw();
int irc = ircConnect(bind, host, port); 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 (pass) ircFormat("PASS :%s\r\n", pass);
if (sasl) ircFormat("CAP REQ :sasl\r\n"); if (sasl) ircFormat("CAP REQ :sasl\r\n");
ircFormat("CAP LS\r\n"); ircFormat("CAP LS\r\n");