lchat: add pledge(2) support - lchat - A line oriented chat front end for ii.
HTML git clone git://git.suckless.org/lchat
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit 0c43215d0b1981d1689105122da02b7e994e250a
DIR parent a6a8d970dae07920c68bbb4ca3d8020fa8555b46
HTML Author: Tom Schwindl <schwindl@posteo.de>
Date: Sat, 23 Sep 2023 22:17:26 +0200
lchat: add pledge(2) support
Diffstat:
M lchat.c | 4 ++++
1 file changed, 4 insertions(+), 0 deletions(-)
---
DIR diff --git 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();