Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don’t have ed installed (not a conscious decision), which prevents this from working:

% patch<evil.patch sh: 1: ed: not found patch: ed FAILED

patch works just fine for me, though, so ed is not required.



Patch applies files created with diff. Diff has 4 different output formats. One of those formats is basically a batch script with ed instructions.

For patch to work correctly you have to allow executing ed commands (internally or by spawning ed) but for security reasons you better not let ed execute yet another program.


What distribution?

(I don't think I've ever used a system that didn't have ed installed by default.)


Arch Linux doesn't contain ed in their base package group.


Debian doesn't install ed by default, although it did in the past: https://bugs.debian.org/416585


Arch and Debian and Alpine Linux, to my knowledge.

Which is sad because technically POSIX wants ed installed so purely technically, those distros aren't fully POSIX compliant.


My install of Gentoo Linux doesn't have ed.

It is available in the packages, of course.


my arch/ubuntu/debian/rh hosts don't have it pre installed. It's installed by default in an aLinux instance though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: