I would argue for deleting that code.

A flag for el_set which *allows it* might work for me, but I anticipate
this is a crazy feature that programs using the library would not expect,
and the risks of abuse are clear.

Leon Fischer <[email protected]> wrote:

> The editline(7) library has a little known feature: vi-histedit.
> When invoked, the command creates a file in /tmp and spawns vi(1) to
> edit it.  This behavior is unaccounted for in the pledge(2) promises of
> bc(1) and fsdb(8).
> 
> Steps to reproduce:
> $ echo "bind -v" >> ~/.editrc
> $ bc
> <Press "ESC", then "v">
> Abort trap (core dumped)
> 
> Adding "rpath wpath cpath proc exec" to their pledge(2) promises is just
> too much to fix this.  Should vi-histedit be removed completely?  Or
> should another flag be added to el_set(3) that disables it on demand,
> such that other programs can still use it if their pledge(2) permits it?
> 
> The other editline(7) users, bgplgsh(8), cdio(1), ftp(1) and sftp(1) are
> not affected because they're not pledged at that point.
> 
> By the way, sftp(1) ignores "bind -v" if it is set in ~/.editrc but
> works with other commands (e.g. "telltc").  I don't know what's going on
> there, someone more capable should check it out.
> 

Reply via email to