[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[2fa922f] | 7 |
|
---|
[81fd230] | 8 | <sect1 id="ch-system-mktemp" role="wrap">
|
---|
[2fa922f] | 9 | <?dbhtml filename="mktemp.html"?>
|
---|
[673b0d8] | 10 |
|
---|
[e747759] | 11 | <sect1info condition="script">
|
---|
| 12 | <productname>mktemp</productname>
|
---|
| 13 | <productnumber>&mktemp-version;</productnumber>
|
---|
| 14 | <address>&mktemp-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
[2fa922f] | 17 | <title>Mktemp-&mktemp-version;</title>
|
---|
[673b0d8] | 18 |
|
---|
[2fa922f] | 19 | <indexterm zone="ch-system-mktemp">
|
---|
| 20 | <primary sortas="a-Mktemp">Mktemp</primary>
|
---|
| 21 | </indexterm>
|
---|
[673b0d8] | 22 |
|
---|
[2fa922f] | 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
[673b0d8] | 25 |
|
---|
[2fa922f] | 26 | <para>The Mktemp package contains programs used to create secure temporary
|
---|
| 27 | files in shell scripts.</para>
|
---|
[673b0d8] | 28 |
|
---|
[2fa922f] | 29 | <segmentedlist>
|
---|
| 30 | <segtitle>&buildtime;</segtitle>
|
---|
| 31 | <segtitle>&diskspace;</segtitle>
|
---|
[673b0d8] | 32 |
|
---|
[2fa922f] | 33 | <seglistitem>
|
---|
[e4a5635] | 34 | <seg>&mktemp-ch6-sbu;</seg>
|
---|
| 35 | <seg>&mktemp-ch6-du;</seg>
|
---|
[2fa922f] | 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
[673b0d8] | 38 |
|
---|
[2fa922f] | 39 | </sect2>
|
---|
[673b0d8] | 40 |
|
---|
[2fa922f] | 41 | <sect2 role="installation">
|
---|
| 42 | <title>Installation of Mktemp</title>
|
---|
[81fd230] | 43 |
|
---|
[2fa922f] | 44 | <para>Many scripts still use the deprecated
|
---|
| 45 | <command>tempfile</command> program, which has functionality similar
|
---|
| 46 | to <command>mktemp</command>. Patch Mktemp to include a
|
---|
| 47 | <command>tempfile</command> wrapper:</para>
|
---|
[81fd230] | 48 |
|
---|
[0445a3d] | 49 | <screen><userinput remap="pre">patch -Np1 -i ../&mktemp-tempfile-patch;</userinput></screen>
|
---|
[673b0d8] | 50 |
|
---|
[2fa922f] | 51 | <para>Prepare Mktemp for compilation:</para>
|
---|
[673b0d8] | 52 |
|
---|
[0445a3d] | 53 | <screen><userinput remap="configure">./configure --prefix=/usr --with-libc</userinput></screen>
|
---|
[0be3d41] | 54 |
|
---|
[2fa922f] | 55 | <variablelist>
|
---|
| 56 | <title>The meaning of the configure options:</title>
|
---|
[673b0d8] | 57 |
|
---|
[2fa922f] | 58 | <varlistentry>
|
---|
| 59 | <term><parameter>--with-libc</parameter></term>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>This causes the <command>mktemp</command> program to use the
|
---|
| 62 | <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
|
---|
| 63 | functions from the system C library instead of its own implementation
|
---|
| 64 | of them. </para>
|
---|
| 65 | </listitem>
|
---|
| 66 | </varlistentry>
|
---|
[673b0d8] | 67 |
|
---|
[2fa922f] | 68 | </variablelist>
|
---|
[673b0d8] | 69 |
|
---|
[2fa922f] | 70 | <para>Compile the package:</para>
|
---|
[673b0d8] | 71 |
|
---|
[0445a3d] | 72 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[81fd230] | 73 |
|
---|
[2fa922f] | 74 | <para>This package does not come with a test suite.</para>
|
---|
[81fd230] | 75 |
|
---|
[2fa922f] | 76 | <para>Install the package:</para>
|
---|
[81fd230] | 77 |
|
---|
[0445a3d] | 78 | <screen><userinput remap="install">make install
|
---|
[2fa922f] | 79 | make install-tempfile</userinput></screen>
|
---|
[673b0d8] | 80 |
|
---|
[2fa922f] | 81 | </sect2>
|
---|
| 82 |
|
---|
| 83 | <sect2 id="contents-mktemp" role="content">
|
---|
| 84 | <title>Contents of Mktemp</title>
|
---|
| 85 |
|
---|
| 86 | <segmentedlist>
|
---|
| 87 | <segtitle>Installed programs</segtitle>
|
---|
| 88 |
|
---|
| 89 | <seglistitem>
|
---|
| 90 | <seg>mktemp and tempfile</seg>
|
---|
| 91 | </seglistitem>
|
---|
| 92 | </segmentedlist>
|
---|
| 93 |
|
---|
| 94 | <variablelist>
|
---|
| 95 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 96 | <?dbfo list-presentation="list"?>
|
---|
| 97 | <?dbhtml list-presentation="table"?>
|
---|
| 98 |
|
---|
| 99 | <varlistentry id="mktemp">
|
---|
| 100 | <term><command>mktemp</command></term>
|
---|
| 101 | <listitem>
|
---|
| 102 | <para>Creates temporary files in a secure manner; it is used in
|
---|
| 103 | scripts</para>
|
---|
| 104 | <indexterm zone="ch-system-mktemp mktemp">
|
---|
| 105 | <primary sortas="b-mktemp">mktemp</primary>
|
---|
| 106 | </indexterm>
|
---|
| 107 | </listitem>
|
---|
| 108 | </varlistentry>
|
---|
| 109 |
|
---|
| 110 | <varlistentry id="tempfile">
|
---|
| 111 | <term><command>tempfile</command></term>
|
---|
| 112 | <listitem>
|
---|
| 113 | <para>Creates temporary files in a less secure manner than
|
---|
| 114 | <command>mktemp</command>; it is installed for
|
---|
| 115 | backwards-compatibility</para>
|
---|
| 116 | <indexterm zone="ch-system-mktemp tempfile">
|
---|
| 117 | <primary sortas="b-tempfile">tempfile</primary>
|
---|
| 118 | </indexterm>
|
---|
| 119 | </listitem>
|
---|
| 120 | </varlistentry>
|
---|
| 121 |
|
---|
| 122 | </variablelist>
|
---|
| 123 |
|
---|
| 124 | </sect2>
|
---|
[673b0d8] | 125 |
|
---|
| 126 | </sect1>
|
---|