File: gdbus-org.freedesktop.UDisks2.Encrypted.html

package info (click to toggle)
udisks2 2.10.1-12.1%2Bdeb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 24,708 kB
  • sloc: ansic: 48,127; python: 7,874; sh: 5,089; xml: 1,462; makefile: 1,235; sed: 85
file content (290 lines) | stat: -rw-r--r-- 13,365 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.freedesktop.UDisks2.Encrypted: UDisks Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="UDisks Reference Manual">
<link rel="up" href="ch03.html" title="D-Bus Interfaces">
<link rel="prev" href="gdbus-org.freedesktop.UDisks2.Swapspace.html" title="org.freedesktop.UDisks2.Swapspace">
<link rel="next" href="gdbus-org.freedesktop.UDisks2.Loop.html" title="org.freedesktop.UDisks2.Loop">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gdbus-org.freedesktop.UDisks2.Encrypted.description" class="shortcut">Description</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#gdbus-org.freedesktop.UDisks2.Encrypted.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gdbus-org.freedesktop.UDisks2.Swapspace.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gdbus-org.freedesktop.UDisks2.Loop.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gdbus-org.freedesktop.UDisks2.Encrypted"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdbus-interface-org-freedesktop-UDisks2-Encrypted.top_of_page"></a>org.freedesktop.UDisks2.Encrypted</span></h2>
<p>org.freedesktop.UDisks2.Encrypted — Block device containing encrypted data</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Methods</h2>
<pre class="synopsis">
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-method-org-freedesktop-UDisks2-Encrypted.Unlock" title="The Unlock() method">Unlock</a>           (IN  s     passphrase,
                  IN  a{sv} options,
                  OUT o     cleartext_device);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-method-org-freedesktop-UDisks2-Encrypted.Lock" title="The Lock() method">Lock</a>             (IN  a{sv} options);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-method-org-freedesktop-UDisks2-Encrypted.ChangePassphrase" title="The ChangePassphrase() method">ChangePassphrase</a> (IN  s     passphrase,
                  IN  s     new_passphrase,
                  IN  a{sv} options);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-method-org-freedesktop-UDisks2-Encrypted.Resize" title="The Resize() method">Resize</a>           (IN  t     size,
                  IN  a{sv} options);
</pre>
</div>
<div class="refsect1">
<a name="id-1.3.3.11.4"></a><h2>Properties</h2>
<pre class="synopsis">
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-property-org-freedesktop-UDisks2-Encrypted.ChildConfiguration" title='The "ChildConfiguration" property'>ChildConfiguration</a>  readable   a(sa{sv})
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-property-org-freedesktop-UDisks2-Encrypted.HintEncryptionType" title='The "HintEncryptionType" property'>HintEncryptionType</a>  readable   s
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-property-org-freedesktop-UDisks2-Encrypted.MetadataSize" title='The "MetadataSize" property'>MetadataSize</a>        readable   t
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-property-org-freedesktop-UDisks2-Encrypted.CleartextDevice" title='The "CleartextDevice" property'>CleartextDevice</a>     readable   o
</pre>
</div>
<div class="refsect1">
<a name="gdbus-interface-org-freedesktop-UDisks2-Encrypted"></a><h2>Description</h2>
<p>
This interface is used for <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-interface-org-freedesktop-UDisks2-Block.top_of_page">org.freedesktop.UDisks2.Block</a>
devices that contain encrypted data.
</p>
</div>
<div class="refsect1">
<a name="gdbus-methods-org.freedesktop.UDisks2.Encrypted"></a><h2>Method Details</h2>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Encrypted.Unlock"></a><h3>The Unlock() method</h3>
<pre class="programlisting">
Unlock (IN  s     passphrase,
        IN  a{sv} options,
        OUT o     cleartext_device);
