ed-inst.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 uses mktemp to create temporary files in <filename
  9. class="directory">/tmp</filename>, but this function has a security
  10. vulnerability (see section on Temporary Files in <ulink
  11. url="http://en.tldp.org/HOWTO/Secure-Programs-HOWTO/avoid-race.html"/>). This
  12. patch makes Ed use mkstemp instead, which is the recommended way to create
  13. temporary files.</para>
  14. <para>Apply the patch:</para>
  15. <para><screen><userinput>patch -Np1 -i ../ed-&ed-patch-version;.patch</userinput></screen></para>
  16. <para>Prepare Ed to be compiled:</para>
  17. <para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>
  18. <para>Continue with compiling the package:</para>
  19. <para><screen><userinput>make</userinput></screen></para>
  20. <para>And finish off installing the package:</para>
  21. <para><screen><userinput>make install</userinput></screen></para>
  22. <para>We need to move the Ed binaries to the <filename
  23. class="directory">/bin</filename> directory so they may be used in the event
  24. that the <filename class="directory">/usr</filename> partition is
  25. unavailable.</para>
  26. <para><screen><userinput>mv /usr/bin/{ed,red} /bin</userinput></screen></para>
  27. </sect2>