sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit da6e9a4f73606c63eaee7d80f6460a94d39a88d5
parent c390877cc4ca3dd890199289cf158f2a2889c9b0
Author: Klemens Nanni <kn@openbsd.org>
Date:   Sun, 20 May 2018 14:58:30 +0200

[dwm] Add pledge patch

Diffstat:
dwm.suckless.org/patches/pledge/dwm-pledge-20180522-c8e9479.diff | 13+++++++++++++
dwm.suckless.org/patches/pledge/dwm-pledge-6.1.diff | 12++++++++++++
dwm.suckless.org/patches/pledge/index.md | 18++++++++++++++++++
3 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/pledge/dwm-pledge-20180522-c8e9479.diff b/dwm.suckless.org/patches/pledge/dwm-pledge-20180522-c8e9479.diff @@ -0,0 +1,13 @@ +diff --git a/dwm.c b/dwm.c +index bb95e26..abfb097 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -2137,6 +2137,8 @@ main(int argc, char *argv[]) + die("dwm: cannot open display"); + checkotherwm(); + setup(); ++ if (pledge("stdio proc exec", NULL) == -1) ++ die("pledge"); + scan(); + run(); + cleanup(); diff --git a/dwm.suckless.org/patches/pledge/dwm-pledge-6.1.diff b/dwm.suckless.org/patches/pledge/dwm-pledge-6.1.diff @@ -0,0 +1,12 @@ +Index: dwm.c +--- dwm.c.orig ++++ dwm.c +@@ -2133,6 +2133,8 @@ main(int argc, char *argv[]) + die("dwm: cannot open display\n"); + checkotherwm(); + setup(); ++ if (pledge("stdio proc exec", NULL) == -1) ++ die("pledge\n"); + scan(); + run(); + cleanup(); diff --git a/dwm.suckless.org/patches/pledge/index.md b/dwm.suckless.org/patches/pledge/index.md @@ -0,0 +1,18 @@ +pledge +====== + +Description +----------- + +Restrict system operations on OpenBSD using [pledge(2)](https://man.openbsd.org/pledge). + +Download +-------- + + * [dwm-pledge-6.1.diff](dwm-pledge-6.1.diff) + * [dwm-pledge-20180522-c8e9479.diff](dwm-pledge-20180522-c8e9479.diff) + +Authors +------- + + * Klemens Nanni <kn@openbsd.org>