New patch by tb@ and semarie@.

Index: Makefile
===================================================================
RCS file: /var/cvs/ports/x11/st/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- Makefile    9 Oct 2016 18:47:49 -0000       1.13
+++ Makefile    28 Mar 2017 10:17:30 -0000
@@ -3,6 +3,7 @@
 COMMENT=               simple X terminal
 
 DISTNAME=              st-0.7
+REVISION=              0
 
 CATEGORIES=            x11
 
@@ -13,6 +14,7 @@ MAINTAINER=           Joerg Jung <[email protected]
 # MIT/X Consortium License
 PERMIT_PACKAGE_CDROM=  Yes
 
+# uses pledge()
 WANTLIB=               c m util X11 Xft fontconfig freetype z
 
 MASTER_SITES=          http://dl.suckless.org/st/
Index: patches/patch-config_mk
===================================================================
RCS file: /var/cvs/ports/x11/st/patches/patch-config_mk,v
retrieving revision 1.8
diff -u -p -r1.8 patch-config_mk
--- patches/patch-config_mk     9 Oct 2016 18:47:49 -0000       1.8
+++ patches/patch-config_mk     28 Mar 2017 10:27:29 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-config_mk,v 1.8 2016/10/09 18:47:49 czarkoff Exp $
---- config.mk.orig     Sat Oct  8 21:48:48 2016
-+++ config.mk  Sat Oct  8 21:50:30 2016
+--- config.mk.orig     Thu Aug 11 16:25:58 2016
++++ config.mk  Tue Mar 28 12:27:10 2017
 @@ -4,24 +4,21 @@ VERSION = 0.7
  # Customize below to fit your system
  
@@ -27,9 +27,10 @@ $OpenBSD: patch-config_mk,v 1.8 2016/10/
 +LIBS +!= pkg-config --libs fontconfig
  
  # flags
- CPPFLAGS = -DVERSION=\"${VERSION}\" -D_XOPEN_SOURCE=600
+-CPPFLAGS = -DVERSION=\"${VERSION}\" -D_XOPEN_SOURCE=600
 -CFLAGS += -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os ${INCS} 
${CPPFLAGS}
 -LDFLAGS += -g ${LIBS}
++CPPFLAGS = -DVERSION=\"${VERSION}\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
 +CFLAGS += -std=c99 ${INCS} ${CPPFLAGS}
 +LDFLAGS += ${LIBS}
  
Index: patches/patch-st_c
===================================================================
RCS file: patches/patch-st_c
diff -N patches/patch-st_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-st_c  29 Mar 2017 12:21:05 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+--- st.c.orig  Thu Aug 11 16:25:58 2016
++++ st.c       Wed Mar 29 14:20:44 2017
+@@ -1454,9 +1454,15 @@ ttynew(void)
+                       die("ioctl TIOCSCTTY failed: %s\n", strerror(errno));
+               close(s);
+               close(m);
++
++              if (pledge("stdio getpw proc exec", NULL) == -1)
++                      die("pledge\n");
++
+               execsh();
+               break;
+       default:
++              if (pledge("stdio rpath tty", NULL) == -1)
++                      die("pledge\n");
+               close(s);
+               cmdfd = m;
+               signal(SIGCHLD, sigchld);

Reply via email to