From 16b34e5cd2135c480ac661a9edcf913dfcabf87d Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 24 Jun 2021 17:05:12 -0400 Subject: FreeBSD: Enter capabilities mode if restricted --- chat.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'chat.c') diff --git a/chat.c b/chat.c index 71bfb7b..170094f 100644 --- a/chat.c +++ b/chat.c @@ -46,6 +46,10 @@ #include #include +#ifdef __FreeBSD__ +#include +#endif + #include "chat.h" #ifndef OPENSSL_BIN @@ -314,6 +318,13 @@ int main(int argc, char *argv[]) { if (error) err(EX_OSERR, "pledge"); #endif +#ifdef __FreeBSD__ + if (self.restricted) { + int error = cap_enter(); + if (error) err(EX_OSERR, "cap_enter"); + } +#endif + if (pass) ircFormat("PASS :%s\r\n", pass); if (sasl) ircFormat("CAP REQ :sasl\r\n"); ircFormat("CAP LS\r\n"); -- cgit 1.4.0 d class='sub right'>
summary refs log tree commit diff
Commit message (Expand)Author
2021-02-06Add /usr/X11R6/bin to PATHJune McEnroe
2021-02-05Add I Hope We Choose LoveJune McEnroe
2021-02-04Use owner-filter to add Liberapay donation buttonsJune McEnroe
2021-02-04Use owner-filter for repo page headersJune McEnroe
2021-02-04Warn twice about stopped jobsJune McEnroe
2021-02-04Remove cgit logo using cgitrcJune McEnroe
2021-01-31Add The Rosewater RedemptionJune McEnroe
2021-01-29Use int when checking for EOFJune McEnroe
2021-01-28Move gpl.c and agpl.c templates out of etcJune McEnroe
2021-01-27Set para and sect for mdocJune McEnroe
2021-01-26Use First state to match keyword at beginning of lineJune McEnroe
2021-01-25Install vi on Linux and nvi on macOSJune McEnroe
2021-01-25Use vi and lessJune McEnroe
2021-01-20Use mtags for sh in source-filterJune McEnroe
2021-01-20Generate tags for sh files in mtagsJune McEnroe
2021-01-20Add messy sh lexerJune McEnroe
2021-01-20Add all target to git.causal.agency MakefileJune McEnroe
2021-01-20Remove Lua supportJune McEnroe
2021-01-20Fix tests for diff spansJune McEnroe
2021-01-20Avoid matching ':' in make tagsJune McEnroe
2021-01-19Prefer tag matches not preceded by [[:alnum:]]June McEnroe
2021-01-19Escape \ and / in mtags search patternsJune McEnroe
2021-01-20Use mtags in source-filterJune McEnroe
2021-01-19Add mtags to generate tags for make and mdocJune McEnroe
2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe
2021-01-19Don't use a pager if reading standard inputJune McEnroe
2021-01-19Support BSD make syntax and match *.amJune McEnroe
2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe
2021-01-18Allow matching lexers using first input lineJune McEnroe