Installing Ed-0.2

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

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

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.

Contents of Ed

Last checked against version 0.2.

Program Files

ed and red (link to ed)

Description

ed

ed is a line-oriented text editor. It is used to create, display, modify and otherwise manipulate text files.

red

red is a restricted ed: it can only edit files in the current directory and cannot execute shell commands.

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