openbsd-ports/x11/pekwm/patches/patch-src_main_cc
jca a15342c123 Add pledge() support
While here, update MAINTAINER.  Diff from Timo Myyra (maintainer)
2017-12-20 17:22:37 +00:00

19 lines
468 B
Plaintext

$OpenBSD: patch-src_main_cc,v 1.1 2017/12/20 17:22:37 jca Exp $
Index: src/main.cc
--- src/main.cc.orig
+++ src/main.cc
@@ -124,6 +124,12 @@ main(int argc, char **argv)
#endif // DEBUG
WindowManager *wm = WindowManager::start(command_line, config_file, replace);
+#if HAVE_PLEDGE
+ if (pledge("stdio rpath wpath cpath proc exec", NULL) == -1) {
+ cerr << "failed to pledge" << endl;
+ return 1;
+ }
+#endif
if (wm) {
try {