Re: [dev] [st] externalpipe on OpenBSD

From: Страхиња Радић <contact_AT_strahinja.org>
Date: Wed, 21 Feb 2024 23:04:29 +0100

On 24/02/21 10:12AM, Страхиња Радић wrote:
> [...] (the program specified in openurlcmd doesn't get
> executed).

I narrowed this down to adding "exec" to the second pledge:

+_AT_@ -803,7 +809,7 @@ ttynew(const char *line, char *cmd, const 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

with the added "exec", the program in openurlcmd gets executed. What I don't
know, however, is why is st not aborted if it is in violation of pledge,
instead of silently failing. The changed pledge is in the parent, which
continues execution.


> I also noticed that when I simply comment out the pledge, the program is
> executed, but nothing is passed to openurlcmd.

Disregard this, it was due to having the debug version of script in openurlcmd
still installed in the system.

* * *

Anyway, I have attached the proposed "0.8.5" diff with this message. Is it ok
if I try to commit it to the wiki?

Received on Wed Feb 21 2024 - 23:04:29 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 21 2024 - 23:12:08 CET