Access control for the _acl attribute.
[pwmd.git] / doc / pwmd.html
blobb55833b6a20679865ccf0de46471054aa16b861a
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
4 <head>
5 <title>PWMD Manual</title>
7 <meta name="description" content="PWMD Manual">
8 <meta name="keywords" content="PWMD Manual">
9 <meta name="resource-type" content="document">
10 <meta name="distribution" content="global">
11 <meta name="Generator" content="makeinfo">
12 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
13 <link href="#Top" rel="start" title="Top">
14 <link href="#SEC_Contents" rel="contents" title="Table of Contents">
15 <link href="dir.html#Top" rel="up" title="(dir)">
16 <style type="text/css">
17 <!--
18 a.summary-letter {text-decoration: none}
19 blockquote.smallquotation {font-size: smaller}
20 div.display {margin-left: 3.2em}
21 div.example {margin-left: 3.2em}
22 div.indentedblock {margin-left: 3.2em}
23 div.lisp {margin-left: 3.2em}
24 div.smalldisplay {margin-left: 3.2em}
25 div.smallexample {margin-left: 3.2em}
26 div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
27 div.smalllisp {margin-left: 3.2em}
28 kbd {font-style:oblique}
29 pre.display {font-family: inherit}
30 pre.format {font-family: inherit}
31 pre.menu-comment {font-family: serif}
32 pre.menu-preformatted {font-family: serif}
33 pre.smalldisplay {font-family: inherit; font-size: smaller}
34 pre.smallexample {font-size: smaller}
35 pre.smallformat {font-family: inherit; font-size: smaller}
36 pre.smalllisp {font-size: smaller}
37 span.nocodebreak {white-space:nowrap}
38 span.nolinebreak {white-space:nowrap}
39 span.roman {font-family:serif; font-weight:normal}
40 span.sansserif {font-family:sans-serif; font-weight:normal}
41 ul.no-bullet {list-style: none}
42 -->
43 </style>
46 </head>
48 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
49 <h1 class="settitle" align="center">PWMD Manual</h1>
54 <a name="Top"></a>
55 <div class="header">
56 <p>
57 Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
58 </div>
59 <h1 class="node-heading">Top</h1>
62 <table class="menu" border="0" cellspacing="0">
63 <tr><td align="left" valign="top">&bull; <a href="#Introduction" accesskey="1">Introduction</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Overview of pwmd.
64 </td></tr>
65 <tr><td align="left" valign="top">&bull; <a href="#Access-Control" accesskey="2">Access Control</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ACL of a single XML element.
66 </td></tr>
67 <tr><td align="left" valign="top">&bull; <a href="#Invoking" accesskey="3">Invoking</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Command line options.
68 </td></tr>
69 <tr><td align="left" valign="top">&bull; <a href="#Configuration" accesskey="4">Configuration</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Configuration file options.
70 </td></tr>
71 <tr><td align="left" valign="top">&bull; <a href="#Commands" accesskey="5">Commands</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Protocol commands.
72 </td></tr>
73 <tr><td align="left" valign="top">&bull; <a href="#Status-Messages" accesskey="6">Status Messages</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Status lines and their meaning.
74 </td></tr>
75 <tr><td align="left" valign="top">&bull; <a href="#Target-Attribute" accesskey="7">Target Attribute</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">A kind of symbolic link.
76 </td></tr>
77 <tr><td align="left" valign="top">&bull; <a href="#Signals" accesskey="8">Signals</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Signals known to pwmd.
78 </td></tr>
79 <tr><td align="left" valign="top">&bull; <a href="#Concept-Index" accesskey="9">Concept Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Index of concepts.
80 </td></tr>
81 </table>
83 <hr>
84 <a name="Introduction"></a>
85 <div class="header">
86 <p>
87 Next: <a href="#Access-Control" accesskey="n" rel="next">Access Control</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
88 </div>
89 <a name="Overview-of-pwmd"></a>
90 <h2 class="chapter">1 Overview of <code>pwmd</code></h2>
97 <p><code>pwmd</code> or <em>Password Manager Daemon</em> is a server that
98 applications connect to and send commands to store and retrieve data
99 that is saved in an encrypted <abbr>XML</abbr> document.
100 </p>
101 <p>The server uses the Assuan protocol (See <a href="http://www.gnupg.org/documentation/manuals/assuan/Implementation.html#Implementation">(assuan)Implementation</a>) which
102 is the same used by <code>gpg-agent</code>, <code>pinentry</code> and
103 <code>scdaemon</code>. It also uses <cite>libgpg-error</cite> for error reporting with
104 the error source set as <var>GPG_ERR_SOURCE_USER_1</var>.
105 </p>
107 <p>The <abbr>XML</abbr> document uses the following <abbr>DTD</abbr>:
108 </p>
109 <div class="example">
110 <pre class="example"> &lt;?xml version=&quot;1.0&quot;?&gt;
111 &lt;!DOCTYPE pwmd [
112 &lt;!ELEMENT pwmd (element*)&gt;
113 &lt;!ATTLIST element _name CDATA #REQUIRED&gt;
114 ]&gt;
115 </pre></div>
117 <p>The <code>pwmd</code> element is the document root node while all other elements
118 of the document have the name <code>element</code> with an attribute <code>_name</code>
119 whose value uniquely identifies the element at the current element tree depth.
120 It is done this way to avoid <abbr>XML</abbr> parsing errors for commonly used
121 characters. A <abbr>URL</abbr> for example would be an invalid <abbr>XML</abbr> element
122 since the <abbr>URI</abbr> contains a &lsquo;<samp>:</samp>&rsquo; which is also the <abbr>XML</abbr>
123 namespace separator.
124 </p>
125 <p>As mentioned, an element name must be unique for the current element tree
126 depth. You cannot have two elements containing the same <code>_name</code> attribute
127 value. <code>pwmd</code> will stop searching for an element of an <em>element
128 path</em> at the first match then continue searching for the next element of the
129 element path beginning at the child node of the matched element.
130 </p>
131 <p>An <em>element path</em> is a <tt class="key">TAB</tt> delimited character string where each
132 <tt class="key">TAB</tt> separates each element in the path. For example, the element path
133 <code>a<span class="key">TAB</span>b<span class="key">TAB</span>c</code> has the following <abbr>XML</abbr> document structure:
134 </p>
135 <div class="example">
136 <pre class="example"> &lt;pwmd&gt;
137 &lt;element _name=&quot;a&quot;&gt;
138 &lt;element _name=&quot;b&quot;&gt;
139 &lt;element _name=&quot;c&quot;&gt;
140 [... element value or content ...]
141 &lt;/element&gt;
142 &lt;/element&gt;
143 &lt;/element&gt;
144 &lt;/pwmd&gt;
145 </pre></div>
147 <p>The only restriction of an element name is that it contain no whitespace
148 characters. It also cannot begin with a &lsquo;<samp>!</samp>&rsquo; since this character is
149 reserved for the <code>target</code> attribute. See <a href="#Target-Attribute">Target Attribute</a>.
150 </p>
151 <hr>
152 <a name="Access-Control"></a>
153 <div class="header">
155 Next: <a href="#Invoking" accesskey="n" rel="next">Invoking</a>, Previous: <a href="#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
156 </div>
157 <a name="Access-Control-1"></a>
158 <h2 class="chapter">2 Access Control</h2>
160 <p>Like a filesystem has an <abbr>ACL</abbr> to grant or limit access to directories or
161 files for a specific user or group, <code>pwmd</code> can limit a local user,
162 group or a TLS connection to a specific element path. This is done by storing
163 an ACL in the element attribute <var>_acl</var>. Its syntax is similar to the
164 <var>allowed</var> configuration parameter (see <a href="#Configuration">Configuration</a>) with the
165 exception that a TLS fingerprint hash is prefixed with a <tt class="key">#</tt>.
166 </p>
167 <p>Access is denied for all users that are not in the <abbr>ACL</abbr> of an element
168 with the exception of the invoking user (see the <var>invoking_user</var> and
169 <var>invoking_tls</var> configuration parameters (see <a href="#Configuration">Configuration</a>)). The
170 connected client must be in the <abbr>ACL</abbr> for each element in an element path
171 otherwise an error is returned. As an example:
172 </p>
173 <div class="example">
174 <pre class="example">&lt;element _name=&quot;test&quot; _acl=&quot;username,-@wheel,root&quot;&gt;
175 &lt;element _name=&quot;child&quot;/&gt;
176 &lt;/element&gt;
177 </pre></div>
179 <p>The user <code>username</code> would be allowed access to the <code>test</code> element
180 but not if it is a member of the <code>wheel</code> group. Although the <code>root</code>
181 user, who may be a member of the <code>wheel</code> group, is allowed. No users
182 other than the <var>invoking_user</var> is allowed access to the <code>child</code>
183 element.
184 </p>
185 <p>The first user listed in the <abbr>ACL</abbr> is considered the owner of the
186 element. This determines which clients may modify an <var>_acl</var> attribute.
187 The <var>invoking_user</var> may always modify an <abbr>ACL</abbr>.
188 </p>
189 <hr>
190 <a name="Invoking"></a>
191 <div class="header">
193 Next: <a href="#Configuration" accesskey="n" rel="next">Configuration</a>, Previous: <a href="#Access-Control" accesskey="p" rel="prev">Access Control</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
194 </div>
195 <a name="Invoking-pwmd"></a>
196 <h2 class="chapter">3 Invoking <code>pwmd</code></h2>
200 <p>When <code>pwmd</code> is started with the <samp>--use-agent</samp> command
201 line option then <code>pwmd</code> will use <code>gpg-agent</code> for key
202 generation, decryption, signing and caching of passphrases as the
203 default rather than symmetrically encrypted data files.
204 <code>gpg-agent</code> must be running prior to <code>pwmd</code> startup when
205 this option is enabled. The <code>GPG_AGENT_INFO</code> environment variable is
206 set by <code>gpg-agent</code> and <code>pwmd</code> uses this variable to
207 determine where the <code>gpg-agent</code> socket is listening for
208 connections.
209 </p>
210 <p>It is recommended to pass the <samp>--allow-preset-passphrase</samp>
211 command line option to <code>gpg-agent</code>. Doing so allows <code>pwmd</code>
212 cache pushing on startup. It is also recommended to pass the
213 <samp>--allow-loopback-pinentry</samp> to <code>gpg-agent</code>. This option allows
214 a passphrase to be inquired from <code>pwmd</code> when a <code>pinentry</code> is
215 unavailable to the client.
216 </p>
217 <a name="index-Running-pwmd"></a>
218 <p><code>pwmd</code> is executed as follows:
219 </p>
220 <div class="example">
221 <pre class="example">pwmd <var>options</var> [ file1 ] [ &hellip; ]
222 </pre></div>
224 <p>Non-option arguments are data files to cache on startup. When the data file
225 requires a passphrase for decryption a <code>pinentry</code> will prompt either
226 on the current <abbr>TTY</abbr> or from an X11 window when the <code>DISPLAY</code>
227 environment variable is set.
228 </p>
229 <a name="index-Options"></a>
230 <a name="index-Arguments"></a>
231 <p>The following command line options are supported:
232 </p>
233 <a name="index-Getting-help"></a>
234 <dl compact="compact">
235 <dt>&lsquo;<samp>--homedir directory</samp>&rsquo;</dt>
236 <dd><p>The root directory where pwmd will store its data and temporary files. The
237 default is <samp>~/.pwmd</samp>.
238 </p>
239 </dd>
240 <dt>&lsquo;<samp>--rcfile, -f rcfile</samp>&rsquo;</dt>
241 <dd><p>Specify an alternate configuration file. The default is
242 <samp>~/.pwmd/config</samp>.
243 </p>
244 </dd>
245 <dt>&lsquo;<samp>--use-agent</samp>&rsquo;</dt>
246 <dd><p>Enable the use of <code>gpg-agent</code> and add support for data files
247 encrypted with a keypair. Files previously handled by
248 <code>gpg-agent</code> when this option is not specified will no longer be
249 able to be opened and new data files are symmetrically or conventionally
250 encrypted and without a public and private key. If
251 specified, both data file types are supported.
252 </p>
253 </dd>
254 <dt>&lsquo;<samp>--import, -I filename</samp>&rsquo;</dt>
255 <dd><p>Imports an <abbr>XML</abbr> file. The <abbr>XML</abbr> file should be in conformance to
256 the <code>pwmd</code> <abbr>DTD</abbr> (see <a href="#Introduction">Introduction</a>). You
257 will be prompted for a passphrase to encrypt with. The output is written to
258 the filename specified with <samp>--outfile</samp>. To make use of the imported
259 data, place the output file in <samp>~/.pwmd/data</samp>.
260 </p>
261 </dd>
262 <dt>&lsquo;<samp>--keyparam S-expression</samp>&rsquo;</dt>
263 <dd><p>The key parameters to use when generating a new key pair while importing an
264 <abbr>XML</abbr> file or when converting a <em>version 2</em> data file. The argument
265 must be a valid S-expression (See <a href="http://www.gnupg.org/documentation/manuals/gcrypt/S_002dexpressions.html#S_002dexpressions">(gcrypt)S-expressions</a>).
266 </p>
267 </dd>
268 <dt>&lsquo;<samp>--keygrip hexstring</samp>&rsquo;</dt>
269 <dd><p>Specifies the hexadecimal encoded public key-grip to use for encryption when
270 importing or converting. When not specified a new key-pair will be created.
271 </p>
272 </dd>
273 <dt>&lsquo;<samp>--sign-keygrip hexstring</samp>&rsquo;</dt>
274 <dd><p>Specifies the hexadecimal encoded public key-grip to use for signing of the
275 data file when importing or converting. When not specified the generated
276 public key or the key specified with the <samp>--keygrip</samp> option will be
277 used.
278 </p>
279 </dd>
280 <dt>&lsquo;<samp>--passphrase-file, -k filename&quot;</samp>&rsquo;</dt>
281 <dd><p>Obtain the passphrase from the specified filename.
282 </p>
283 </dd>
284 <dt>&lsquo;<samp>--s2k-count iterations</samp>&rsquo;</dt>
285 <dd><p>The number of times to hash the passphrase when importing or converting. The
286 default is the gpg-agent calibrated value of the machine. When less than
287 &lsquo;<samp>65536</samp>&rsquo; the default will be used.
288 </p>
289 </dd>
290 <dt>&lsquo;<samp>--cipher-iterations iterations</samp>&rsquo;</dt>
291 <dd><p>The number of symmetric encryption iterations. The value is actually N+1. The
292 default is 0+1.
293 </p>
294 </dd>
295 <dt>&lsquo;<samp>--cipher algo</samp>&rsquo;</dt>
296 <dd><p>When importing, the cipher to use for data encryption. See the <var>cipher</var>
297 configuration parameter (see <a href="#Configuration">Configuration</a>) for available ciphers. The
298 default is &lsquo;<samp>aes256</samp>&rsquo;.
299 </p>
300 </dd>
301 <dt>&lsquo;<samp>--convert, -C filename</samp>&rsquo;</dt>
302 <dd><p>Converts a <code>pwmd</code> <em>version 2</em> data file to a <em>version 3</em>
303 data file. If encrypted, you will be prompted for a passphrase to use for
304 decryption unless <samp>--passphrase-file</samp> was specified. The converted data
305 file will be saved to the filename specified with <samp>--outfile</samp>. All
306 <samp>--import</samp> related options may also be used when converting.
307 </p>
308 </dd>
309 <dt>&lsquo;<samp>--disable-dump, -D</samp>&rsquo;</dt>
310 <dd><p>Disable the <code>XPATH</code>, <code>XPATHATTR</code>, <code>LIST</code> and <code>DUMP</code>
311 protocol commands (see <a href="#Commands">Commands</a>). This overrides any
312 <var>disable_list_and_dump</var> configuration parameter (see <a href="#Configuration">Configuration</a>).
313 </p>
314 </dd>
315 <dt>&lsquo;<samp>--no-fork, -n</samp>&rsquo;</dt>
316 <dd><p>Run as a foreground process and do not fork into the background.
317 </p>
318 </dd>
319 <dt>&lsquo;<samp>--ignore, --force</samp>&rsquo;</dt>
320 <dd><p>Ignore cache pushing failures on startup. By default, <code>pwmd</code> will exit
321 if an error occurred do to an invalid passphrase or other error.
322 </p>
323 </dd>
324 <dt>&lsquo;<samp>--debug-level keyword,keyword,...</samp>&rsquo;</dt>
325 <dd><p>Output libassuan See <a href="http://www.gnupg.org/documentation/manuals/assuan/index.html#Top">(assuan)Top</a> protocol IO with the comma
326 separated list of output keywords. Valid keywords are: <code>init</code>,
327 <code>ctx</code>, <code>engine</code>, <code>data</code>, <code>sysio</code> and <code>control</code>.
328 </p>
329 </dd>
330 <dt>&lsquo;<samp>--version</samp>&rsquo;</dt>
331 <dd><p>Show the version, copyright and compile time features and exit.
332 </p>
333 </dd>
334 <dt>&lsquo;<samp>--help</samp>&rsquo;</dt>
335 <dd><p>Print a summary of options.
336 </p></dd>
337 </dl>
340 <hr>
341 <a name="Configuration"></a>
342 <div class="header">
344 Next: <a href="#TLS" accesskey="n" rel="next">TLS</a>, Previous: <a href="#Invoking" accesskey="p" rel="prev">Invoking</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
345 </div>
346 <a name="pwmd-configuration-file-options"></a>
347 <h2 class="chapter">4 <code>pwmd</code> configuration file options</h2>
350 <p>If no configuration file is specified with the <code>pwmd</code> <samp>-f</samp>
351 command line option, <code>pwmd</code> will read <samp>~/.pwmd/config</samp> if it
352 exists, and if not, will use defaults. Blank lines and lines beginning with
353 &lsquo;<samp>#</samp>&rsquo; are ignored. Some parameters may have data file specific settings by
354 placing them in a file section. A file section is declared by surrounding the
355 filename with braces (i.e., &lsquo;<samp>[filename]</samp>&rsquo;). Global options may be
356 specified in a &lsquo;<samp>[global]</samp>&rsquo; section and are the default options for new or
357 unspecified files.
358 </p>
359 <p>A tilde <tt class="key">~</tt> will be expanded to the home directory of the invoking user
360 when contained in a parameter whose value is a filename.
361 </p>
362 <a name="index-Reloading-the-configuration-file"></a>
363 <p>The configuration file can be reloaded by sending the <em>SIGHUP</em> signal to
364 a <code>pwmd</code> process.
365 </p>
366 <a name="index-Global-configuration-options"></a>
367 <p>The following options are only for use in the &lsquo;<samp>global</samp>&rsquo; section:
368 </p>
369 <dl compact="compact">
370 <dt>&lsquo;<samp>socket_path = /path/to/socket</samp>&rsquo;</dt>
371 <dd><p>Listen on the specified socket. The default is <samp>~/.pwmd/socket</samp>.
372 </p>
373 </dd>
374 <dt>&lsquo;<samp>socket_perms = octal_mode</samp>&rsquo;</dt>
375 <dd><p>Permissions to set after creating the socket. This will override any
376 <cite>umask(2)</cite> setting.
377 </p>
378 </dd>
379 <dt>&lsquo;<samp>invoking_user = username</samp>&rsquo;</dt>
380 <dd><p>This parameter is not to be confused with setuid or setguid upon startup. It
381 is the local username that may use the <code>XPATH</code>, <code>XPATHATTR</code>
382 and <code>DUMP</code> commands (except when disabled with the
383 <code>disable_list_and_dump</code> option). Other users are denied access to these
384 commands. This also specifies the user that may access any elements that lack
385 an <code>_acl</code> attribute (see <a href="#Access-Control">Access Control</a>). The default is the current
386 user.
387 </p>
388 </dd>
389 <dt>&lsquo;<samp>invoking_tls = hash</samp>&rsquo;</dt>
390 <dd><p>Like <code>invoking_user</code>, but is a hash of a TLS certificate fingerprint.
391 </p>
392 </dd>
393 <dt>&lsquo;<samp>allowed = [-]user,[-]@group,...</samp>&rsquo;</dt>
394 <dd><p>A comma separated list of local user names or group names allowed to connect
395 to the socket. Groups should be prefixed with a &lsquo;<samp>@</samp>&rsquo;. When not specified
396 only the invoking user may connect. A username or group name may also be
397 prefixed with a <tt class="key">-</tt> to prevent access to a specific user or group
398 in the list. The order of the list is important since a user may be of
399 multiple groups.
400 </p>
401 <p>This parameter may also be specified in a filename section to allow or
402 deny a local user to <code>OPEN</code> (see <a href="#OPEN">OPEN</a>) a data file and has the
403 same default to allow only the invoking user.
404 </p>
405 <p>The following example would deny all users in group <code>primary</code> but
406 allow <code>username</code> who is a member of <code>primary</code>:
407 </p>
408 <div class="example">
409 <pre class="example">allowed=-@primary,username
410 </pre></div>
412 </dd>
413 <dt>&lsquo;<samp>disable_mlockall = boolean</samp>&rsquo;</dt>
414 <dd><p>When set to <code>false</code>, <cite>mlockall(2)</cite> will be called on startup. This
415 will use more physical memory but may also be more secure since no swapping to
416 disk will occur. The default is <var>true</var>.
417 </p>
418 </dd>
419 <dt>&lsquo;<samp>log_path = /path/to/logfile</samp>&rsquo;</dt>
420 <dd><p>Logs informational messages to the specified file. The default is
421 <samp>~/.pwmd/log</samp>.
422 </p>
423 </dd>
424 <dt>&lsquo;<samp>enable_logging = boolean</samp>&rsquo;</dt>
425 <dd><p>Enable or disable logging to <var>log_path</var>. The default is <code>false</code>.
426 </p>
427 </dd>
428 <dt>&lsquo;<samp>log_keepopen = boolean</samp>&rsquo;</dt>
429 <dd><p>When set to <code>false</code>, the log file specified with <var>log_path</var> will be
430 closed after writing each line. The default is <code>true</code>.
431 </p>
432 </dd>
433 <dt>&lsquo;<samp>syslog = boolean</samp>&rsquo;</dt>
434 <dd><p>Enable logging to <cite>syslog(8)</cite> with facility <em>LOG_DAEMON</em> and priority
435 <em>LOG_INFO</em>. The default is <code>false</code>.
436 </p>
437 </dd>
438 <dt>&lsquo;<samp>log_level = level</samp>&rsquo;</dt>
439 <dd><p>When <code>0</code>, only connections and errors are logged. When <code>1</code>, client
440 commands are also logged. When <code>2</code>, the command arguments are also logged.
441 The default is <code>0</code>.
442 </p>
443 </dd>
444 <dt>&lsquo;<samp>use_agent = boolean</samp>&rsquo;</dt>
445 <dd><p>When true, enable <code>gpg-agent</code> support (see <a href="#Invoking">Invoking</a>).
446 </p>
447 </dd>
448 <dt>&lsquo;<samp>agent_env_file = filename</samp>&rsquo;</dt>
449 <dd><p>A file containing the <code>GPG_AGENT_INFO</code> environment variable and value as
450 output by the <code>gpg-agent</code> <samp>--write-env-file</samp> command line
451 option.
452 </p>
453 </dd>
454 <dt>&lsquo;<samp>kill_scd = boolean</samp>&rsquo;</dt>
455 <dd><p>Kill <code>scdaemon</code> after each <code>OPEN</code> (see <a href="#OPEN">OPEN</a>) or <code>SAVE</code>
456 (see <a href="#SAVE">SAVE</a>) command.
457 </p>
458 </dd>
459 <dt>&lsquo;<samp>require_save_key = boolean</samp>&rsquo;</dt>
460 <dd><p>Require the passphrase needed to open a data file before writing changes
461 of the documment to disk reguardless of the key cache status.
462 </p>
463 </dd>
464 <dt>&lsquo;<samp>disable_list_and_dump = boolean</samp>&rsquo;</dt>
465 <dd><p>When <code>true</code>, the <code>XPATH</code>, <code>XPATHATTR</code>, <code>LIST</code> and
466 <code>DUMP</code> protocol commands (see <a href="#Commands">Commands</a>) will be disabled.
467 </p>
468 </dd>
469 <dt>&lsquo;<samp>cache_push = file1,file2</samp>&rsquo;</dt>
470 <dd><p>A comma separated list of filenames that will be pushed into the file cache
471 upon startup. <code>pwmd</code> will prompt for the passphrase for each file unless
472 specified with the <var>passphrase</var> or <var>passphrase_file</var> parameters in a
473 matching file section.
474 </p>
475 </dd>
476 <dt>&lsquo;<samp>priority = integer</samp>&rsquo;</dt>
477 <dd><p>The priority, or niceness, of the server. The default is inherited from the
478 parent process.
479 </p>
480 </dd>
481 <dt>&lsquo;<samp>cipher = algorithm</samp>&rsquo;</dt>
482 <dd><p>The default cipher to use for data encryption. The algorithm must be one of:
483 <code>aes128</code>, <code>aes192</code>, <code>aes256</code>, <code>serpent128</code>,
484 <code>serpent192</code>, <code>serpent256</code>, <code>camellia128</code>,
485 <code>camellia192</code>, <code>camellia256</code>, <code>3des</code>, <code>cast5</code>,
486 <code>blowfish</code>, <code>twofish128</code> or <code>twofish256</code>. The default is
487 <code>aes256</code>.
488 </p>
489 </dd>
490 <dt>&lsquo;<samp>cipher_iterations = integer</samp>&rsquo;</dt>
491 <dd><p>The number of times to encrypt the XML data. This differs from the
492 <var>s2k_count</var> parameter which specifies the number of times to hash the
493 passphrase used to encrypt the data. The default is 0 although 1 iteration is
494 still done.
495 </p>
496 </dd>
497 <dt>&lsquo;<samp>cipher_progress = integer</samp>&rsquo;</dt>
498 <dd><p>Send a progress message to the client after the specified amount of encryption
499 or decryption iterations have been done. The default is 2000.
500 </p>
501 </dd>
502 <dt>&lsquo;<samp>keyparam = s-expression</samp>&rsquo;</dt>
503 <dd><p>The default key paramaters to use when generating a new key-pair. The
504 default is RSA with 2048 bits. Note that only RSA as the encryption
505 algorithm is supported at the moment. Both RSA and DSA keys may be used
506 for signing.
507 </p>
508 </dd>
509 <dt>&lsquo;<samp>pinentry_path = /path/to/pinentry</samp>&rsquo;</dt>
510 <dd><p>The location of the <code>pinentry</code> binary. This program is used to
511 prompt for a passphrase when not using <code>gpg-agent</code>. The default
512 is specified at compile time.
513 </p>
514 </dd>
515 <dt>&lsquo;<samp>pinentry_timeout = seconds</samp>&rsquo;</dt>
516 <dd><p>The number of seconds to wait for a pinentry before giving up and
517 returning an error. This timeout value is used for both waiting for
518 another pinentry to complete and for the pinentry waiting for user input.
519 </p></dd>
520 </dl>
522 <a name="index-Data-file-configuration-options"></a>
523 <p>The following options are defaults for new files when specified in the
524 &lsquo;<samp>global</samp>&rsquo; section. When placed in a data file section they are options
525 specific to that data file only.
526 </p>
527 <dl compact="compact">
528 <dt>&lsquo;<samp>backup = boolean</samp>&rsquo;</dt>
529 <dd><p>Whether to create a backup of the data file when saving. The backup filename
530 has the <samp>.backup</samp> extension appended to the opened file. The default is
531 <code>true</code>.
532 </p>
533 </dd>
534 <dt>&lsquo;<samp>cache_timeout = seconds</samp>&rsquo;</dt>
535 <dd><p>The number of seconds to keep the cache entry for this file. If <code>-1</code>, the
536 cache entry is kept forever. If <code>0</code>, each time an encrypted file is
537 <code>OPEN</code>ed (see <a href="#OPEN">OPEN</a>) a passphrase will be required. The default
538 is <code>600</code> or 10 minutes.
539 </p>
540 </dd>
541 <dt>&lsquo;<samp>xfer_progress = bytes</samp>&rsquo;</dt>
542 <dd><p>Commands that send data lines to the client will also send the <code>XFER</code>
543 status message (see <a href="#Status-Messages">Status Messages</a>) after the specified number of bytes
544 have been sent. The number of bytes is rounded to <var>ASSUAN_LINELENGTH</var> or
545 <code>1002</code> bytes. The default is <code>8196</code>.
546 </p>
547 </dd>
548 <dt>&lsquo;<samp>passphrase = string</samp>&rsquo;</dt>
549 <dd><p>The passphrase to use for this file. If specified in the &lsquo;<samp>global</samp>&rsquo; section
550 then &lsquo;<samp>global</samp>&rsquo; is treated as a data filename and not a default for other
551 files. Note that if a client changes the passphrase for this data file then
552 this value is not modified and will need to be updated.
553 </p>
554 </dd>
555 <dt>&lsquo;<samp>passphrase_file = /path/to/file</samp>&rsquo;</dt>
556 <dd><p>Same as the <var>passphrase</var> parameter above but obtains the passphrase from
557 the specified filename.
558 </p>
559 </dd>
560 <dt>&lsquo;<samp>recursion_depth = integer</samp>&rsquo;</dt>
561 <dd><p>The maximum number of times to resolve a <code>target</code> attribute for an
562 element in an element path (see <a href="#Target-Attribute">Target Attribute</a>). An error is returned
563 when this value is exceeded. The default is <code>100</code> but can be disabled by
564 setting to <code>0</code> (<em>not recommended</em>).
565 </p>
566 </dd>
567 <dt>&lsquo;<samp>allowed = [-]user,[-]@group,...</samp>&rsquo;</dt>
568 <dd><p>Same parameter value as the <code>allowed</code> parameter mentioned above in
569 the &lsquo;<samp>global</samp>&rsquo; section but grants or denies a local user from opening
570 a specific data file. The default is to allow only the invoking user.
571 </p>
572 </dd>
573 </dl>
574 <table class="menu" border="0" cellspacing="0">
575 <tr><td align="left" valign="top">&bull; <a href="#TLS" accesskey="1">TLS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Remote connections over TLS.
576 </td></tr>
577 <tr><td align="left" valign="top">&bull; <a href="#Pinentry" accesskey="2">Pinentry</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Configuration file and defaults.
578 </td></tr>
579 </table>
581 <hr>
582 <a name="TLS"></a>
583 <div class="header">
585 Next: <a href="#Pinentry" accesskey="n" rel="next">Pinentry</a>, Previous: <a href="#Configuration" accesskey="p" rel="prev">Configuration</a>, Up: <a href="#Configuration" accesskey="u" rel="up">Configuration</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
586 </div>
587 <a name="Configuring-remote-connections-over-TLS_002e"></a>
588 <h2 class="chapter">5 Configuring remote connections over TLS.</h2>
589 <p>Remote connections can also be made to <code>pwmd</code> over <abbr>TLS</abbr>.
590 Authentication is done by using X509 client certificates that are signed with
591 the same Certificate Authority (<abbr>CA</abbr>) as the server certificate.
592 </p>
593 <p>The <abbr>CA</abbr> certificate is expected to be found in
594 <samp>~/.pwmd/ca-cert.pem</samp> while the <code>pwmd</code> server certificate and key
595 file should be put in <samp>~/.pwmd/server-cert.pem</samp> and
596 <samp>~/.pwmd/server-key.pem</samp>, respectively.
597 </p>
598 <p>See the documentation of <code>certtool</code> or <code>openssl</code> for details
599 on creating self-signed certificates.
600 </p>
601 <p>The following TLS configuration options are available:
602 </p>
603 <dl compact="compact">
604 <dt>&lsquo;<samp>enable_tcp = boolean</samp>&rsquo;</dt>
605 <dd><p>Whether to enable TCP/TLS server support. If enabled, both TCP and the local
606 unix domain socket will listen for connections. The default is
607 <code>false</code>.
608 </p>
609 </dd>
610 <dt>&lsquo;<samp>tcp_port = integer</samp>&rsquo;</dt>
611 <dd><p>The TCP port to listen on when <var>enable_tcp</var> is <code>true</code>. The default is
612 <code>6466</code>.
613 </p>
614 </dd>
615 <dt>&lsquo;<samp>tcp_bind = string</samp>&rsquo;</dt>
616 <dd><p>The internet protocol to listen with. Must be one of <code>ipv4</code>, <code>ipv6</code>
617 or <code>any</code> to listen for both IPv4 and IPv6 connections.
618 </p>
619 </dd>
620 <dt>&lsquo;<samp>tcp_interface = string</samp>&rsquo;</dt>
621 <dd><p>Only useful if running as root.
622 </p>
623 </dd>
624 <dt>&lsquo;<samp>tls_timeout = seconds</samp>&rsquo;</dt>
625 <dd><p>The number of seconds to wait for a read() or write() call on a
626 <abbr>TLS</abbr> client file descriptor to complete before returning an
627 error. The default is <var>300</var>.
628 </p>
629 <p>Note that the <code>SAVE</code> command (see <a href="#SAVE">SAVE</a>) may take a longer time
630 to complete than other commands since key generation may need to be done
631 or do to a large <samp>--cipher-iterations</samp> setting.
632 </p>
633 </dd>
634 <dt>&lsquo;<samp>keepalive_interval = seconds</samp>&rsquo;</dt>
635 <dd><p>Send a keepalive status message to an idle remote client. An idle
636 client is one who is not in a command. The purpose of this status
637 message is to disconnect a hung remote client and release any file mutex
638 locks so another client may open the same data file. The default is <code>60</code>.
639 </p>
640 </dd>
641 <dt>&lsquo;<samp>tls_access = [+][!-]string[,[!-]string,...]</samp>&rsquo;</dt>
642 <dd><p>A comma separated list of client X509 certificate fingerprints in SHA-1
643 format that will be allowed to connect or open a file. If prefixed with
644 <code>!</code> or <code>-</code> then access is denied for the fingerprint. When
645 <code>!</code> or <code>-</code> is found by itself in the list it is treated as a
646 default for remaining fingerprints in the list. The <code>+</code> prefix
647 behaves the same but allows access. The order of the list is important
648 meaning that if one or more fingerprints is of the same SHA-1 hash, only
649 the final in the list is considered.
650 </p>
651 <p>The access control is two fold: when the client connects its SHA-1
652 fingerprint is matched against the list of allowed fingerprints in the
653 &lsquo;<samp>global</samp>&rsquo; section. When allowed in the &lsquo;<samp>global</samp>&rsquo; section the
654 connection is established and the client may proceed to <code>OPEN</code>
655 (see <a href="#OPEN">OPEN</a>) a data file. During the <code>OPEN</code>, <code>CLEARCACHE</code>
656 and <code>CACHETIMEOUT</code> commands, the
657 fingerprint is checked again in a &lsquo;<samp>filename</samp>&rsquo; section. When this
658 parameter is not found in a &lsquo;<samp>filename</samp>&rsquo; section then access is
659 granted.
660 </p>
661 </dd>
662 <dt>&lsquo;<samp>tcp_require_key = boolean</samp>&rsquo;</dt>
663 <dd><p>When <code>true</code>, require the remote client to provide the key or passphrase
664 to open a data file even if the file is cached. Note that the cache entry is
665 cleared during the see <a href="#OPEN">OPEN</a> command and the passphrase will be retrieved
666 from the client via a server <em>INQUIRE</em>. This option is a default
667 for all files when specified in the &lsquo;<samp>global</samp>&rsquo; section. The default
668 is <code>false</code>.
669 </p>
670 </dd>
671 <dt>&lsquo;<samp>tcp_wait = integer</samp>&rsquo;</dt>
672 <dd><p>The time in tenths of a second to wait between TCP connections. Setting to 0
673 will disable waiting. The default is <code>3</code>.
674 </p>
675 </dd>
676 <dt>&lsquo;<samp>tls_cipher_suite = string</samp>&rsquo;</dt>
677 <dd><p>The GnuTLS cipher suite and protocol to use. See the GnuTLS documentation for
678 information about the format of this string. The default is <code>SECURE256</code>.
679 </p></dd>
680 </dl>
682 <hr>
683 <a name="Pinentry"></a>
684 <div class="header">
686 Next: <a href="#Commands" accesskey="n" rel="next">Commands</a>, Previous: <a href="#TLS" accesskey="p" rel="prev">TLS</a>, Up: <a href="#Configuration" accesskey="u" rel="up">Configuration</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
687 </div>
688 <a name="Pinentry-configuration"></a>
689 <h2 class="chapter">6 Pinentry configuration</h2>
691 <p>The <code>pinentry</code> program is used to prompt the user for passphrase
692 input or as a confirmation dialog; it needs to know where to prompt for
693 the input, beit from a terminal or an X11 display.
694 </p>
695 <p>It is the responsibility of the client to tell <code>pinentry</code> about
696 the terminal or X11 display before requiring the input. This is done by
697 using the <code>pwmd</code> <code>OPTION</code> (see <a href="#OPTION">OPTION</a>) protocol command. It
698 need be done only once per client connection. To avoid the use of
699 <code>pinentry</code> entirely, use the <code>OPTION</code> (see <a href="#OPTION">OPTION</a>)
700 <samp>--disable-pinentry</samp> protocol command.
701 </p>
702 <hr>
703 <a name="Commands"></a>
704 <div class="header">
706 Next: <a href="#Status-Messages" accesskey="n" rel="next">Status Messages</a>, Previous: <a href="#Pinentry" accesskey="p" rel="prev">Pinentry</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
707 </div>
708 <a name="Protocol-commands-and-their-syntax"></a>
709 <h2 class="chapter">7 Protocol commands and their syntax</h2>
710 <table class="menu" border="0" cellspacing="0">
711 <tr><td align="left" valign="top">&bull; <a href="#AGENT" accesskey="1">AGENT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
712 </td></tr>
713 <tr><td align="left" valign="top">&bull; <a href="#ATTR" accesskey="2">ATTR</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
714 </td></tr>
715 <tr><td align="left" valign="top">&bull; <a href="#CACHETIMEOUT" accesskey="3">CACHETIMEOUT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
716 </td></tr>
717 <tr><td align="left" valign="top">&bull; <a href="#CLEARCACHE" accesskey="4">CLEARCACHE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
718 </td></tr>
719 <tr><td align="left" valign="top">&bull; <a href="#COPY" accesskey="5">COPY</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
720 </td></tr>
721 <tr><td align="left" valign="top">&bull; <a href="#DELETE" accesskey="6">DELETE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
722 </td></tr>
723 <tr><td align="left" valign="top">&bull; <a href="#DUMP" accesskey="7">DUMP</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
724 </td></tr>
725 <tr><td align="left" valign="top">&bull; <a href="#GET" accesskey="8">GET</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
726 </td></tr>
727 <tr><td align="left" valign="top">&bull; <a href="#GETCONFIG" accesskey="9">GETCONFIG</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
728 </td></tr>
729 <tr><td align="left" valign="top">&bull; <a href="#GETINFO">GETINFO</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
730 </td></tr>
731 <tr><td align="left" valign="top">&bull; <a href="#HELP">HELP</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
732 </td></tr>
733 <tr><td align="left" valign="top">&bull; <a href="#IMPORT">IMPORT</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
734 </td></tr>
735 <tr><td align="left" valign="top">&bull; <a href="#ISCACHED">ISCACHED</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
736 </td></tr>
737 <tr><td align="left" valign="top">&bull; <a href="#KEYGRIP">KEYGRIP</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
738 </td></tr>
739 <tr><td align="left" valign="top">&bull; <a href="#LIST">LIST</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
740 </td></tr>
741 <tr><td align="left" valign="top">&bull; <a href="#LOCK">LOCK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
742 </td></tr>
743 <tr><td align="left" valign="top">&bull; <a href="#LS">LS</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
744 </td></tr>
745 <tr><td align="left" valign="top">&bull; <a href="#MOVE">MOVE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
746 </td></tr>
747 <tr><td align="left" valign="top">&bull; <a href="#NOP">NOP</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
748 </td></tr>
749 <tr><td align="left" valign="top">&bull; <a href="#OPEN">OPEN</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
750 </td></tr>
751 <tr><td align="left" valign="top">&bull; <a href="#OPTION">OPTION</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
752 </td></tr>
753 <tr><td align="left" valign="top">&bull; <a href="#PASSWD">PASSWD</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
754 </td></tr>
755 <tr><td align="left" valign="top">&bull; <a href="#REALPATH">REALPATH</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
756 </td></tr>
757 <tr><td align="left" valign="top">&bull; <a href="#RENAME">RENAME</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
758 </td></tr>
759 <tr><td align="left" valign="top">&bull; <a href="#RESET">RESET</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
760 </td></tr>
761 <tr><td align="left" valign="top">&bull; <a href="#SAVE">SAVE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
762 </td></tr>
763 <tr><td align="left" valign="top">&bull; <a href="#STORE">STORE</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
764 </td></tr>
765 <tr><td align="left" valign="top">&bull; <a href="#UNLOCK">UNLOCK</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
766 </td></tr>
767 <tr><td align="left" valign="top">&bull; <a href="#XPATH">XPATH</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
768 </td></tr>
769 <tr><td align="left" valign="top">&bull; <a href="#XPATHATTR">XPATHATTR</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
770 </td></tr>
771 </table>
772 <hr>
773 <a name="AGENT"></a>
774 <div class="header">
776 Next: <a href="#ATTR" accesskey="n" rel="next">ATTR</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
777 </div>
778 <a name="AGENT-command"></a>
779 <h2 class="chapter">8 AGENT command</h2>
780 <a name="index-AGENT-command"></a>
781 <p>Syntax:
782 </p><div class="example">
783 <pre class="example">AGENT &lt;command&gt;
784 </pre></div>
786 <p>Send a <code>gpg-agent</code> protocol <var>command</var> directly to the
787 <code>gpg-agent</code>.
788 </p>
790 <hr>
791 <a name="ATTR"></a>
792 <div class="header">
794 Next: <a href="#CACHETIMEOUT" accesskey="n" rel="next">CACHETIMEOUT</a>, Previous: <a href="#AGENT" accesskey="p" rel="prev">AGENT</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
795 </div>
796 <a name="ATTR-command"></a>
797 <h2 class="chapter">9 ATTR command</h2>
798 <a name="index-ATTR-command"></a>
799 <p>Syntax:
800 </p><div class="example">
801 <pre class="example">ATTR [--inquire] SET|GET|DELETE|LIST [&lt;attribute&gt;] [!]element[&lt;TAB&gt;[!]child[..]] ..
802 </pre></div>
804 <dl compact="compact">
805 <dt>ATTR SET attribute [!]element[&lt;TAB&gt;[!]child[..]] [value]</dt>
806 <dd>
807 <p>Stores or updates an <var>attribute</var> name and optional <var>value</var> of an
808 element. When no <var>value</var> is specified any existing value will be removed.
809 </p>
810 </dd>
811 <dt>ATTR DELETE attribute [!]element[&lt;TAB&gt;[!]child[..]]</dt>
812 <dd>
813 <p>Removes an <var>attribute</var> from an element.
814 </p>
815 </dd>
816 <dt>ATTR LIST [!]element[&lt;TAB&gt;[!]child[..]]</dt>
817 <dd>
818 <p>Retrieves a newline separated list of attributes names and values
819 from the specified element. Each attribute name and value is space delimited.
820 </p>
821 </dd>
822 <dt>ATTR GET attribute [!]element[&lt;TAB&gt;[!]child[..]]</dt>
823 <dd>
824 <p>Retrieves the value of an <var>attribute</var> from an element.
825 </p></dd>
826 </dl>
828 <p>The <code>_name</code> attribute (case sensitive) cannot be removed nor modified.
829 Use the <code>DELETE</code> (see <a href="#DELETE">DELETE</a>) or <code>RENAME</code> (see <a href="#RENAME">RENAME</a>)
830 commands instead.
831 </p>
832 <p>The <code>_mtime</code> attribute is updated each time an element is modified by
833 either storing content, editing attributes or by deleting a child element.
834 The <code>_ctime</code> attribute is created for each new element in an element
835 path.
836 </p>
837 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
838 arguments are retrieved via a server <em>INQUIRE</em>.
839 </p>
840 <p>See <a href="#Target-Attribute">Target Attribute</a>, for details about this special attribute.
841 </p>
843 <hr>
844 <a name="CACHETIMEOUT"></a>
845 <div class="header">
847 Next: <a href="#CLEARCACHE" accesskey="n" rel="next">CLEARCACHE</a>, Previous: <a href="#ATTR" accesskey="p" rel="prev">ATTR</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
848 </div>
849 <a name="CACHETIMEOUT-command"></a>
850 <h2 class="chapter">10 CACHETIMEOUT command</h2>
851 <a name="index-CACHETIMEOUT-command"></a>
852 <p>Syntax:
853 </p><div class="example">
854 <pre class="example">CACHETIMEOUT &lt;filename&gt; &lt;seconds&gt;
855 </pre></div>
857 <p>The time in <var>seconds</var> until <var>filename</var> will be removed from the
858 cache. <code>-1</code> will keep the cache entry forever, <code>0</code> will require
859 the passphrase for each <code>OPEN</code> or <code>SAVE</code> command (see <a href="#OPEN">OPEN</a>,
860 see <a href="#SAVE">SAVE</a>). See <a href="#Configuration">Configuration</a>, and the <code>cache_timeout</code>
861 parameter.
862 </p>
864 <hr>
865 <a name="CLEARCACHE"></a>
866 <div class="header">
868 Next: <a href="#COPY" accesskey="n" rel="next">COPY</a>, Previous: <a href="#CACHETIMEOUT" accesskey="p" rel="prev">CACHETIMEOUT</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
869 </div>
870 <a name="CLEARCACHE-command"></a>
871 <h2 class="chapter">11 CLEARCACHE command</h2>
872 <a name="index-CLEARCACHE-command"></a>
873 <p>Syntax:
874 </p><div class="example">
875 <pre class="example">CLEARCACHE [&lt;filename&gt;]
876 </pre></div>
878 <p>Clears a file cache entry for all or the specified <var>filename</var>.
879 </p>
881 <hr>
882 <a name="COPY"></a>
883 <div class="header">
885 Next: <a href="#DELETE" accesskey="n" rel="next">DELETE</a>, Previous: <a href="#CLEARCACHE" accesskey="p" rel="prev">CLEARCACHE</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
886 </div>
887 <a name="COPY-command"></a>
888 <h2 class="chapter">12 COPY command</h2>
889 <a name="index-COPY-command"></a>
890 <p>Syntax:
891 </p><div class="example">
892 <pre class="example">COPY [--inquire] [!]source[&lt;TAB&gt;[!]child[..]] [!]dest[&lt;TAB&gt;[!]child[..]]
893 </pre></div>
895 <p>Copies the entire element tree starting from the child node of the source
896 element, to the destination element path. If the destination element path
897 does not exist then it will be created; otherwise it is overwritten.
898 </p>
899 <p>Note that attributes from the source element are merged into the
900 destination element when the destination element path exists. When an
901 attribute of the same name exists in both the source and destination
902 elements then the destination attribute will be updated to the source
903 attribute value.
904 </p>
905 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
906 arguments are retrieved via a server <em>INQUIRE</em>.
907 </p>
909 <hr>
910 <a name="DELETE"></a>
911 <div class="header">
913 Next: <a href="#DUMP" accesskey="n" rel="next">DUMP</a>, Previous: <a href="#COPY" accesskey="p" rel="prev">COPY</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
914 </div>
915 <a name="DELETE-command"></a>
916 <h2 class="chapter">13 DELETE command</h2>
917 <a name="index-DELETE-command"></a>
918 <p>Syntax:
919 </p><div class="example">
920 <pre class="example">DELETE [--inquire] [!]element[&lt;TAB&gt;[!]child[..]]
921 </pre></div>
923 <p>Removes the specified element path and all of its children. This may break
924 an element with a <code>target</code> attribute (see <a href="#Target-Attribute">Target Attribute</a>) that
925 refers to this element or any of its children.
926 </p>
927 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
928 arguments are retrieved via a server <em>INQUIRE</em>.
929 </p>
931 <hr>
932 <a name="DUMP"></a>
933 <div class="header">
935 Next: <a href="#GET" accesskey="n" rel="next">GET</a>, Previous: <a href="#DELETE" accesskey="p" rel="prev">DELETE</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
936 </div>
937 <a name="DUMP-command"></a>
938 <h2 class="chapter">14 DUMP command</h2>
939 <a name="index-DUMP-command"></a>
940 <p>Syntax:
941 </p><div class="example">
942 <pre class="example">DUMP
943 </pre></div>
945 <p>Shows the in memory <abbr>XML</abbr> document with indenting. See <a href="#XPATH">XPATH</a>, for
946 dumping a specific node.
947 </p>
949 <hr>
950 <a name="GET"></a>
951 <div class="header">
953 Next: <a href="#GETCONFIG" accesskey="n" rel="next">GETCONFIG</a>, Previous: <a href="#DUMP" accesskey="p" rel="prev">DUMP</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
954 </div>
955 <a name="GET-command"></a>
956 <h2 class="chapter">15 GET command</h2>
957 <a name="index-GET-command"></a>
958 <p>Syntax:
959 </p><div class="example">
960 <pre class="example">GET [--inquire] [!]element[&lt;TAB&gt;[!]child[..]]
961 </pre></div>
963 <p>Retrieves the content of the specified element. The content is returned
964 with a data response.
965 </p>
966 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
967 arguments are retrieved via a server <em>INQUIRE</em>.
968 </p>
970 <hr>
971 <a name="GETCONFIG"></a>
972 <div class="header">
974 Next: <a href="#GETINFO" accesskey="n" rel="next">GETINFO</a>, Previous: <a href="#GET" accesskey="p" rel="prev">GET</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
975 </div>
976 <a name="GETCONFIG-command"></a>
977 <h2 class="chapter">16 GETCONFIG command</h2>
978 <a name="index-GETCONFIG-command"></a>
979 <p>Syntax:
980 </p><div class="example">
981 <pre class="example">GETCONFIG [filename] &lt;parameter&gt;
982 </pre></div>
984 <p>Returns the value of a <code>pwmd</code> configuration <var>parameter</var> with a
985 data response. If no file has been opened then the value for <var>filename</var>
986 or the default from the &lsquo;<samp>global</samp>&rsquo; section will be returned. If a file
987 has been opened and no <var>filename</var> is specified, a value previously
988 set with the <code>OPTION</code> command (see <a href="#OPTION">OPTION</a>) will be returned.
989 </p>
991 <hr>
992 <a name="GETINFO"></a>
993 <div class="header">
995 Next: <a href="#HELP" accesskey="n" rel="next">HELP</a>, Previous: <a href="#GETCONFIG" accesskey="p" rel="prev">GETCONFIG</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
996 </div>
997 <a name="GETINFO-command"></a>
998 <h2 class="chapter">17 GETINFO command</h2>
999 <a name="index-GETINFO-command"></a>
1000 <p>Syntax:
1001 </p><div class="example">
1002 <pre class="example">GETINFO [--data] CACHE | CLIENTS | PID | LAST_ERROR | VERSION
1003 </pre></div>
1005 <p>Get server and other information: <var>cache</var> returns the number of cached
1006 documents via a status message. <var>clients</var> returns the number of
1007 connected clients via a status message. <var>pid</var> returns the process ID
1008 number of the server via a data response. <var>VERSION</var> returns the server
1009 version number and compile-time features with a data response with each
1010 being space delimited. <var>LAST_ERROR</var> returns a detailed description of
1011 the last failed command when available. See <a href="#Status-Messages">Status Messages</a>.
1012 </p>
1013 <p>When the <samp>--data</samp> option is specified then the result will be sent
1014 via a data response rather than a status message.
1015 </p>
1017 <hr>
1018 <a name="HELP"></a>
1019 <div class="header">
1021 Next: <a href="#IMPORT" accesskey="n" rel="next">IMPORT</a>, Previous: <a href="#GETINFO" accesskey="p" rel="prev">GETINFO</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1022 </div>
1023 <a name="HELP-command"></a>
1024 <h2 class="chapter">18 HELP command</h2>
1025 <a name="index-HELP-command"></a>
1026 <p>Syntax:
1027 </p><div class="example">
1028 <pre class="example">HELP [&lt;COMMAND&gt;]
1029 </pre></div>
1031 <p>Show available commands or command specific help text.
1032 </p>
1034 <hr>
1035 <a name="IMPORT"></a>
1036 <div class="header">
1038 Next: <a href="#ISCACHED" accesskey="n" rel="next">ISCACHED</a>, Previous: <a href="#HELP" accesskey="p" rel="prev">HELP</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1039 </div>
1040 <a name="IMPORT-command"></a>
1041 <h2 class="chapter">19 IMPORT command</h2>
1042 <a name="index-IMPORT-command"></a>
1043 <p>Syntax:
1044 </p><div class="example">
1045 <pre class="example">IMPORT [--root [!]element[&lt;TAB&gt;[!]child[..]]] &lt;content&gt;
1046 </pre></div>
1048 <p>This command uses a server <em>INQUIRE</em> to retrieve data from the client.
1049 </p>
1050 <p>Like the <code>STORE</code> command (see <a href="#STORE">STORE</a>), but the <var>content</var>
1051 argument is raw <abbr>XML</abbr> data. The content is created as a child of
1052 the element path specified with the <samp>--root</samp> option or at the
1053 document root when not specified. Existing elements of the same name will
1054 be overwritten.
1055 </p>
1056 <p>The content must begin with an <abbr>XML</abbr> element node. See <a href="#Introduction">Introduction</a>,
1057 for details.
1058 </p>
1060 <hr>
1061 <a name="ISCACHED"></a>
1062 <div class="header">
1064 Next: <a href="#KEYGRIP" accesskey="n" rel="next">KEYGRIP</a>, Previous: <a href="#IMPORT" accesskey="p" rel="prev">IMPORT</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1065 </div>
1066 <a name="ISCACHED-command"></a>
1067 <h2 class="chapter">20 ISCACHED command</h2>
1068 <a name="index-ISCACHED-command"></a>
1069 <p>Syntax:
1070 </p><div class="example">
1071 <pre class="example">ISCACHED [--lock] &lt;filename&gt;
1072 </pre></div>
1074 <p>An <em>OK</em> response is returned if the specified <var>filename</var> is found
1075 in the file cache. If not found in the cache but exists on the filesystem
1076 then <var>GPG_ERR_NO_DATA</var> is returned. Otherwise a filesystem error is
1077 returned.
1078 </p>
1079 <p>The <samp>lock</samp> option will lock the file mutex of <var>filename</var> when the
1080 file exists; it does not need to be opened nor cached. The lock will be
1081 released when the client exits or sends the <code>UNLOCK</code> (see <a href="#UNLOCK">UNLOCK</a>)
1082 command.
1083 </p>
1085 <hr>
1086 <a name="KEYGRIP"></a>
1087 <div class="header">
1089 Next: <a href="#LIST" accesskey="n" rel="next">LIST</a>, Previous: <a href="#ISCACHED" accesskey="p" rel="prev">ISCACHED</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1090 </div>
1091 <a name="KEYGRIP-command"></a>
1092 <h2 class="chapter">21 KEYGRIP command</h2>
1093 <a name="index-KEYGRIP-command"></a>
1094 <p>Syntax:
1095 </p><div class="example">
1096 <pre class="example">KEYGRIP [--sign] &lt;filename&gt;
1097 </pre></div>
1099 <p>Returns the hex encoded keygrip of the specified <var>filename</var> with a
1100 data response.
1101 </p>
1102 <p>When the <samp>--sign</samp> option is specified then the key used for signing
1103 of the specified <var>filename</var> will be returned.
1104 </p>
1105 <p>For symmetrically encrypted data files this command returns the error
1106 GPG_ERR_NOT_SUPPORTED.
1107 </p>
1109 <hr>
1110 <a name="LIST"></a>
1111 <div class="header">
1113 Next: <a href="#LOCK" accesskey="n" rel="next">LOCK</a>, Previous: <a href="#KEYGRIP" accesskey="p" rel="prev">KEYGRIP</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1114 </div>
1115 <a name="LIST-command"></a>
1116 <h2 class="chapter">22 LIST command</h2>
1117 <a name="index-LIST-command"></a>
1118 <p>Syntax:
1119 </p><div class="example">
1120 <pre class="example">LIST [--inquire] [--no-recurse] [--verbose] [--with-target] [--all] [[!]element[&lt;TAB&gt;[!]child[..]]]
1121 </pre></div>
1123 <p>If no element path is given then a newline separated list of root elements
1124 is returned with a data response. If given, then all reachable elements
1125 of the specified element path are returned unless the <samp>--no-recurse</samp>
1126 option is specified. If specified, only the child elements of the element
1127 path are returned without recursing into grandchildren. Each resulting
1128 element is prefixed with the literal <code>!</code> character when the element
1129 contains no <code>target</code> attribute. See <a href="#Target-Attribute">Target Attribute</a>, for details.
1130 </p>
1131 <p>When the <samp>--verbose</samp> option is passed then each element path
1132 returned will have zero or more flags appened to it. These flags are
1133 delimited from the element path by a single space character. A flag itself
1134 is a single character. Flag <code>P</code> indicates that access to the element
1135 is denied. Flag <code>+</code> indicates that there are child nodes of
1136 the current element path. Flag <code>E</code> indicates that an element of an
1137 element path contained in a <var>target</var> attribute could not be found. Flag
1138 <code>O</code> indicates that a <var>target</var> attribute recursion limit was reached
1139 (see <a href="#Configuration">Configuration</a>). Flag <code>T</code> will append the resolved element path
1140 of the <var>target</var> attribute contained in the current element (see below).
1141 </p>
1142 <p>The <samp>--with-target</samp> option implies <samp>--verbose</samp> and will append
1143 an additional flag <code>T</code> followed by a single space then an element path.
1144 The appended element path is the resolved path (see <a href="#REALPATH">REALPATH</a>) of the
1145 current element when it contains a <var>target</var> attribute. When no
1146 <var>target</var> attribute is found then no flag will be appended.
1147 </p>
1148 <p>The <samp>--no-recurse</samp> option limits the amount of data returned to only
1149 the listing of children of the specified element path and not any
1150 grandchildren.
1151 </p>
1152 <p>The <samp>--all</samp> option lists the entire element tree for each root
1153 element. This option also implies option <samp>--verbose</samp>.
1154 </p>
1155 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
1156 arguments are retrieved via a server <em>INQUIRE</em>.
1157 </p>
1159 <hr>
1160 <a name="LOCK"></a>
1161 <div class="header">
1163 Next: <a href="#LS" accesskey="n" rel="next">LS</a>, Previous: <a href="#LIST" accesskey="p" rel="prev">LIST</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1164 </div>
1165 <a name="LOCK-command"></a>
1166 <h2 class="chapter">23 LOCK command</h2>
1167 <a name="index-LOCK-command"></a>
1168 <p>Syntax:
1169 </p><div class="example">
1170 <pre class="example">LOCK
1171 </pre></div>
1173 <p>Locks the mutex associated with the opened file. This prevents other clients
1174 from sending commands to the same opened file until the client
1175 that sent this command either disconnects or sends the <code>UNLOCK</code>
1176 command. See <a href="#UNLOCK">UNLOCK</a>.
1177 </p>
1179 <hr>
1180 <a name="LS"></a>
1181 <div class="header">
1183 Next: <a href="#MOVE" accesskey="n" rel="next">MOVE</a>, Previous: <a href="#LOCK" accesskey="p" rel="prev">LOCK</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1184 </div>
1185 <a name="LS-command"></a>
1186 <h2 class="chapter">24 LS command</h2>
1187 <a name="index-LS-command"></a>
1188 <p>Syntax:
1189 </p><div class="example">
1190 <pre class="example">LS
1191 </pre></div>
1193 <p>Lists the available data files stored in the data directory
1194 (<samp>~/.pwmd/data</samp>). The result is a newline separated list of filenames.
1195 </p>
1197 <hr>
1198 <a name="MOVE"></a>
1199 <div class="header">
1201 Next: <a href="#NOP" accesskey="n" rel="next">NOP</a>, Previous: <a href="#LS" accesskey="p" rel="prev">LS</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1202 </div>
1203 <a name="MOVE-command"></a>
1204 <h2 class="chapter">25 MOVE command</h2>
1205 <a name="index-MOVE-command"></a>
1206 <p>Syntax:
1207 </p><div class="example">
1208 <pre class="example">MOVE [--inquire] [!]source[&lt;TAB&gt;[!]child[..]] [[!]dest[&lt;TAB&gt;[!]child[..]]]
1209 </pre></div>
1211 <p>Moves the source element path to the destination element path. If the
1212 destination is not specified then it will be moved to the root node of the
1213 document. If the destination is specified and exists then it will be
1214 overwritten; otherwise non-existing elements of the destination element
1215 path will be created.
1216 </p>
1217 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
1218 arguments are retrieved via a server <em>INQUIRE</em>.
1219 </p>
1221 <hr>
1222 <a name="NOP"></a>
1223 <div class="header">
1225 Next: <a href="#OPEN" accesskey="n" rel="next">OPEN</a>, Previous: <a href="#MOVE" accesskey="p" rel="prev">MOVE</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1226 </div>
1227 <a name="NOP-command"></a>
1228 <h2 class="chapter">26 NOP command</h2>
1229 <a name="index-NOP-command"></a>
1230 <p>Syntax:
1231 </p><div class="example">
1232 <pre class="example">NOP
1233 </pre></div>
1235 <p>Does nothing. Always returns successfully.
1236 </p>
1238 <hr>
1239 <a name="OPEN"></a>
1240 <div class="header">
1242 Next: <a href="#OPTION" accesskey="n" rel="next">OPTION</a>, Previous: <a href="#NOP" accesskey="p" rel="prev">NOP</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1243 </div>
1244 <a name="OPEN-command"></a>
1245 <h2 class="chapter">27 OPEN command</h2>
1246 <a name="index-OPEN-command"></a>
1247 <p>Syntax:
1248 </p><div class="example">
1249 <pre class="example">OPEN [--lock] &lt;filename&gt; [&lt;passphrase&gt;]
1250 </pre></div>
1252 <p>Opens <var>filename</var> using <var>passphrase</var>. When the filename is not
1253 found on the file-system then a new document will be created. If the file
1254 is found, it is looked for in the file cache. If cached and no
1255 <var>passphrase</var> was specified then the cached document is opened. When not
1256 cached, <cite>pinentry(1)</cite> will be used to retrieve the passphrase to use
1257 for decryption unless <samp>disable-pinentry</samp> (see <a href="#OPTION">OPTION</a>) was
1258 specified.
1259 </p>
1260 <p>When the <samp>--lock</samp> option is passed then the file mutex will be
1261 locked as if the <code>LOCK</code> command (see <a href="#LOCK">LOCK</a>) had been sent after the
1262 file has been opened.
1263 </p>
1265 <hr>
1266 <a name="OPTION"></a>
1267 <div class="header">
1269 Next: <a href="#PASSWD" accesskey="n" rel="next">PASSWD</a>, Previous: <a href="#OPEN" accesskey="p" rel="prev">OPEN</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1270 </div>
1271 <a name="OPTION-command"></a>
1272 <h2 class="chapter">28 OPTION command</h2>
1273 <a name="index-OPTION-command"></a>
1274 <p>Syntax:
1275 </p><div class="example">
1276 <pre class="example">OPTION &lt;NAME&gt;=&lt;VALUE&gt;
1277 </pre></div>
1279 <p>Sets a client option <var>name</var> to <var>value</var>. The value for an option is
1280 kept for the duration of the connection.
1281 </p>
1282 <dl compact="compact">
1283 <dt>DISABLE-PINENTRY</dt>
1284 <dd><p>Disable use of <code>pinentry</code> for passphrase retrieval. When set, a
1285 server inquire is sent to the client to obtain the passphrase. This option
1286 may be set as needed before the <code>OPEN</code> (see <a href="#OPEN">OPEN</a>), <code>PASSWD</code>
1287 (see <a href="#PASSWD">PASSWD</a>) and <code>SAVE</code> (see <a href="#SAVE">SAVE</a>) commands.
1288 </p>
1289 </dd>
1290 <dt>PINENTRY-TIMEOUT</dt>
1291 <dd><p>Sets the number of seconds before a pinentry prompt will return an error
1292 while waiting for user input.
1293 </p>
1294 </dd>
1295 <dt>TTYNAME</dt>
1296 <dd><p>Passed to the <code>gpg-agent</code> and used for the <code>pinentry</code> dialog.
1297 </p>
1298 </dd>
1299 <dt>TTYTYPE</dt>
1300 <dd><p>Passed to the <code>gpg-agent</code> and used for the <code>pinentry</code> dialog.
1301 </p>
1302 </dd>
1303 <dt>DISPLAY</dt>
1304 <dd><p>Passed to the <code>gpg-agent</code> and used for the <code>pinentry</code> dialog.
1305 </p>
1306 </dd>
1307 <dt>PINENTRY-DESC</dt>
1308 <dd><p>Sets the description string of the <code>gpg-agent</code> and <code>pinentry</code> dialog.
1309 </p>
1310 </dd>
1311 <dt>PINENTRY-TITLE</dt>
1312 <dd><p>Sets the title string of the <code>gpg-agent</code> and <code>pinentry</code> dialog.
1313 </p>
1314 </dd>
1315 <dt>PINENTRY-PROMPT</dt>
1316 <dd><p>Sets the prompt string of the <code>gpg-agent</code> and <code>pinentry</code> dialog.
1317 </p>
1318 </dd>
1319 <dt>LC-CTYPE</dt>
1320 <dd><p>Passed to the <code>gpg-agent</code> and used for the <code>pinentry</code> dialog.
1321 </p>
1322 </dd>
1323 <dt>LC-MESSAGES</dt>
1324 <dd><p>Passed to the <code>gpg-agent</code> and used for the <code>pinentry</code> dialog.
1325 </p>
1326 </dd>
1327 <dt>NAME</dt>
1328 <dd><p>Associates the thread ID of the connection with the specified textual
1329 representation. Useful for debugging log messages.
1330 </p>
1331 </dd>
1332 <dt>LOCK-TIMEOUT</dt>
1333 <dd><p>When not <code>0</code>, the duration in tenths of a second to wait for the file
1334 mutex which has been locked by another thread to be released before returning
1335 an error. When <code>-1</code>, then an error will be returned immediately.
1336 </p>
1337 </dd>
1338 <dt>LOG-LEVEL</dt>
1339 <dd><p>An integer specifiying the logging level.
1340 </p></dd>
1341 </dl>
1344 <hr>
1345 <a name="PASSWD"></a>
1346 <div class="header">
1348 Next: <a href="#REALPATH" accesskey="n" rel="next">REALPATH</a>, Previous: <a href="#OPTION" accesskey="p" rel="prev">OPTION</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1349 </div>
1350 <a name="PASSWD-command"></a>
1351 <h2 class="chapter">29 PASSWD command</h2>
1352 <a name="index-PASSWD-command"></a>
1353 <p>Syntax:
1354 </p><div class="example">
1355 <pre class="example">PASSWD [--reset] [--s2k-count=N] [--no-passphrase]
1356 </pre></div>
1358 <p>Changes the passphrase of the secret key required to open the current
1359 file or the passphrase of a symmetrically encrypted data file. When the
1360 <samp>--reset</samp> option is passed then the cache entry for the current
1361 file will be reset and the passphrase, if any, will be required during the
1362 next <code>OPEN</code> (see <a href="#OPEN">OPEN</a>).
1363 </p>
1364 <p>The <samp>--s2k-count</samp> option sets or changes (see <a href="#SAVE">SAVE</a>) the number
1365 of hash iterations for a passphrase and must be either <code>0</code> to use
1366 the calibrated count of the machine (the default), or a value greater than
1367 or equal to <code>65536</code>. This option has no effect for symmetrically
1368 encrypted data files.
1369 </p>
1370 <p>The <samp>--no-passphrase</samp> option will prevent requiring a passphrase for
1371 the data file, although a passphrase may be required when changing it.
1372 </p>
1374 <hr>
1375 <a name="REALPATH"></a>
1376 <div class="header">
1378 Next: <a href="#RENAME" accesskey="n" rel="next">RENAME</a>, Previous: <a href="#PASSWD" accesskey="p" rel="prev">PASSWD</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1379 </div>
1380 <a name="REALPATH-command"></a>
1381 <h2 class="chapter">30 REALPATH command</h2>
1382 <a name="index-REALPATH-command"></a>
1383 <p>Syntax:
1384 </p><div class="example">
1385 <pre class="example">REALPATH [--inquire] [!]element[&lt;TAB&gt;[!]child[..]]
1386 </pre></div>
1388 <p>Resolves all <code>target</code> attributes of the specified element path and
1389 returns the result with a data response. See <a href="#Target-Attribute">Target Attribute</a>, for details.
1390 </p>
1391 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
1392 arguments are retrieved via a server <em>INQUIRE</em>.
1393 </p>
1395 <hr>
1396 <a name="RENAME"></a>
1397 <div class="header">
1399 Next: <a href="#RESET" accesskey="n" rel="next">RESET</a>, Previous: <a href="#REALPATH" accesskey="p" rel="prev">REALPATH</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1400 </div>
1401 <a name="RENAME-command"></a>
1402 <h2 class="chapter">31 RENAME command</h2>
1403 <a name="index-RENAME-command"></a>
1404 <p>Syntax:
1405 </p><div class="example">
1406 <pre class="example">RENAME [--inquire] [!]element[&lt;TAB&gt;[!]child[..]] &lt;value&gt;
1407 </pre></div>
1409 <p>Renames the specified <var>element</var> to the new <var>value</var>. If an element of
1410 the same name as the <var>value</var> already exists it will be overwritten.
1411 </p>
1412 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
1413 arguments are retrieved via a server <em>INQUIRE</em>.
1414 </p>
1416 <hr>
1417 <a name="RESET"></a>
1418 <div class="header">
1420 Next: <a href="#SAVE" accesskey="n" rel="next">SAVE</a>, Previous: <a href="#RENAME" accesskey="p" rel="prev">RENAME</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1421 </div>
1422 <a name="RESET-command"></a>
1423 <h2 class="chapter">32 RESET command</h2>
1424 <a name="index-RESET-command"></a>
1425 <p>Syntax:
1426 </p><div class="example">
1427 <pre class="example">RESET
1428 </pre></div>
1430 <p>Closes the currently opened file but keeps any previously set client options.
1431 </p>
1433 <hr>
1434 <a name="SAVE"></a>
1435 <div class="header">
1437 Next: <a href="#STORE" accesskey="n" rel="next">STORE</a>, Previous: <a href="#RESET" accesskey="p" rel="prev">RESET</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1438 </div>
1439 <a name="SAVE-command"></a>
1440 <h2 class="chapter">33 SAVE command</h2>
1441 <a name="index-SAVE-command"></a>
1442 <p>Syntax:
1443 </p><div class="example">
1444 <pre class="example">SAVE [--no-passphrase] [--reset] [--no-agent] [--s2k-count=N] [--cipher=&lt;algo&gt;] [--cipher-iterations=N] [--inquire-keyparam] [--keygrip=hexstring] [--sign-keygrip=hexstring]
1445 </pre></div>
1447 <p>Writes the <abbr>XML</abbr> document to disk. The file written to is the file that
1448 was opened using the <code>OPEN</code> command (see <a href="#OPEN">OPEN</a>). If the file is a
1449 new one or the option <samp>--inquire-keyparam</samp> was passed, then a new
1450 keypair will be generated and a pinentry will be used to prompt for the
1451 passphrase to encrypt with unless the <samp>--no-passphrase</samp> option was
1452 passed in which case the data file will not be passphrase protected.
1453 </p>
1454 <p>The <samp>--no-agent</samp> option disables use of <code>gpg-agent</code> for
1455 passphrase retrieval and caching of new files when <code>gpg-agent</code>
1456 use is enabled. The datafile will be symmetrically encrypted and will not
1457 use or generate any keypair.
1458 </p>
1459 <p>The <samp>--reset</samp> option will clear the cache entry for the current file
1460 and require a passphrase, if needed, before saving.
1461 </p>
1462 <p>The <samp>--cipher</samp> option can be used to encrypt the <abbr>XML</abbr> data to
1463 an alternate cipher. The default is <code>aes256</code>. See the Configuration
1464 (see <a href="#Configuration">Configuration</a>) for available ciphers.
1465 </p>
1466 <p>The <samp>--cipher-iterations</samp> option specifies the number of times to
1467 encrypt the XML data. The default is 0 although 1 iteration is still done.
1468 </p>
1469 <p>The <samp>--inquire-keyparam</samp> option will send a server <em>INQUIRE</em> to
1470 the client to obtain the key paramaters to use when generating a new
1471 keypair. The inquired data is expected to be an S-expression. If not
1472 specified then an &lsquo;<samp>RSA</samp>&rsquo; key of &lsquo;<samp>2048</samp>&rsquo; bits will be generated
1473 unless otherwise set in the configuration file (see <a href="#Configuration">Configuration</a>). Note
1474 that when this option is specified a new keypair will be generated
1475 reguardless if the file is a new one and that if the data file is protected
1476 the passphrase to open it will be required before generating the new keypair.
1477 </p>
1478 <p>You can encrypt the data file to a public key other than the one that it
1479 was originally encrypted with by passing the <samp>--keygrip</samp> option with
1480 the hex encoded keygrip of the public key as its argument. The keygrip may
1481 be of any key that <code>gpg-agent</code> knows about. The
1482 <samp>--sign-keygrip</samp> option may also be used to sign with an alternate
1483 secret key. Use the <code>KEYGRIP</code> (see <a href="#KEYGRIP">KEYGRIP</a>) command to obtain the
1484 keygrip of an existing data file. This option may be needed when using a
1485 smartcard. This option has no effect with symmetrically encrypted data files.
1486 </p>
1487 <p>The <samp>--s2k-count</samp> option sets number of hash iterations for a
1488 passphrase. A value less-than <code>65536</code> will use the machine calibrated
1489 value and is the default. This setting only affects new files. To change
1490 the setting use the <code>PASSWD</code> command (see <a href="#PASSWD">PASSWD</a>). This option
1491 has no effect with symmetrically encrypted data files.
1492 </p>
1494 <hr>
1495 <a name="STORE"></a>
1496 <div class="header">
1498 Next: <a href="#UNLOCK" accesskey="n" rel="next">UNLOCK</a>, Previous: <a href="#SAVE" accesskey="p" rel="prev">SAVE</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1499 </div>
1500 <a name="STORE-command"></a>
1501 <h2 class="chapter">34 STORE command</h2>
1502 <a name="index-STORE-command"></a>
1503 <p>Syntax:
1504 </p><div class="example">
1505 <pre class="example">STORE [!]element[&lt;TAB&gt;[!]child[..]]&lt;TAB&gt;[content]
1506 </pre></div>
1508 <p>This command uses a server <em>INQUIRE</em> to retrieve data from the client.
1509 </p>
1510 <p>Creates a new element path or modifies the <var>content</var> of an existing
1511 element. If only a single element is specified then a new root element is
1512 created. Otherwise, elements are <tt class="key">TAB</tt> delimited and the content will be
1513 set to the final <tt class="key">TAB</tt> delimited element. If no <var>content</var> is
1514 specified after the final <tt class="key">TAB</tt>, then the content of an existing
1515 element will be removed; or empty when creating a new element.
1516 </p>
1517 <p>The only restriction of an element name is that it not contain whitespace
1518 or begin with the literal element character <code>!</code> unless specifying a
1519 literal element (see <a href="#Target-Attribute">Target Attribute</a>). There is no whitespace between
1520 the <tt class="key">TAB</tt> delimited elements. It is recommended that the content of an
1521 element be base64 encoded when it contains control or <tt class="key">TAB</tt> characters
1522 to prevent <abbr>XML</abbr> parsing and <code>pwmd</code> syntax errors.
1523 </p>
1525 <hr>
1526 <a name="UNLOCK"></a>
1527 <div class="header">
1529 Next: <a href="#XPATH" accesskey="n" rel="next">XPATH</a>, Previous: <a href="#STORE" accesskey="p" rel="prev">STORE</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1530 </div>
1531 <a name="UNLOCK-command"></a>
1532 <h2 class="chapter">35 UNLOCK command</h2>
1533 <a name="index-UNLOCK-command"></a>
1534 <p>Syntax:
1535 </p><div class="example">
1536 <pre class="example">UNLOCK
1537 </pre></div>
1539 <p>Unlocks the file mutex which was locked with the <code>LOCK</code> command or
1540 a commands&rsquo; <samp>--lock</samp> option (see <a href="#LOCK">LOCK</a>, see <a href="#OPEN">OPEN</a>,
1541 see <a href="#ISCACHED">ISCACHED</a>).
1542 </p>
1544 <hr>
1545 <a name="XPATH"></a>
1546 <div class="header">
1548 Next: <a href="#XPATHATTR" accesskey="n" rel="next">XPATHATTR</a>, Previous: <a href="#UNLOCK" accesskey="p" rel="prev">UNLOCK</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1549 </div>
1550 <a name="XPATH-command"></a>
1551 <h2 class="chapter">36 XPATH command</h2>
1552 <a name="index-XPATH-command"></a>
1553 <p>Syntax:
1554 </p><div class="example">
1555 <pre class="example">XPATH [--inquire] &lt;expression&gt;[&lt;TAB&gt;[value]]
1556 </pre></div>
1558 <p>Evaluates an XPath <var>expression</var>. If no <var>value</var> argument is
1559 specified it is assumed the expression is a request to return a result.
1560 Otherwise, the result is set to the <var>value</var> argument and the document is
1561 updated. If there is no <var>value</var> after the <tt class="key">TAB</tt> character, the value
1562 is assumed to be empty and the document is updated. For example:
1563 </p><br>
1564 <div class="example">
1565 <pre class="example">XPATH //element[@_name='password']<span class="key">TAB</span>
1566 </pre></div>
1567 <br>
1568 <p>would clear the content of all <code>password</code> elements in the data file
1569 while leaving off the trailing <tt class="key">TAB</tt> would return all <code>password</code>
1570 elements in <abbr>XML</abbr> format.
1571 </p>
1572 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
1573 arguments are retrieved via a server <em>INQUIRE</em>.
1574 </p>
1575 <p>See <a href="http://www.w3schools.com/xpath/xpath_syntax.asp">http://www.w3schools.com/xpath/xpath_syntax.asp</a> for <abbr>XPATH</abbr>
1576 expression syntax.
1577 </p>
1579 <hr>
1580 <a name="XPATHATTR"></a>
1581 <div class="header">
1583 Previous: <a href="#XPATH" accesskey="p" rel="prev">XPATH</a>, Up: <a href="#Commands" accesskey="u" rel="up">Commands</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1584 </div>
1585 <a name="XPATHATTR-command"></a>
1586 <h2 class="chapter">37 XPATHATTR command</h2>
1587 <a name="index-XPATHATTR-command"></a>
1588 <p>Syntax:
1589 </p><div class="example">
1590 <pre class="example">XPATHATTR [--inquire] SET|DELETE &lt;name&gt; &lt;expression&gt;[&lt;TAB&gt;[&lt;value&gt;]]
1591 </pre></div>
1593 <p>Like the <code>XPATH</code> command (see <a href="#XPATH">XPATH</a>) but operates on element
1594 attributes and does not return a result. For the <var>SET</var> operation the
1595 <var>value</var> is optional but the field is required. If not specified then
1596 the attribute value will be empty. For example:
1597 </p><br>
1598 <div class="example">
1599 <pre class="example">XPATHATTR SET password //element[@_name='password']<span class="key">TAB</span>
1600 </pre></div>
1601 <br>
1602 <p>would create an <code>password</code> attribute for each <code>password</code> element
1603 found in the document. The attribute value will be empty but still exist.
1604 </p>
1605 <p>When the <samp>--inquire</samp> option is passed then all remaining non-option
1606 arguments are retrieved via a server <em>INQUIRE</em>.
1607 </p>
1608 <p>See <a href="http://www.w3schools.com/xpath/xpath_syntax.asp">http://www.w3schools.com/xpath/xpath_syntax.asp</a> for <abbr>XPATH</abbr>
1609 expression syntax.
1610 </p>
1613 <hr>
1614 <a name="Status-Messages"></a>
1615 <div class="header">
1617 Next: <a href="#Target-Attribute" accesskey="n" rel="next">Target Attribute</a>, Previous: <a href="#Commands" accesskey="p" rel="prev">Commands</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1618 </div>
1619 <a name="Status-messages-and-their-meanings"></a>
1620 <h2 class="chapter">38 Status messages and their meanings</h2>
1621 <p>Some commands send status messages to inform the client about certain
1622 operations or as a progress indicator. Status messages begin with a
1623 <code>KEYWORD</code> followed by a status description for status messages that
1624 require it. What status messages are sent, when, and how often may depend on
1625 configuration settings (see <a href="#Configuration">Configuration</a>). A status message sent from
1626 <code>gpg-agent</code> (See <a href="http://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html#Invoking-GPG_002dAGENT">(gnupg)Invoking GPG-AGENT</a>) is also forwarded to
1627 the client.
1628 </p>
1629 <table>
1630 <thead><tr><th width="20%">Message</th><th width="25%">Parameters</th><th width="55%">Description</th></tr></thead>
1631 <tr><td width="20%">CACHE
1632 <a name="index-CACHE"></a></td><td width="25%"><code>&lt;integer&gt;</code></td><td width="55%">The number of cached documents. Sent to each client after connecting
1633 (see <a href="#GETINFO">GETINFO</a>) and after every cache modification.</td></tr>
1634 <tr><td width="20%">CLIENTS
1635 <a name="index-CLIENTS"></a></td><td width="25%"><code>&lt;integer&gt;</code></td><td width="55%">The number of connected clients (see <a href="#GETINFO">GETINFO</a>). Sent to each client
1636 when another client either connects or disconnects.</td></tr>
1637 <tr><td width="20%">DECRYPT
1638 <a name="index-DECRYPT"></a></td><td width="25%"><code>&lt;current&gt;</code> <code>&lt;total&gt;</code></td><td width="55%">Sent to the current client during a decrypt operation. How often this
1639 status message is sent is determined by the <code>cipher_progress</code>
1640 (see <a href="#Configuration">Configuration</a>) setting.</td></tr>
1641 <tr><td width="20%">ENCRYPT
1642 <a name="index-ENCRYPT"></a></td><td width="25%"><code>&lt;current&gt;</code> <code>&lt;total&gt;</code></td><td width="55%">Sent to the current client during an encrypt operation. How often this
1643 status message is sent is determined by the <code>cipher_progress</code>
1644 (see <a href="#Configuration">Configuration</a>) setting.</td></tr>
1645 <tr><td width="20%">GENKEY
1646 <a name="index-GENKEY"></a></td><td width="25%"></td><td width="55%">Sent once to the current client just before generating a new key-pair.</td></tr>
1647 <tr><td width="20%">INQUIRE_MAXLEN
1648 <a name="index-INQUIRE_005fMAXLEN"></a></td><td width="25%"><code>&lt;bytes&gt;</code></td><td width="55%">Sent to the client from <code>gpg-agent</code> when inquiring data. This
1649 specifies the maximum number of bytes allowed for the client to send and
1650 should not be exceeded.</td></tr>
1651 <tr><td width="20%">KEEPALIVE
1652 <a name="index-KEEPALIVE"></a></td><td width="25%"></td><td width="55%">Sent to each idle client every <var>keepalive_interval</var>
1653 (see <a href="#Configuration">Configuration</a>) seconds.</td></tr>
1654 <tr><td width="20%">LOCKED
1655 <a name="index-LOCKED"></a></td><td width="25%"></td><td width="55%">Sent to the current client when another client is holding the lock for
1656 the mutex associated with a file.</td></tr>
1657 <tr><td width="20%">NEWFILE
1658 <a name="index-NEWFILE"></a></td><td width="25%"></td><td width="55%">Sent to the current client when the opened (see <a href="#OPEN">OPEN</a>) file does not
1659 exist on the file-system.</td></tr>
1660 <tr><td width="20%">XFER
1661 <a name="index-XFER"></a></td><td width="25%"><code>&lt;sent&gt; &lt;total&gt;</code></td><td width="55%">Sent to the current client when transferring data. It has two space
1662 delimited arguments. The first being the current amount of bytes transferred
1663 and the other being the total bytes to be transferred.</td></tr>
1664 </table>
1666 <hr>
1667 <a name="Target-Attribute"></a>
1668 <div class="header">
1670 Next: <a href="#Signals" accesskey="n" rel="next">Signals</a>, Previous: <a href="#Status-Messages" accesskey="p" rel="prev">Status Messages</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1671 </div>
1672 <a name="The-target-attribute"></a>
1673 <h2 class="chapter">39 The <code>target</code> attribute</h2>
1674 <a name="index-target-attribute"></a>
1675 <p>A <em>case sensitive</em> attribute named <code>target</code> is treated specially
1676 when found in each element of an element path. This attribute, like other
1677 element attributes, is created or modified with the <code>ATTR</code> command
1678 (see <a href="#ATTR">ATTR</a>). The value of this attribute is an existing element path
1679 somewhere in the document. If you are familiar with <abbr>XML</abbr> entities or
1680 maybe the <abbr>HTML</abbr> <code>id</code> or <code>target</code> attributes or a symbolic link
1681 in a file-system, you may find this attribute behaves similar to any of those.
1682 </p>
1683 <p>To create a <code>target</code> attribute use the following syntax:
1684 </p>
1685 <div class="example">
1686 <pre class="example">ATTR SET target [!]element[<span class="key">TAB</span>[!]child[..]] [!]element[<span class="key">TAB</span>[!]child[..]]
1687 </pre></div>
1689 <p>Note the single space between the two element paths. The first element path is
1690 where the <code>target</code> attribute will be created. If the element path does
1691 not exist then it will be created. This is the only time the <code>ATTR</code>
1692 (see <a href="#ATTR">ATTR</a>) command will create elements. The attribute is created in the
1693 final element of the first element path.
1694 </p>
1695 <p>The second element path is the destination of where you want the first element
1696 path to resolve to. When an element path is passed as an argument to a
1697 protocol command <code>pwmd</code> looks for a <code>target</code> attribute when
1698 resolving each element and, if found, &quot;jumps&quot; to the attribute value and
1699 continues resolving any remaining elements. When you want to avoid the
1700 <code>target</code> attribute for any element of an element path then prefix the
1701 element with the literal element character &lsquo;<samp>!</samp>&rsquo;.
1702 </p>
1703 <p>When an element of a element path is removed that a <code>target</code> attribute
1704 resolves to then an error will occur when trying to access that element. You
1705 may need to either update the <code>target</code> attribute value with a new element
1706 path or remove the attribute entirely. Remember that since the element
1707 contains the <code>target</code> attribute it will need to be prefixed with the
1708 literal element character &lsquo;<samp>!</samp>&rsquo; when specifying the element path to prevent
1709 <code>pwmd</code> from trying to resolve the <code>target</code> attribute. For
1710 example, to remove a <code>target</code> attribute for an element containing it:
1711 </p>
1712 <div class="example">
1713 <pre class="example">ATTR DELETE target path<span class="key">TAB</span>to<span class="key">TAB</span>!element
1714 </pre></div>
1716 <p>Clients should be careful of creating <code>target</code> loops, or targets that
1717 resolve to themselves. See the <var>recursion_depth</var> (see <a href="#Configuration">Configuration</a>)
1718 configuration parameter for details.
1719 </p>
1720 <p>The <code>REALPATH</code> command (see <a href="#REALPATH">REALPATH</a>) can be used to show the element
1721 path after resolving all <code>target</code> attributes.
1722 </p>
1724 <hr>
1725 <a name="Signals"></a>
1726 <div class="header">
1728 Next: <a href="#Concept-Index" accesskey="n" rel="next">Concept Index</a>, Previous: <a href="#Target-Attribute" accesskey="p" rel="prev">Target Attribute</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1729 </div>
1730 <a name="Recognized-signals"></a>
1731 <h2 class="chapter">40 Recognized signals</h2>
1733 <p>Sending the <em>SIGHUP</em> signal to a <code>pwmd</code> process will reload the
1734 configuration file and sending <em>SIGUSR1</em> will clear the entire file
1735 cache.
1736 </p>
1739 <hr>
1740 <a name="Concept-Index"></a>
1741 <div class="header">
1743 Previous: <a href="#Signals" accesskey="p" rel="prev">Signals</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
1744 </div>
1745 <a name="Concept-Index-1"></a>
1746 <h2 class="unnumbered">Concept Index</h2>
1749 <a name="SEC_Overview"></a>
1750 <h2 class="shortcontents-heading">Short Table of Contents</h2>
1752 <div class="shortcontents">
1753 <ul class="no-bullet">
1754 <li><a name="stoc-Overview-of-pwmd" href="#toc-Overview-of-pwmd">1 Overview of <code>pwmd</code></a></li>
1755 <li><a name="stoc-Access-Control-1" href="#toc-Access-Control-1">2 Access Control</a></li>
1756 <li><a name="stoc-Invoking-pwmd" href="#toc-Invoking-pwmd">3 Invoking <code>pwmd</code></a></li>
1757 <li><a name="stoc-pwmd-configuration-file-options" href="#toc-pwmd-configuration-file-options">4 <code>pwmd</code> configuration file options</a></li>
1758 <li><a name="stoc-Configuring-remote-connections-over-TLS_002e" href="#toc-Configuring-remote-connections-over-TLS_002e">5 Configuring remote connections over TLS.</a></li>
1759 <li><a name="stoc-Pinentry-configuration" href="#toc-Pinentry-configuration">6 Pinentry configuration</a></li>
1760 <li><a name="stoc-Protocol-commands-and-their-syntax" href="#toc-Protocol-commands-and-their-syntax">7 Protocol commands and their syntax</a></li>
1761 <li><a name="stoc-AGENT-command" href="#toc-AGENT-command">8 AGENT command</a></li>
1762 <li><a name="stoc-ATTR-command" href="#toc-ATTR-command">9 ATTR command</a></li>
1763 <li><a name="stoc-CACHETIMEOUT-command" href="#toc-CACHETIMEOUT-command">10 CACHETIMEOUT command</a></li>
1764 <li><a name="stoc-CLEARCACHE-command" href="#toc-CLEARCACHE-command">11 CLEARCACHE command</a></li>
1765 <li><a name="stoc-COPY-command" href="#toc-COPY-command">12 COPY command</a></li>
1766 <li><a name="stoc-DELETE-command" href="#toc-DELETE-command">13 DELETE command</a></li>
1767 <li><a name="stoc-DUMP-command" href="#toc-DUMP-command">14 DUMP command</a></li>
1768 <li><a name="stoc-GET-command" href="#toc-GET-command">15 GET command</a></li>
1769 <li><a name="stoc-GETCONFIG-command" href="#toc-GETCONFIG-command">16 GETCONFIG command</a></li>
1770 <li><a name="stoc-GETINFO-command" href="#toc-GETINFO-command">17 GETINFO command</a></li>
1771 <li><a name="stoc-HELP-command" href="#toc-HELP-command">18 HELP command</a></li>
1772 <li><a name="stoc-IMPORT-command" href="#toc-IMPORT-command">19 IMPORT command</a></li>
1773 <li><a name="stoc-ISCACHED-command" href="#toc-ISCACHED-command">20 ISCACHED command</a></li>
1774 <li><a name="stoc-KEYGRIP-command" href="#toc-KEYGRIP-command">21 KEYGRIP command</a></li>
1775 <li><a name="stoc-LIST-command" href="#toc-LIST-command">22 LIST command</a></li>
1776 <li><a name="stoc-LOCK-command" href="#toc-LOCK-command">23 LOCK command</a></li>
1777 <li><a name="stoc-LS-command" href="#toc-LS-command">24 LS command</a></li>
1778 <li><a name="stoc-MOVE-command" href="#toc-MOVE-command">25 MOVE command</a></li>
1779 <li><a name="stoc-NOP-command" href="#toc-NOP-command">26 NOP command</a></li>
1780 <li><a name="stoc-OPEN-command" href="#toc-OPEN-command">27 OPEN command</a></li>
1781 <li><a name="stoc-OPTION-command" href="#toc-OPTION-command">28 OPTION command</a></li>
1782 <li><a name="stoc-PASSWD-command" href="#toc-PASSWD-command">29 PASSWD command</a></li>
1783 <li><a name="stoc-REALPATH-command" href="#toc-REALPATH-command">30 REALPATH command</a></li>
1784 <li><a name="stoc-RENAME-command" href="#toc-RENAME-command">31 RENAME command</a></li>
1785 <li><a name="stoc-RESET-command" href="#toc-RESET-command">32 RESET command</a></li>
1786 <li><a name="stoc-SAVE-command" href="#toc-SAVE-command">33 SAVE command</a></li>
1787 <li><a name="stoc-STORE-command" href="#toc-STORE-command">34 STORE command</a></li>
1788 <li><a name="stoc-UNLOCK-command" href="#toc-UNLOCK-command">35 UNLOCK command</a></li>
1789 <li><a name="stoc-XPATH-command" href="#toc-XPATH-command">36 XPATH command</a></li>
1790 <li><a name="stoc-XPATHATTR-command" href="#toc-XPATHATTR-command">37 XPATHATTR command</a></li>
1791 <li><a name="stoc-Status-messages-and-their-meanings" href="#toc-Status-messages-and-their-meanings">38 Status messages and their meanings</a></li>
1792 <li><a name="stoc-The-target-attribute" href="#toc-The-target-attribute">39 The <code>target</code> attribute</a></li>
1793 <li><a name="stoc-Recognized-signals" href="#toc-Recognized-signals">40 Recognized signals</a></li>
1794 <li><a name="stoc-Concept-Index-1" href="#toc-Concept-Index-1">Concept Index</a></li>
1796 </ul>
1797 </div>
1799 <a name="SEC_Contents"></a>
1800 <h2 class="contents-heading">Table of Contents</h2>
1802 <div class="contents">
1803 <ul class="no-bullet">
1804 <li><a name="toc-Overview-of-pwmd" href="#Introduction">1 Overview of <code>pwmd</code></a></li>
1805 <li><a name="toc-Access-Control-1" href="#Access-Control">2 Access Control</a></li>
1806 <li><a name="toc-Invoking-pwmd" href="#Invoking">3 Invoking <code>pwmd</code></a></li>
1807 <li><a name="toc-pwmd-configuration-file-options" href="#Configuration">4 <code>pwmd</code> configuration file options</a></li>
1808 <li><a name="toc-Configuring-remote-connections-over-TLS_002e" href="#TLS">5 Configuring remote connections over TLS.</a></li>
1809 <li><a name="toc-Pinentry-configuration" href="#Pinentry">6 Pinentry configuration</a></li>
1810 <li><a name="toc-Protocol-commands-and-their-syntax" href="#Commands">7 Protocol commands and their syntax</a></li>
1811 <li><a name="toc-AGENT-command" href="#AGENT">8 AGENT command</a></li>
1812 <li><a name="toc-ATTR-command" href="#ATTR">9 ATTR command</a></li>
1813 <li><a name="toc-CACHETIMEOUT-command" href="#CACHETIMEOUT">10 CACHETIMEOUT command</a></li>
1814 <li><a name="toc-CLEARCACHE-command" href="#CLEARCACHE">11 CLEARCACHE command</a></li>
1815 <li><a name="toc-COPY-command" href="#COPY">12 COPY command</a></li>
1816 <li><a name="toc-DELETE-command" href="#DELETE">13 DELETE command</a></li>
1817 <li><a name="toc-DUMP-command" href="#DUMP">14 DUMP command</a></li>
1818 <li><a name="toc-GET-command" href="#GET">15 GET command</a></li>
1819 <li><a name="toc-GETCONFIG-command" href="#GETCONFIG">16 GETCONFIG command</a></li>
1820 <li><a name="toc-GETINFO-command" href="#GETINFO">17 GETINFO command</a></li>
1821 <li><a name="toc-HELP-command" href="#HELP">18 HELP command</a></li>
1822 <li><a name="toc-IMPORT-command" href="#IMPORT">19 IMPORT command</a></li>
1823 <li><a name="toc-ISCACHED-command" href="#ISCACHED">20 ISCACHED command</a></li>
1824 <li><a name="toc-KEYGRIP-command" href="#KEYGRIP">21 KEYGRIP command</a></li>
1825 <li><a name="toc-LIST-command" href="#LIST">22 LIST command</a></li>
1826 <li><a name="toc-LOCK-command" href="#LOCK">23 LOCK command</a></li>
1827 <li><a name="toc-LS-command" href="#LS">24 LS command</a></li>
1828 <li><a name="toc-MOVE-command" href="#MOVE">25 MOVE command</a></li>
1829 <li><a name="toc-NOP-command" href="#NOP">26 NOP command</a></li>
1830 <li><a name="toc-OPEN-command" href="#OPEN">27 OPEN command</a></li>
1831 <li><a name="toc-OPTION-command" href="#OPTION">28 OPTION command</a></li>
1832 <li><a name="toc-PASSWD-command" href="#PASSWD">29 PASSWD command</a></li>
1833 <li><a name="toc-REALPATH-command" href="#REALPATH">30 REALPATH command</a></li>
1834 <li><a name="toc-RENAME-command" href="#RENAME">31 RENAME command</a></li>
1835 <li><a name="toc-RESET-command" href="#RESET">32 RESET command</a></li>
1836 <li><a name="toc-SAVE-command" href="#SAVE">33 SAVE command</a></li>
1837 <li><a name="toc-STORE-command" href="#STORE">34 STORE command</a></li>
1838 <li><a name="toc-UNLOCK-command" href="#UNLOCK">35 UNLOCK command</a></li>
1839 <li><a name="toc-XPATH-command" href="#XPATH">36 XPATH command</a></li>
1840 <li><a name="toc-XPATHATTR-command" href="#XPATHATTR">37 XPATHATTR command</a></li>
1841 <li><a name="toc-Status-messages-and-their-meanings" href="#Status-Messages">38 Status messages and their meanings</a></li>
1842 <li><a name="toc-The-target-attribute" href="#Target-Attribute">39 The <code>target</code> attribute</a></li>
1843 <li><a name="toc-Recognized-signals" href="#Signals">40 Recognized signals</a></li>
1844 <li><a name="toc-Concept-Index-1" href="#Concept-Index">Concept Index</a></li>
1846 </ul>
1847 </div>
1849 <hr>
1853 </body>
1854 </html>