[dev] [st][PATCH] Fix iso14755 on OpenBSD

From: <st1cky_AT_cumallover.me>
Date: Tue, 11 Sep 2018 02:52:02 +0000


`iso14755` is broken on OpenBSD since the introduction of pledge
patch. This happens because key presses are handled in the
"master" side of st, which doesn't includes "exec" in it's
promise. Below you can find a patch to fix that.

You can reproduce this by trying to invoke such functionality,
by default bound to `TERMMOD+i`. This will generate a core dump
whose backtrace shows kpress -> iso14755 -> exec in libc path.

Please CC me in any reply as I'm not subscribed to the list.

Best regards,

diff --git a/st.c b/st.c
index 76bb3ea..4826b60 100644
--- a/st.c
+++ b/st.c
_AT_@ -814,7 +814,7 @@ ttynew(char *line, char *cmd, char *out, char
  #ifdef __OpenBSD__
- if (pledge("stdio rpath tty proc", NULL) == -1)
+ if (pledge("stdio rpath tty proc exec", NULL) == -1)
Received on Tue Sep 11 2018 - 04:52:02 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 11 2018 - 05:00:07 CEST