Codebase list kwalletcli / lintian-fixes/main kwalletcli.1
lintian-fixes/main

Tree @lintian-fixes/main (Download .tar.gz)

kwalletcli.1 @lintian-fixes/mainraw · history · blame

.\" $MirOS: contrib/hosted/tg/code/kwalletcli/kwalletcli.1,v 1.21 2020/11/19 21:30:54 tg Exp $
.\"-
.\" Copyright © 2009, 2010, 2011, 2016, 2018, 2020
.\"	mirabilos <m@mirbsd.org>
.\"
.\" Provided that these terms and disclaimer and all copyright notices
.\" are retained or reproduced in an accompanying document, permission
.\" is granted to deal in this work without restriction, including un‐
.\" limited rights to use, publicly perform, distribute, sell, modify,
.\" merge, give away, or sublicence.
.\"
.\" This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to
.\" the utmost extent permitted by applicable law, neither express nor
.\" implied; without malicious intent or gross negligence. In no event
.\" may a licensor, author or contributor be held liable for indirect,
.\" direct, other damage, loss, or other issues arising in any way out
.\" of dealing in the work, even if advised of the possibility of such
.\" damage or existence of a defect, except proven that it results out
.\" of said person’s immediate fault when using the work as intended.
.\"-
.\" Try to make GNU groff and AT&T nroff more compatible
.\" * ` generates ‘ in gnroff, so use \`
.\" * ' generates ’ in gnroff, \' generates ´, so use \*(aq
.\" * - generates ‐ in gnroff, \- generates −, so .tr it to -
.\"   thus use - for hyphens and \- for minus signs and option dashes
.\" * ~ is size-reduced and placed atop in groff, so use \*(TI
.\" * ^ is size-reduced and placed atop in groff, so use \*(ha
.\" * \(en does not work in nroff, so use \*(en for a solo en dash
.\" *   and \*(EM for a correctly spaced em dash
.\" * <>| are problematic, so redefine and use \*(Lt\*(Gt\*(Ba
.\" Also make sure to use \& *before* a punctuation char that is to not
.\" be interpreted as punctuation, and especially with two-letter words
.\" but also (after) a period that does not end a sentence (“e.g.\&”).
.\" The section after the "doc" macropackage has been loaded contains
.\" additional code to convene between the UCB mdoc macropackage (and
.\" its variant as BSD mdoc in groff) and the GNU mdoc macropackage.
.\"
.ie \n(.g \{\
.	if \*[.T]ascii .tr \-\N'45'
.	if \*[.T]latin1 .tr \-\N'45'
.	if \*[.T]utf8 .tr \-\N'45'
.	ds <= \[<=]
.	ds >= \[>=]
.	ds Rq \[rq]
.	ds Lq \[lq]
.	ds sL \(aq
.	ds sR \(aq
.	if \*[.T]utf8 .ds sL `
.	if \*[.T]ps .ds sL `
.	if \*[.T]utf8 .ds sR '
.	if \*[.T]ps .ds sR '
.	ds aq \(aq
.	ds TI \(ti
.	ds ha \(ha
.	ds en \(en
.\}
.el \{\
.	ds aq '
.	ds TI ~
.	ds ha ^
.	ds en \(em
.\}
.ie n \{\
.	ds EM \ \(em\ \&
.\}
.el \{\
.	ds EM \f(TR\^\(em\^\fP
.\}
.\"
.\" Implement .Dd with the Mdocdate RCS keyword
.\"
.rn Dd xD
.de Dd
.ie \\$1$Mdocdate: \{\
.	xD \\$2 \\$3, \\$4
.\}
.el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
..
.\"
.\" .Dd must come before definition of .Mx, because when called
.\" with -mandoc, it might implement .Mx itself, but we want to
.\" use our own definition. And .Dd must come *first*, always.
.\"
.Dd $Mdocdate: November 19 2020 $
.\"
.\" Check which macro package we use, and do other -mdoc setup.
.\"
.ie \n(.g \{\
.	if \*[.T]utf8 .tr \[la]\*(Lt
.	if \*[.T]utf8 .tr \[ra]\*(Gt
.	ie d volume-ds-1 .ds tT gnu
.	el .ie d doc-volume-ds-1 .ds tT gnp
.	el .ds tT bsd
.\}
.el .ds tT ucb
.\"
.\" Implement .Mx (MirBSD)
.\"
.ie "\*(tT"gnu" \{\
.	eo
.	de Mx
.	nr curr-font \n[.f]
.	nr curr-size \n[.ps]
.	ds str-Mx \f[\n[curr-font]]\s[\n[curr-size]u]
.	ds str-Mx1 \*[Tn-font-size]\%MirBSD\*[str-Mx]
.	if !\n[arg-limit] \
.	if \n[.$] \{\
.	ds macro-name Mx
.	parse-args \$@
.	\}
.	if (\n[arg-limit] > \n[arg-ptr]) \{\
.	nr arg-ptr +1
.	ie (\n[type\n[arg-ptr]] == 2) \
.	as str-Mx1 \~\*[arg\n[arg-ptr]]
.	el \
.	nr arg-ptr -1
.	\}
.	ds arg\n[arg-ptr] "\*[str-Mx1]
.	nr type\n[arg-ptr] 2
.	ds space\n[arg-ptr] "\*[space]
.	nr num-args (\n[arg-limit] - \n[arg-ptr])
.	nr arg-limit \n[arg-ptr]
.	if \n[num-args] \
.	parse-space-vector
.	print-recursive
..
.	ec
.	ds sP \s0
.	ds tN \*[Tn-font-size]
.\}
.el .ie "\*(tT"gnp" \{\
.	eo
.	de Mx
.	nr doc-curr-font \n[.f]
.	nr doc-curr-size \n[.ps]
.	ds doc-str-Mx \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]
.	ds doc-str-Mx1 \*[doc-Tn-font-size]\%MirBSD\*[doc-str-Mx]
.	if !\n[doc-arg-limit] \
.	if \n[.$] \{\
.	ds doc-macro-name Mx
.	doc-parse-args \$@
.	\}
.	if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
.	nr doc-arg-ptr +1
.	ie (\n[doc-type\n[doc-arg-ptr]] == 2) \
.	as doc-str-Mx1 \~\*[doc-arg\n[doc-arg-ptr]]
.	el \
.	nr doc-arg-ptr -1
.	\}
.	ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Mx1]
.	nr doc-type\n[doc-arg-ptr] 2
.	ds doc-space\n[doc-arg-ptr] "\*[doc-space]
.	nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
.	nr doc-arg-limit \n[doc-arg-ptr]
.	if \n[doc-num-args] \
.	doc-parse-space-vector
.	doc-print-recursive
..
.	ec
.	ds sP \s0
.	ds tN \*[doc-Tn-font-size]
.\}
.el \{\
.	de Mx
.	nr cF \\n(.f
.	nr cZ \\n(.s
.	ds aa \&\f\\n(cF\s\\n(cZ
.	if \\n(aC==0 \{\
.		ie \\n(.$==0 \&MirBSD\\*(aa
.		el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
.	\}
.	if \\n(aC>\\n(aP \{\
.		nr aP \\n(aP+1
.		ie \\n(C\\n(aP==2 \{\
.			as b1 \&MirBSD\ #\&\\*(A\\n(aP\\*(aa
.			ie \\n(aC>\\n(aP \{\
.				nr aP \\n(aP+1
.				nR
.			\}
.			el .aZ
.		\}
.		el \{\
.			as b1 \&MirBSD\\*(aa
.			nR
.		\}
.	\}
..
.\}
.\"-
.Dt KWALLETCLI 1
.Os
.Sh NAME
.Nm kwalletcli
.Nd command line interface to the KDE Wallet
.Sh SYNOPSIS
.Nm
.Op Fl q
.Fl hV
.Nm
.Op Fl q
.Fl f Ar folder
.Fl e Ar entry
.Op Fl P | p Ar password
.Sh DESCRIPTION
The
.Nm
utility is a command line interface to KWallet.
It will only work if KDE is running (DCOP) and reachable (via X11).
.Nm
can be used to get password entries from the default Wallet,
or to write them there.
.Pp
The options are as follows:
.Bl -tag -width xPxpassword
.It Fl e Ar entry
Define the key
.Pq Ar entry
to use when accessing the Wallet.
Mandatory.
.It Fl f Ar folder
Set the
.Ar folder
to use when accessing the Wallet.
Mandatory.
.It Fl h
Display the usage.
.It Fl P
Read the password to write from standard input.
Currently limited to 65535 octets.
.It Fl p Ar password
Write
.Ar password
into the designated location in the Wallet.
.It Fl q
Be more quiet.
In combination with
.Fl V ,
do not display anything.
.It Fl V
Display the
.Nm
version information.
.El
.Pp
Default mode of operation, that is, unless
.Fl P
or
.Fl p
are used, is to read the password from the default Wallet
and print it to standard output as-is, without any
trailing newline.
.Pp
There is currently no way to specify a Wallet other than the default.
.Pp
All input and output is assumed to be in UTF-8.
The password string (whether read from standard input or command line)
is now converted from
.Dq possibly UTF-8 but binary transparent
to standards-conformant UTF-8 for the Qt side, and back upon reading out.
.Sh RETURN VALUES
The
.Nm
utility exits 0 on success or \*(Gt0 if an error occurred:
.Bl -tag -width xxx
.It 1
The entry specified cannot be found (read access).
.It 2
The usage was shown.
.It 3
The Wallet could not be opened.
May be a missing DCOP connection.
Perhaps
.Ev DISPLAY
is not set.
.It 4
The folder specified cannot be found (read access).
.It 5
The folder specified cannot be opened.
.It 6
The value to the key specified could not be retrieved.
.It 8
An error occurred trying to write the value.
.El
.Pp
The exit codes 1 and 4, on reading, are not fatal; they merely indicate
that the folder or entry specified does not exist.
The other errors are fatal and may be used to indicate the user that the
KWallet should not be used any more during the current session.
.Sh ENVIRONMENT
.Bl -tag -width DISPLAY
.It Ev DISPLAY
The X11 display to use for communicating with the KDE Wallet.
.El
.Sh EXAMPLES
The following command...
.Pp
.Dl "$ printf \*(aq%s\en\*(aq" \&"secret\&" "\*(Ba kwalletcli \-f passwords \-e sitename \-P"
.Pp
\&... stores the password
.Dq secret
as
.Li passwords\esitename
inside the default Wallet.
To read it out, use:
.Pp
.Dl $ password=$(kwalletcli \-f passwords \-e sitename)
.Sh SEE ALSO
.Xr kwalletcli_getpin 1
.Sh AUTHORS
.Nm
was written by
.An mirabilos Aq m@mirbsd.org
mostly for tarent solutions GmbH.
.Sh CAVEATS
Do not use
.Fl p Ar password
to store it, unless you absolutely must.
It is a security risk, because the command line invocation
is public information in a normal Unix environment.
Use
.Fl P
instead and provide the
.Ar password
on standard input.
.Pp
Beware of trailing newlines, especially outside of
.Xr mksh 1
scripts!
.Sh BUGS
If
.Ev DISPLAY
is not set, not valid, or
.Nm kdeinit
or
.Nm kdeinit4
cannot start for other reasons,
.Nm
may not recover gracefully.
In KDE 4 versions, this may even result in a Segmentation fault.
The author does not know of a way to catch this early; patches are welcome.