Fixed a pwmd_tcp_connect_async() segfault.
[libpwmd.git] / doc / pwmc.1.in
blobf340d6627834b009b9a632e10f2cf08dd67dba96
1 .\" This program is free software; you can redistribute it and/or modify
2 .\" it under the terms of the GNU General Public License as published by
3 .\" the Free Software Foundation; either version 2 of the License, or
4 .\" (at your option) any later version.
5 .\" 
6 .\" This program is distributed in the hope that it will be useful,
7 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
8 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9 .\" GNU General Public License for more details.
10 .\" 
11 .\" You should have received a copy of the GNU General Public License
12 .\" along with this program; if not, write to the Free Software
13 .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02110-1301  USA
14 .de URL
15 \\$2 \(laURL: \\$1 \(ra\\$3
17 .if \n[.g] .mso www.tmac
18 .TH PWMD 1 "24 Feb 2009" "Password Manager Client" "Password Manager Client"
19 .SH NAME
21 pwmc \- send a command to pwmd
22 .SH SYNOPSIS
23 .B pwmc
24 [\-hvX] [\-s <socket>] [[\-P <pinentry_path>] [\-D <display>] [\-T
25 <tty>] [\-N <term>] [\-C <lc_ctype>] [\-M <lc_messages>] | \-p <password>]
26 [\-c <name>] [\-S [\-i <iter>]] [\-t <seconds>] [\-d <fd>] [\-I <fd>] [filename]
28 .SH DESCRIPTION
29 .B pwmc
30 is a
31 .BR libpwmd (3)
32 client for
33 .BR pwmd (1) .
34 A command is read from standard input and output is sent to either a file
35 descriptor or standard output.
37 .SH OPTIONS
38 .TP
39 .I "\-X"
40 Disable showing of status messages from the server. By default they are
41 printed to stderr.
42 .I "\-s <socket>"
43 Connect to the specified socket. The default is \fB~/.pwmd/socket\fR.
44 .TP
45 .I "\-t <seconds>"
46 The number of seconds before pinentry will terminate while waiting for a
47 password. If not specified the server default will be used.
48 .TP
49 .I "\-P <path>"
50 The full path of the
51 .BR pinentry (1)
52 program. The default is specified at
53 .BR pwmd (1)
54 compile time.
55 .TP
56 .I "\-D <display>"
57 The pinentry display to use.
58 .TP
59 .I "\-T <tty>"
60 The full path of the tty for pinentry to use.
61 .TP
62 .I "\-N <term>"
63 The terminal type for pinentry to use. This is required when using 
64 .B -T
65 if the invoking
66 .B pwmc
67 isn't attached to a terminal.
68 .TP
69 .I "\-C <lc_ctype>"
70 For internationalization. Sets \fBLC_CTYPE\fP in the pinentry process.
71 .TP
72 .I "\-M <lc_messages>"
73 For internationalization. Sets \fBLC_MESSAGES\fP in the pinentry process.
74 .TP
75 .I "\-p <password>"
76 Use the specified password. When not specified and the file is not cached,
77 .BR pinentry (1)
78 will be used.
79 .TP
80 .I "\-S"
81 Send the SAVE command before exiting.
82 .TP
83 .I "\-i"
84 Encrypt with the specified number of iterations when saving. Note that
85 \fI-1\fP disables encryption and that \fI0\fP is really 1 iteration.
86 .TP
87 .I "\-d <descriptor>"
88 Writes the result of a command to the specified file descriptor. This may be
89 needed if your using pinentry to retrieve a password but redirecting standard
90 output.
91 .I "\-I <descriptor>"
92 Reads INQUIRE data from the specified file descriptor. Use this rather than
93 piping large amounts of data to save memory.
94 .TP
95 .I "\-c <name>"
96 Sets the client name to the specified string which will show up in log
97 messages.
98 .TP
99 .I "\-v"
100 Version information.
102 .I "\-h"
103 Help text.
105 .SH EXAMPLES
106 To list the available accounts and use
107 .BR pinentry (1)
108 to get the password:
110 echo list | pwmc filename
113 To store an element path and save the file afterwards:
115 echo -ne 'store isp\\tsmtp\\thostname\\tsomehost.com' | pwmc -S filename
118 Store a large file:
120 echo -en 'store blah\\tstuff\\t' | pwmc -S -I 3 filename 3<data_file
122 And then to get the content:
124 echo -e 'get blah\\tstuff' | pwmc filename
127 Clear the file cache for a single file:
129 echo 'clearcache filename' | pwmc
132 .SH FILES
134 .B ~/.pwmd/socket
135 Default socket to connect to.
137 .B @pinentry@
138 Default location of the
139 .BR pinentry (1)
140 binary.
142 .SH AUTHOR
143 Ben Kibbey <bjk@luxsci.net>
145 .URL "http://bjk.sourceforge.net/pwmd/" "PWMD Homepage" .
147 .SH "SEE ALSO"
148 .BR pwmd (1),
149 .BR pinentry (1),
150 .BR libpwmd (3)