1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <sect1 id="ch-system-mktemp" role="wrap">
|
---|
9 | <?dbhtml filename="mktemp.html"?>
|
---|
10 |
|
---|
11 | <sect1info condition="script">
|
---|
12 | <productname>mktemp</productname>
|
---|
13 | <productnumber>&mktemp-version;</productnumber>
|
---|
14 | <address>&mktemp-url;</address>
|
---|
15 | </sect1info>
|
---|
16 |
|
---|
17 | <title>Mktemp-&mktemp-version;</title>
|
---|
18 |
|
---|
19 | <indexterm zone="ch-system-mktemp">
|
---|
20 | <primary sortas="a-Mktemp">Mktemp</primary>
|
---|
21 | </indexterm>
|
---|
22 |
|
---|
23 | <sect2 role="package">
|
---|
24 | <title/>
|
---|
25 |
|
---|
26 | <para>The Mktemp package contains programs used to create secure temporary
|
---|
27 | files in shell scripts.</para>
|
---|
28 |
|
---|
29 | <segmentedlist>
|
---|
30 | <segtitle>&buildtime;</segtitle>
|
---|
31 | <segtitle>&diskspace;</segtitle>
|
---|
32 |
|
---|
33 | <seglistitem>
|
---|
34 | <seg>&mktemp-ch6-sbu;</seg>
|
---|
35 | <seg>&mktemp-ch6-du;</seg>
|
---|
36 | </seglistitem>
|
---|
37 | </segmentedlist>
|
---|
38 |
|
---|
39 | </sect2>
|
---|
40 |
|
---|
41 | <sect2 role="installation">
|
---|
42 | <title>Installation of Mktemp</title>
|
---|
43 |
|
---|
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>
|
---|
48 |
|
---|
49 | <screen><userinput>patch -Np1 -i ../&mktemp-tempfile-patch;</userinput></screen>
|
---|
50 |
|
---|
51 | <para>Prepare Mktemp for compilation:</para>
|
---|
52 |
|
---|
53 | <screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
|
---|
54 |
|
---|
55 | <variablelist>
|
---|
56 | <title>The meaning of the configure options:</title>
|
---|
57 |
|
---|
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>
|
---|
67 |
|
---|
68 | </variablelist>
|
---|
69 |
|
---|
70 | <para>Compile the package:</para>
|
---|
71 |
|
---|
72 | <screen><userinput>make</userinput></screen>
|
---|
73 |
|
---|
74 | <para>This package does not come with a test suite.</para>
|
---|
75 |
|
---|
76 | <para>Install the package:</para>
|
---|
77 |
|
---|
78 | <screen><userinput>make install
|
---|
79 | make install-tempfile</userinput></screen>
|
---|
80 |
|
---|
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>
|
---|
125 |
|
---|
126 | </sect1>
|
---|