about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKlemens Nanni <kn@openbsd.org>2021-01-22 22:02:00 +0100
committerJune McEnroe <june@causal.agency>2021-01-23 00:48:19 -0500
commitc93c56e4e558e1877cfcd85580a826a4002166eb (patch)
tree32b51b510e95c357db832ed53bfcf85178da9ed9
parentCall pledge(2) after unveil(2) (diff)
downloadcatgirl-c93c56e4e558e1877cfcd85580a826a4002166eb.tar.gz
catgirl-c93c56e4e558e1877cfcd85580a826a4002166eb.zip
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.
-rw-r--r--chat.c5
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");
nroe 2020-04-26Add mailto address for the archiveJune McEnroe 2020-04-26Put dates on new lines in indexJune McEnroe 2020-04-26Include <> around Message-Id in mailto: URLsJune McEnroe 2020-04-26Add link to index on thread pagesJune McEnroe 2020-04-26Fall back to Content-Type name parameter for attachmentsJune McEnroe 2020-04-26Remove margins in article.message headerJune McEnroe 2020-04-26Generate index.atomJune McEnroe 2020-04-26Generate XHTML content in Atom entriesJune McEnroe 2020-04-25Style index pageJune McEnroe 2020-04-25Render index.htmlJune McEnroe 2020-04-25Wrap <summary> replies count in <data>June McEnroe 2020-04-25Accumulate thread envelopes before concatenationJune McEnroe 2020-04-24Free envelope in concatDataJune McEnroe 2020-04-24Use replyTo address in mailto:June McEnroe 2020-04-23Wrap quoted lines in <q>June McEnroe