If st's window is deleted then it will try to send a SIGHUP through kill(2),

therefore pledge(2) needs proc otherwise it will abort due to missing promise.

OK tb@ and sthen@
This commit is contained in:
mestre 2017-09-26 23:03:53 +00:00
parent 4a6f5a8509
commit 747bf79abb
2 changed files with 7 additions and 6 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.14 2017/04/05 21:29:57 juanfra Exp $
# $OpenBSD: Makefile,v 1.15 2017/09/26 23:03:53 mestre Exp $
COMMENT= simple X terminal
DISTNAME= st-0.7
REVISION= 0
REVISION= 1
CATEGORIES= x11

View File

@ -1,6 +1,7 @@
$OpenBSD: patch-st_c,v 1.3 2017/04/05 21:29:57 juanfra Exp $
--- st.c.orig Thu Aug 11 16:25:58 2016
+++ st.c Wed Mar 29 14:20:44 2017
$OpenBSD: patch-st_c,v 1.4 2017/09/26 23:03:53 mestre Exp $
Index: st.c
--- st.c.orig
+++ st.c
@@ -1454,9 +1454,15 @@ ttynew(void)
die("ioctl TIOCSCTTY failed: %s\n", strerror(errno));
close(s);
@ -12,7 +13,7 @@ $OpenBSD: patch-st_c,v 1.3 2017/04/05 21:29:57 juanfra Exp $
execsh();
break;
default:
+ if (pledge("stdio rpath tty", NULL) == -1)
+ if (pledge("stdio rpath tty proc", NULL) == -1)
+ die("pledge\n");
close(s);
cmdfd = m;