commit 0c43215d0b1981d1689105122da02b7e994e250a
Author:     Tom Schwindl <schwi...@posteo.de>
AuthorDate: Sat Sep 23 22:17:26 2023 +0200
Commit:     Jan Klemkow <j.klem...@wemelug.de>
CommitDate: Sun Jul 14 13:40:21 2024 +0200

    lchat: add pledge(2) support

diff --git a/lchat.c b/lchat.c
index 6c57ec4..05274af 100644
--- a/lchat.c
+++ b/lchat.c
@@ -152,6 +152,10 @@ usage(void)
 int
 main(int argc, char *argv[])
 {
+#ifdef __OpenBSD__
+       if (pledge("stdio rpath wpath tty proc exec", NULL) == -1)
+               die("pledge:");
+#endif
        struct pollfd pfd[3];
        struct termios term;
        struct slackline *sl = sl_init();

Reply via email to