6.42. Installing Ed-0.2

Estimated build time:           0.06 SBU
Estimated required disk space:  3 MB

6.42.1. Installation of Ed

This package requires its patch to be applied before you can install it. Make sure it's unpacked before running the installation commands.

Ed isn't something you would personally use. It's installed here because it can be used by the patch program if you encounter an ed-based patch file. This happens rarely because diff-based patches are preferred these days.

Install Ed by running the following commands:

patch -Np1 -i ../ed-0.2.patch &&
./configure --prefix=/usr &&
make &&
make install &&
mv /usr/bin/{ed,red} /bin

6.42.2. Command explanations

patch -Np1 -i ../ed-0.2.patch: This patch fixes a symlink vulnerability in ed. The ed executable creates files in /tmp with predictable names. By using various symlink attacks, it is possible to have ed write to files it should not, change the permissions of files, etc.

6.42.3. Contents of Ed

Last checked against version 0.2.

6.42.4. Ed Installation Dependencies

Last checked against version 0.2.

Bash: sh
Binutils: ar, as, ld, ranlib
Diffutils: cmp
Fileutils: chmod, cp, install, ln, mv, rm, touch
Gcc: cc1, collect2, cpp0, gcc
Grep: egrep, grep
Make: make
Sed: sed
Sh-utils: hostname
Textutils: cat, tr