[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[1770019] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[673b0d8] | 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 4 | %general-entities;
|
---|
| 5 | ]>
|
---|
[81fd230] | 6 | <sect1 id="ch-system-mktemp" role="wrap">
|
---|
[673b0d8] | 7 | <title>Mktemp-&mktemp-version;</title>
|
---|
| 8 | <?dbhtml filename="mktemp.html"?>
|
---|
| 9 |
|
---|
| 10 | <indexterm zone="ch-system-mktemp"><primary sortas="a-Mktemp">Mktemp</primary></indexterm>
|
---|
| 11 |
|
---|
[a001133] | 12 | <sect2 role="package"><title/>
|
---|
[81fd230] | 13 | <para>The Mktemp package contains programs used to create secure temporary
|
---|
| 14 | files in shell scripts.</para>
|
---|
[673b0d8] | 15 |
|
---|
[a001133] | 16 | <segmentedlist>
|
---|
| 17 | <segtitle>&buildtime;</segtitle>
|
---|
| 18 | <segtitle>&diskspace;</segtitle>
|
---|
[fc1024a] | 19 | <seglistitem><seg>0.1 SBU</seg><seg>436 KB</seg></seglistitem>
|
---|
[a001133] | 20 | </segmentedlist>
|
---|
[673b0d8] | 21 |
|
---|
[81fd230] | 22 | <segmentedlist>
|
---|
[45992ae] | 23 | <segtitle>&dependencies;</segtitle>
|
---|
[81fd230] | 24 | <seglistitem><seg>Coreutils, Make, and Patch</seg></seglistitem>
|
---|
| 25 | </segmentedlist>
|
---|
[a001133] | 26 | </sect2>
|
---|
[673b0d8] | 27 |
|
---|
[a001133] | 28 | <sect2 role="installation">
|
---|
[673b0d8] | 29 | <title>Installation of Mktemp</title>
|
---|
| 30 |
|
---|
[81fd230] | 31 | <para>Many scripts still use the deprecated
|
---|
| 32 | <command>tempfile</command> program, which has functionality similar
|
---|
| 33 | to <command>mktemp</command>. Patch Mktemp to include a
|
---|
| 34 | <command>tempfile</command> wrapper:</para>
|
---|
[673b0d8] | 35 |
|
---|
[df10d3d] | 36 | <screen><userinput>patch -Np1 -i ../mktemp-&mktemp-version;-add_tempfile-2.patch</userinput></screen>
|
---|
[673b0d8] | 37 |
|
---|
[81fd230] | 38 | <para>Prepare Mktemp for compilation:</para>
|
---|
[673b0d8] | 39 |
|
---|
| 40 | <screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
|
---|
| 41 |
|
---|
[32bebf0] | 42 | <para>The meaning of the configure options:</para>
|
---|
[81fd230] | 43 |
|
---|
| 44 | <variablelist>
|
---|
| 45 | <varlistentry>
|
---|
| 46 | <term><parameter>--with-libc</parameter></term>
|
---|
| 47 | <listitem><para>This causes the <command>mktemp</command> program to
|
---|
| 48 | use the <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
|
---|
| 49 | functions from the system C library.</para></listitem>
|
---|
| 50 | </varlistentry>
|
---|
| 51 | </variablelist>
|
---|
| 52 |
|
---|
[673b0d8] | 53 | <para>Compile the package:</para>
|
---|
| 54 |
|
---|
| 55 | <screen><userinput>make</userinput></screen>
|
---|
| 56 |
|
---|
[81fd230] | 57 | <para>Install the package:</para>
|
---|
[673b0d8] | 58 |
|
---|
[ef57e3b] | 59 | <screen><userinput>make install
|
---|
| 60 | make install-tempfile</userinput></screen>
|
---|
[673b0d8] | 61 |
|
---|
| 62 | </sect2>
|
---|
| 63 |
|
---|
| 64 |
|
---|
[c6cb3aa] | 65 | <sect2 id="contents-mktemp" role="content"><title>Contents of Mktemp</title>
|
---|
[673b0d8] | 66 |
|
---|
[81fd230] | 67 | <segmentedlist>
|
---|
| 68 | <segtitle>Installed programs</segtitle>
|
---|
| 69 | <seglistitem><seg>mktemp and tempfile</seg></seglistitem>
|
---|
| 70 | </segmentedlist>
|
---|
| 71 |
|
---|
| 72 | <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 73 | <?dbfo list-presentation="list"?>
|
---|
[8f97096] | 74 | <?dbhtml list-presentation="table"?>
|
---|
[81fd230] | 75 |
|
---|
| 76 | <varlistentry id="mktemp">
|
---|
| 77 | <term><command>mktemp</command></term>
|
---|
| 78 | <listitem>
|
---|
| 79 | <para>Creates temporary files in a secure manner; it is used in scripts</para>
|
---|
| 80 | <indexterm zone="ch-system-mktemp mktemp"><primary sortas="b-mktemp">mktemp</primary></indexterm>
|
---|
| 81 | </listitem>
|
---|
| 82 | </varlistentry>
|
---|
| 83 |
|
---|
| 84 | <varlistentry id="tempfile">
|
---|
| 85 | <term><command>tempfile</command></term>
|
---|
| 86 | <listitem>
|
---|
| 87 | <para>Creates temporary files in a less secure manner than
|
---|
| 88 | <command>mktemp</command>; it is installed for backwards-compatibility</para>
|
---|
| 89 | <indexterm zone="ch-system-mktemp tempfile"><primary sortas="b-tempfile">tempfile</primary></indexterm>
|
---|
| 90 | </listitem>
|
---|
| 91 | </varlistentry>
|
---|
| 92 | </variablelist>
|
---|
[673b0d8] | 93 |
|
---|
| 94 | </sect2>
|
---|
| 95 |
|
---|
| 96 | </sect1>
|
---|
[81fd230] | 97 |
|
---|