Discussion:
[dev] [st][PATCH] Fix iso14755 on OpenBSD
s***@cumallover.me
2018-09-11 02:52:02 UTC
Permalink
Hello,

`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
@@ -814,7 +814,7 @@ ttynew(char *line, char *cmd, char *out, char
**args)
break;
default:
#ifdef __OpenBSD__
- if (pledge("stdio rpath tty proc", NULL) == -1)
+ if (pledge("stdio rpath tty proc exec", NULL) == -1)
die("pledge\n");
#endif
close(s);
Quentin Rameau
2018-09-11 13:23:42 UTC
Permalink
On Tue, 11 Sep 2018 02:52:02 +0000
Post by s***@cumallover.me
Hello,
Hello st1cky,
Post by s***@cumallover.me
`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.
Thank you for spotting this and for the patch alongside it!

This actually started a small discussion and we decided to remove the
ISO 14755 feature from st and move it to the patches section.

This doesn't seem like a widely used feature and some consider it bloat.

Thanks again!

Continue reading on narkive:
Loading...