Skip to content

Commit 0ef6bbd

Browse files
committed
Edited 3 polkit policies for mounting the file system and added a new one to manage all three.
1 parent 20455c3 commit 0ef6bbd

File tree

2 files changed

+220
-23
lines changed

2 files changed

+220
-23
lines changed

BaseALTPolkit.admx

Lines changed: 180 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<using prefix="system" namespace="BaseALT.Policies.System" />
77
</policyNamespaces>
88
<resources minRequiredRevision="1.0" />
9-
<policies>
9+
<policies>
1010
<policy class="Machine" displayName="$(string.org-freedesktop-udisks2-filesystem-mount)"
1111
explainText="$(string.org-freedesktop-udisks2-filesystem-mount_help)"
1212
key="Software\BaseALT\Policies\Polkit"
@@ -16,7 +16,7 @@
1616
<parentCategory ref="system:ALT_Polkit" />
1717
<supportedOn ref="system:SUPPORTED_AltP10" />
1818
<elements>
19-
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount-options" required="true">
19+
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount" required="false">
2020
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-No)">
2121
<value>
2222
<string>No</string>
@@ -48,7 +48,7 @@
4848
</value>
4949
</item>
5050
</enum>
51-
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-options">
51+
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount">
5252
<trueValue>
5353
<decimal value="1" />
5454
</trueValue>
@@ -59,15 +59,15 @@
5959
</elements>
6060
</policy>
6161
<policy class="User" displayName="$(string.org-freedesktop-udisks2-filesystem-mount)"
62-
explainText="$(string.org-freedesktop-udisks2-filesystem-mount_help)"
62+
explainText="$(string.org-freedesktop-udisks2-filesystem-mount-user_help)"
6363
key="Software\BaseALT\Policies\Polkit"
6464
name="org.freedesktop.udisks2.filesystem-mount-user"
6565
valuename="org.freedesktop.udisks2.filesystem-mount"
66-
presentation="$(presentation.OrgFreedesktopUdisks2FileSystemMountUser-pr)">
66+
presentation="$(presentation.OrgFreedesktopUdisks2FileSystemMount-pr)">
6767
<parentCategory ref="system:ALT_Polkit" />
6868
<supportedOn ref="system:SUPPORTED_AltP10" />
6969
<elements>
70-
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount-options" required="true">
70+
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount" required="false">
7171
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-No)">
7272
<value>
7373
<string>No</string>
@@ -99,7 +99,7 @@
9999
</value>
100100
</item>
101101
</enum>
102-
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-options">
102+
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount">
103103
<trueValue>
104104
<decimal value="1" />
105105
</trueValue>
@@ -118,7 +118,7 @@
118118
<parentCategory ref="system:ALT_Polkit" />
119119
<supportedOn ref="system:SUPPORTED_AltP10" />
120120
<elements>
121-
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount-options" required="true">
121+
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount-other-seat" required="false">
122122
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-No)">
123123
<value>
124124
<string>No</string>
@@ -150,7 +150,7 @@
150150
</value>
151151
</item>
152152
</enum>
153-
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-options">
153+
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-other-seat">
154154
<trueValue>
155155
<decimal value="1" />
156156
</trueValue>
@@ -161,15 +161,15 @@
161161
</elements>
162162
</policy>
163163
<policy class="User" displayName="$(string.org-freedesktop-udisks2-filesystem-mount-other-seat)"
164-
explainText="$(string.org-freedesktop-udisks2-filesystem-mount-other-seat_help)"
164+
explainText="$(string.org-freedesktop-udisks2-filesystem-mount-other-seat-user_help)"
165165
key="Software\BaseALT\Policies\Polkit"
166166
name="org.freedesktop.udisks2.filesystem-mount-other-seat-user"
167167
valuename="org.freedesktop.udisks2.filesystem-mount-other-seat"
168168
presentation="$(presentation.OrgFreedesktopUdisks2FileSystemMountUser-pr)">
169169
<parentCategory ref="system:ALT_Polkit" />
170170
<supportedOn ref="system:SUPPORTED_AltP10" />
171171
<elements>
172-
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount-options" required="true">
172+
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount-other-seat" required="false">
173173
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-No)">
174174
<value>
175175
<string>No</string>
@@ -201,7 +201,7 @@
201201
</value>
202202
</item>
203203
</enum>
204-
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-options">
204+
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-other-seat">
205205
<trueValue>
206206
<decimal value="1" />
207207
</trueValue>
@@ -220,7 +220,7 @@
220220
<parentCategory ref="system:ALT_Polkit" />
221221
<supportedOn ref="system:SUPPORTED_AltP10" />
222222
<elements>
223-
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount-options" required="true">
223+
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount-system" required="false">
224224
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-No)">
225225
<value>
226226
<string>No</string>
@@ -252,7 +252,7 @@
252252
</value>
253253
</item>
254254
</enum>
255-
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-options">
255+
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-system">
256256
<trueValue>
257257
<decimal value="1" />
258258
</trueValue>
@@ -271,7 +271,171 @@
271271
<parentCategory ref="system:ALT_Polkit" />
272272
<supportedOn ref="system:SUPPORTED_AltP10" />
273273
<elements>
274-
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount-options" required="true">
274+
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount-system" required="false">
275+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-No)">
276+
<value>
277+
<string>No</string>
278+
</value>
279+
</item>
280+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Yes)">
281+
<value>
282+
<string>Yes</string>
283+
</value>
284+
</item>
285+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-self)">
286+
<value>
287+
<string>Auth_self</string>
288+
</value>
289+
</item>
290+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-admin)">
291+
<value>
292+
<string>Auth_admin</string>
293+
</value>
294+
</item>
295+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-self-keep)">
296+
<value>
297+
<string>Auth_self_keep</string>
298+
</value>
299+
</item>
300+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-admin-keep)">
301+
<value>
302+
<string>Auth_admin_keep</string>
303+
</value>
304+
</item>
305+
</enum>
306+
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-system">
307+
<trueValue>
308+
<decimal value="1" />
309+
</trueValue>
310+
<falseValue>
311+
<decimal value="0" />
312+
</falseValue>
313+
</boolean>
314+
</elements>
315+
</policy>
316+
<policy class="Machine" displayName="$(string.org-freedesktop-udisks2-filesystem-mount-all)"
317+
explainText="$(string.org-freedesktop-udisks2-filesystem-mount-all_Help)"
318+
key="Software\BaseALT\Policies\Polkit"
319+
name="org-freedesktop-udisks2-filesystem-mount-all"
320+
presentation="$(presentation.org-freedesktop-udisks2-filesystem-mount-all-pr)">
321+
<parentCategory ref="system:ALT_Polkit" />
322+
<supportedOn ref="system:SUPPORTED_AltP10" />
323+
<enabledList defaultKey="Software\BaseALT\Policies\Polkit">
324+
<item valueName="org.freedesktop.udisks2.filesystem-mount">
325+
<value>
326+
<decimal value="2" />
327+
</value>
328+
</item>
329+
<item valueName="org.freedesktop.udisks2.filesystem-mount-other-seat">
330+
<value>
331+
<decimal value="2" />
332+
</value>
333+
</item>
334+
<item valueName="org.freedesktop.udisks2.filesystem-mount-system">
335+
<value>
336+
<decimal value="2" />
337+
</value>
338+
</item>
339+
</enabledList>
340+
<disabledList defaultKey="Software\BaseALT\Policies\Polkit">
341+
<item valueName="org.freedesktop.udisks2.filesystem-mount">
342+
<value>
343+
<decimal value="0" />
344+
</value>
345+
</item>
346+
<item valueName="org.freedesktop.udisks2.filesystem-mount-other-seat">
347+
<value>
348+
<decimal value="0" />
349+
</value>
350+
</item>
351+
<item valueName="org.freedesktop.udisks2.filesystem-mount-system">
352+
<value>
353+
<decimal value="0" />
354+
</value>
355+
</item>
356+
</disabledList>
357+
<elements>
358+
<enum id="OrgFreedesktopUdisks2FileSystemMount_setter" valueName="org.freedesktop.udisks2.filesystem-mount" required="false">
359+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-No)">
360+
<value>
361+
<string>No</string>
362+
</value>
363+
</item>
364+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Yes)">
365+
<value>
366+
<string>Yes</string>
367+
</value>
368+
</item>
369+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-self)">
370+
<value>
371+
<string>Auth_self</string>
372+
</value>
373+
</item>
374+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-admin)">
375+
<value>
376+
<string>Auth_admin</string>
377+
</value>
378+
</item>
379+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-self-keep)">
380+
<value>
381+
<string>Auth_self_keep</string>
382+
</value>
383+
</item>
384+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-admin-keep)">
385+
<value>
386+
<string>Auth_admin_keep</string>
387+
</value>
388+
</item>
389+
</enum>
390+
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount">
391+
<trueValue>
392+
<decimal value="1" />
393+
</trueValue>
394+
<falseValue>
395+
<decimal value="0" />
396+
</falseValue>
397+
</boolean>
398+
<enum id="OrgFreedesktopUdisks2FileSystemMountOther_setter" valueName="org.freedesktop.udisks2.filesystem-mount-other-seat" required="false">
399+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-No)">
400+
<value>
401+
<string>No</string>
402+
</value>
403+
</item>
404+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Yes)">
405+
<value>
406+
<string>Yes</string>
407+
</value>
408+
</item>
409+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-self)">
410+
<value>
411+
<string>Auth_self</string>
412+
</value>
413+
</item>
414+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-admin)">
415+
<value>
416+
<string>Auth_admin</string>
417+
</value>
418+
</item>
419+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-self-keep)">
420+
<value>
421+
<string>Auth_self_keep</string>
422+
</value>
423+
</item>
424+
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-Auth-admin-keep)">
425+
<value>
426+
<string>Auth_admin_keep</string>
427+
</value>
428+
</item>
429+
</enum>
430+
<boolean id="OrgFreedesktopUdisks2FileSystemMountOther_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-other-seat">
431+
<trueValue>
432+
<decimal value="1" />
433+
</trueValue>
434+
<falseValue>
435+
<decimal value="0" />
436+
</falseValue>
437+
</boolean>
438+
<enum id="OrgFreedesktopUdisks2FileSystemMountSystem_setter" valueName="org.freedesktop.udisks2.filesystem-mount-system" required="false">
275439
<item displayName="$(string.org-freedesktop-udisks2-filesystem-mount-No)">
276440
<value>
277441
<string>No</string>
@@ -303,7 +467,7 @@
303467
</value>
304468
</item>
305469
</enum>
306-
<boolean id="OrgFreedesktopUdisks2FileSystemMount_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-options">
470+
<boolean id="OrgFreedesktopUdisks2FileSystemMountSystem_blocker" key="Software\BaseALT\Policies\PolkitLocks" valueName="org.freedesktop.udisks2.filesystem-mount-system">
307471
<trueValue>
308472
<decimal value="1" />
309473
</trueValue>

0 commit comments

Comments
 (0)