62
61
The polkit actions are not considered stable and may change
63
62
from release to release so administrators should take notice
64
63
when upgrading from one version of udisks to another. For
65
example, <code class="filename">.pkla</code> files may need to be
66
updated to match an updated policy.
67
For reference, the polkit actions defined by udisks 1.97.0
64
example, polkit authorization rules may need to be updated
65
to match an updated policy.
68
See <a class="xref" href="udisks-polkit-actions.html#udisks-polkit-details" title="Table 1. Known polkit variables">Table 1, “Known polkit variables”</a> for the
69
variables that can be used to assist in determining if the
70
caller is authorized (note that each variable may not be set
71
for request). For example, a polkit authorization rule for
73
<span class="emphasis"><em>org.freedesktop.udisks2.filesystem-mount*</em></span>
74
actions can use the <em class="parameter"><code>device</code></em> variable
75
to determine if the caller is authorized to mount a specific
79
<a name="udisks-polkit-details"></a><p class="title"><b>Table 1. Known polkit variables</b></p>
80
<div class="table-contents"><table summary="Known polkit variables" border="1">
86
<th align="left">key</th>
87
<th align="left">value</th>
91
<td align="left"><em class="parameter"><code>device</code></em></td>
92
<td align="left">If the object is a block device, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.PreferredDevice" title='The "PreferredDevice" property'>Block:PreferredDevice</a> property. If set, this is guaranteed to be a device file, for example <span class="quote">“<span class="quote">/dev/vg_lucifer/lv_root</span>”</span> or <span class="quote">“<span class="quote">/dev/sda1</span>”</span>. If the object is not a block device, this is not set.</td>
95
<td align="left"><em class="parameter"><code>drive</code></em></td>
96
<td align="left">Like the <em class="parameter"><code>device</code></em> variable, but if the object is also a drive, this variable includes Vital Product Data about the drive such as the vendor and model identifiers (if available), for example <span class="quote">“<span class="quote">INTEL SSDSA2MH080G1GC (/dev/sda1)</span>”</span>. Otherwise is just set to the same value as <em class="parameter"><code>device</code></em>. If the object is not a block device, this is not set (it is however set if the object is a block device but not a drive).</td>
99
<td align="left"><em class="parameter"><code>drive.wwn</code></em></td>
100
<td align="left">If the object is a drive (or a block device that is part of a drive), this is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-property-org-freedesktop-UDisks2-Drive.WWN" title='The "WWN" property'>Drive:WWN</a> property.</td>
103
<td align="left"><em class="parameter"><code>drive.serial</code></em></td>
104
<td align="left">If the object is a drive (or a block device that is part of a drive), this is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-property-org-freedesktop-UDisks2-Drive.Serial" title='The "Serial" property'>Drive:Serial</a> property.</td>
107
<td align="left"><em class="parameter"><code>drive.vendor</code></em></td>
108
<td align="left">If the object is a drive (or a block device that is part of a drive), this is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-property-org-freedesktop-UDisks2-Drive.Vendor" title='The "Vendor" property'>Drive:Vendor</a> property.</td>
111
<td align="left"><em class="parameter"><code>drive.model</code></em></td>
112
<td align="left">If the object is a drive (or a block device that is part of a drive), this is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-property-org-freedesktop-UDisks2-Drive.Model" title='The "Model" property'>Drive:Model</a> property.</td>
115
<td align="left"><em class="parameter"><code>drive.revision</code></em></td>
116
<td align="left">If the object is a drive (or a block device that is part of a drive), this is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-property-org-freedesktop-UDisks2-Drive.Revision" title='The "Revision" property'>Drive:Revision</a> property.</td>
119
<td align="left"><em class="parameter"><code>drive.removable</code></em></td>
120
<td align="left">If the object is a drive (or a block device that is part of a drive), this is set to the string <span class="quote">“<span class="quote">true</span>”</span> only if the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-property-org-freedesktop-UDisks2-Drive.Removable" title='The "Removable" property'>Drive:Removable</a> property is <code class="constant">TRUE</code>.</td>
123
<td align="left"><em class="parameter"><code>id.type</code></em></td>
124
<td align="left">If the object is a block device, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdType" title='The "IdType" property'>Block:IdType</a> property.</td>
127
<td align="left"><em class="parameter"><code>id.usage</code></em></td>
128
<td align="left">If the object is a block device, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdUsage" title='The "IdUsage" property'>Block:IdUsage</a> property.</td>
131
<td align="left"><em class="parameter"><code>id.version</code></em></td>
132
<td align="left">If the object is a block device, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdVersion" title='The "IdVersion" property'>Block:IdVersion</a> property.</td>
135
<td align="left"><em class="parameter"><code>id.label</code></em></td>
136
<td align="left">If the object is a block device, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdLabel" title='The "IdLabel" property'>Block:IdLabel</a> property.</td>
139
<td align="left"><em class="parameter"><code>id.uuid</code></em></td>
140
<td align="left">If the object is a block device, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdUUID" title='The "IdUUID" property'>Block:IdUUID</a> property.</td>
143
<td align="left"><em class="parameter"><code>partition.number</code></em></td>
144
<td align="left">If the object is a partition, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Partition.html#gdbus-property-org-freedesktop-UDisks2-Partition.Number" title='The "Number" property'>Partition:Number</a> property.</td>
147
<td align="left"><em class="parameter"><code>partition.type</code></em></td>
148
<td align="left">If the object is a partition, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Partition.html#gdbus-property-org-freedesktop-UDisks2-Partition.Type" title='The "Type" property'>Partition:Type</a> property.</td>
151
<td align="left"><em class="parameter"><code>partition.flags</code></em></td>
152
<td align="left">If the object is a partition, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Partition.html#gdbus-property-org-freedesktop-UDisks2-Partition.Flags" title='The "Flags" property'>Partition:Flags</a> property.</td>
155
<td align="left"><em class="parameter"><code>partition.name</code></em></td>
156
<td align="left">If the object is a partition, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Partition.html#gdbus-property-org-freedesktop-UDisks2-Partition.Name" title='The "Name" property'>Partition:Name</a> property.</td>
159
<td align="left"><em class="parameter"><code>partition.uuid</code></em></td>
160
<td align="left">If the object is a partition, this property is set to the value of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Partition.html#gdbus-property-org-freedesktop-UDisks2-Partition.UUID" title='The "UUID" property'>Partition:UUID</a> property.</td>
165
<br class="table-break"><p>
166
For reference, the polkit actions defined by udisks 1.98.0
69
168
are included here: