summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2015-11-18 17:41:43 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2015-11-18 17:41:43 +0000
commitd91d0007eecf589ea5699e34aa4d748fce2c57b2 (patch)
tree967ba0b62671502f80f14b2db1898faded107ab3
parent17479d0dadecd04b9f4d4e52dfab13f91bca425b (diff)
pledge fvwm and FvwmPager (since it's started by default); committing to
solicit further feedback and testing. ok matthieu and encouragement from deraadt
-rw-r--r--app/fvwm/fvwm/fvwm.c4
-rw-r--r--app/fvwm/modules/FvwmPager/FvwmPager.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/app/fvwm/fvwm/fvwm.c b/app/fvwm/fvwm/fvwm.c
index 09876a785..decd86653 100644
--- a/app/fvwm/fvwm/fvwm.c
+++ b/app/fvwm/fvwm/fvwm.c
@@ -19,6 +19,7 @@
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
+#include <err.h>
#include "fvwm.h"
#include "menus.h"
#include "misc.h"
@@ -525,6 +526,9 @@ int main(int argc, char **argv)
fFvwmInStartup = False;
DBUG("main","Entering HandleEvents loop...");
+ if (pledge("stdio rpath proc exec", NULL) == -1)
+ err(1, "pledge");
+
HandleEvents();
switch( fvwmRunState )
{
diff --git a/app/fvwm/modules/FvwmPager/FvwmPager.c b/app/fvwm/modules/FvwmPager/FvwmPager.c
index f7943ad68..4ed63d572 100644
--- a/app/fvwm/modules/FvwmPager/FvwmPager.c
+++ b/app/fvwm/modules/FvwmPager/FvwmPager.c
@@ -20,6 +20,7 @@
#include <sys/time.h>
#include <unistd.h>
#include <ctype.h>
+#include <err.h>
#ifdef HAVE_SYS_BSDTYPES_H
#include <sys/bsdtypes.h> /* Saul */
@@ -264,6 +265,9 @@ int main(int argc, char **argv)
fprintf(stderr,"[main]: back from getting window list, looping\n");
#endif
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
Loop(fd);
return 0;
}