ed-inst.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2>
  3. <title>Installation of Ed</title>
  4. <note><para>Ed isn't something which many people use. It's installed here
  5. because it can be used by the patch program if you encounter an ed-based patch
  6. file. This happens rarely because diff-based patches are preferred these
  7. days.</para></note>
  8. <para>Ed normally uses the mktemp function to create temporary files in
  9. <filename class="directory">/tmp</filename>, but this function contains a
  10. vulnerability (see the section on Temporary Files in <ulink
  11. url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). The
  12. following patch makes Ed use mkstemp instead, which is the recommended way to
  13. create temporary files.</para>
  14. <para>Apply the patch:</para>
  15. <screen><userinput>patch -Np1 -i ../&ed-patch;</userinput></screen>
  16. <para>Now prepare Ed for compilation:</para>
  17. <screen><userinput>./configure --prefix=/usr</userinput></screen>
  18. <para>Compile the package:</para>
  19. <screen><userinput>make</userinput></screen>
  20. <para>This package has a test suite available which can perform a number of
  21. checks to ensure it built correctly. Should you choose to run it, the
  22. following command will do so:</para>
  23. <screen><userinput>make check</userinput></screen>
  24. <para>Install the package:</para>
  25. <screen><userinput>make install</userinput></screen>
  26. <para>And move the programs to the <filename>/bin</filename> directory, so
  27. they can be used in the event that the <filename>/usr</filename> partition is
  28. unavailable.</para>
  29. <screen><userinput>mv /usr/bin/{ed,red} /bin</userinput></screen>
  30. </sect2>