Installation of Ed
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.
This package requires its patch to be applied before you can
install it.
patch -Np1 -i ../ed-&ed-patch-version;.patch
Prepare Ed to be compiled:
./configure --prefix=/usr
Continue with compiling the package:
make
And finish off installing the package:
make install
Move the Ed binaries to the root partition.
mv /usr/bin/{ed,red} /bin
Command explanations
patch -Np1 -i ../ed-&ed-version;.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.
mv /usr/bin/{ed,red} /bin:
The Ed binaries are moved to the /bin directory so they may be used in
the event that the /usr partition is unavailable.