</pre>
<p>
Tries to unlock the encrypted device using <em class="parameter"><code>passphrase</code></em>.
</p>
<p>
If the device in question is referenced in a system-wide
configuration file (such as the <code class="filename">/etc/crypttab</code> file),
then name, options and passphrase (if available) is used from that
file after requesting additional authorization.
</p>
<p>
If an empty passphrase should be used to unlock the device, it has to be
passed using the <em class="parameter"><code>keyfile_contents</code></em> parameter. Empty string passed as
<em class="parameter"><code>passphrase</code></em> means "Use the passphrase from the configuration file".
</p>
<p>
If the device is removed without being locked (e.g. the user
yanking the device or pulling the media out) the cleartext
device will be cleaned up.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>passphrase</code></em></code>:</span></p></td>
<td><p>
The passphrase to use.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>
Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>keyfile_contents</code></em> (of type 'ay') which is preferred over <em class="parameter"><code>passphrase</code></em> if specified and <em class="parameter"><code>read-only</code></em> (of type 'b').
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">OUT o <em class="parameter"><code>cleartext_device</code></em></code>:</span></p></td>
<td><p>
An object path to the unlocked object implementing the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-interface-org-freedesktop-UDisks2-Block.top_of_page">org.freedesktop.UDisks2.Block</a> interface.
</p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Encrypted.Lock"></a><h3>The Lock() method</h3>
<pre class="programlisting">
Lock (IN  a{sv} options);
</pre>
<p>
Locks the encrypted device.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>
Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
</p></td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Encrypted.ChangePassphrase"></a><h3>The ChangePassphrase() method</h3>
<pre class="programlisting">
ChangePassphrase (IN  s     passphrase,
                  IN  s     new_passphrase,
                  IN  a{sv} options);
</pre>
<p>
Changes the passphrase to <em class="parameter"><code>new_passphrase</code></em>. An existing passphrase is required.
</p>
<p>
If <em class="parameter"><code>old_keyfile_contents</code></em> or
<em class="parameter"><code>new_keyfile_contents</code></em> are given, they take
precedence over the corresponding passphrase parameters individually.
</p>
<p>
If the device in question is referenced in a system-wide
configuration file (such as the
<code class="filename">/etc/crypttab</code> file) and this
configuration references the passphrase, it is not
automatically updated.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>passphrase</code></em></code>:</span></p></td>
<td><p>
The existing passphrase.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>new_passphrase</code></em></code>:</span></p></td>
<td><p>
The new passphrase to use.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>
Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>old_keyfile_contents</code></em> and <em class="parameter"><code>new_keyfile_contents</code></em> (of type 's' or 'ay').
</p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Encrypted.Resize"></a><h3>The Resize() method</h3>
<pre class="programlisting">
Resize (IN  t     size,
        IN  a{sv} options);
</pre>
<p>
Resizes the encrypted device.  The device must be unlocked.
The given size is the target size for the cleartext device.
</p>
<p>
You need to specify either <em class="parameter"><code>passphrase</code></em> or <em class="parameter"><code>keyfile_contents</code></em> for LUKS 2
devices that don't have verified key loaded in kernel keyring.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN t <em class="parameter"><code>size</code></em></code>:</span></p></td>
<td><p>
The target cleartext size in bytes, 0 for maximum.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>
Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>passphrase</code></em> (of type 's') and <em class="parameter"><code>keyfile_contents</code></em> (of type 'ay') which is preferred over <em class="parameter"><code>passphrase</code></em> if specified.
</p></td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.8.0</p>
</div>
</div>
<div class="refsect1">
<a name="gdbus-properties-org.freedesktop.UDisks2.Encrypted"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="gdbus-property-org-freedesktop-UDisks2-Encrypted.ChildConfiguration"></a><h3>The "ChildConfiguration" property</h3>
<pre class="programlisting">
ChildConfiguration  readable   a(sa{sv})
</pre>
<p>
Configuration items belonging to the
</p>
<p>
clear text device of this encrypted block device and its
children.  This is also valid when this block device is
currently locked and there is no clear text device for it.
It works via the 'track-parents' options of
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem" title="The AddConfigurationItem() method">AddConfigurationItem()</a>, which
see.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-property-org-freedesktop-UDisks2-Encrypted.HintEncryptionType"></a><h3>The "HintEncryptionType" property</h3>
<pre class="programlisting">
HintEncryptionType  readable   s
</pre>
<p>
If not blank, the type of the encryption used to encrypt this device.
</p>
<p>
This is set during successful unlocking of an encrypted device.
It is required for encryption types which can only be determined
by decrypting the device (for example TCRYPT), but is used for all
encryption types for consistency reasons.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-property-org-freedesktop-UDisks2-Encrypted.MetadataSize"></a><h3>The "MetadataSize" property</h3>
<pre class="programlisting">
MetadataSize  readable   t
</pre>
<p>
Size of the metadata on the encrypted device in bytes
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-property-org-freedesktop-UDisks2-Encrypted.CleartextDevice"></a><h3>The "CleartextDevice" property</h3>
<pre class="programlisting">
CleartextDevice  readable   o
</pre>
<p>
For an unlocked device, the object path of its cleartext device.
</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>