3 ms·
I don’t have ed installed (not a conscious decision), which prevents this from working: % patch<evil.patch sh:
by secure 9y ago
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.
- cbr 9y agoWhat distribution? (I don't think I've ever used a system that didn't have ed installed by default.)
- jwilk 9y agoDebian doesn't install ed by default, although it did in the past: https://bugs.debian.org/416585 https://bugs.debian.org/416585
- checkyoursudo 9y agoMy install of Gentoo Linux doesn't have ed. It is available in the packages, of course.
- sothym 9y agoArch Linux doesn't contain ed in their base package group.
- jethro_tell 9y agomy arch/ubuntu/debian/rh hosts don't have it pre installed. It's installed by default in an aLinux instance though.
- zaarn 9y agoArch 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.
- ben_bai 9y agoPatch 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.