| 1 |
<?xml version="1.0" encoding="UTF-8"?> <!--*-nxml-*--> |
| 2 |
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" |
| 3 |
"https://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> |
| 4 |
|
| 5 |
<!-- |
| 6 |
SPDX-License-Identifier: LGPL-2.1-or-later |
| 7 |
|
| 8 |
This file is part of systemd. |
| 9 |
|
| 10 |
systemd is free software; you can redistribute it and/or modify it |
| 11 |
under the terms of the GNU Lesser General Public License as published by |
| 12 |
the Free Software Foundation; either version 2.1 of the License, or |
| 13 |
(at your option) any later version. |
| 14 |
--> |
| 15 |
|
| 16 |
<policyconfig> |
| 17 |
|
| 18 |
<vendor>The systemd Project</vendor> |
| 19 |
<vendor_url>https://systemd.io</vendor_url> |
| 20 |
|
| 21 |
<!-- Allow mounting DDIs into the host user namespace --> |
| 22 |
<action id="io.systemd.mount-file-system.mount-image"> |
| 23 |
<!-- This action is generally checked first: we'll first try to mount the image with |
| 24 |
signature checks on. If that fails, we'll retry with the untrusted action below. --> |
| 25 |
<description gettext-domain="systemd">Allow mounting of file system image</description> |
| 26 |
<message gettext-domain="systemd">Authentication is required for an application to mount a file system image.</message> |
| 27 |
<defaults> |
| 28 |
<allow_any>auth_admin_keep</allow_any> |
| 29 |
<allow_inactive>auth_admin_keep</allow_inactive> |
| 30 |
<allow_active>yes</allow_active> |
| 31 |
</defaults> |
| 32 |
</action> |
| 33 |
|
| 34 |
<action id="io.systemd.mount-file-system.mount-untrusted-image"> |
| 35 |
<!-- If the image cannot be mounted via the regular action because it is not signed by a |
| 36 |
recognized key, we'll try this action. --> |
| 37 |
<description gettext-domain="systemd">Allow mounting of untrusted file system image</description> |
| 38 |
<message gettext-domain="systemd">Authentication is required for an application to mount a cryptographically unsigned file system image or an image whose cryptographic signature is not recognized.</message> |
| 39 |
<defaults> |
| 40 |
<allow_any>auth_admin</allow_any> |
| 41 |
<allow_inactive>auth_admin</allow_inactive> |
| 42 |
<allow_active>auth_admin</allow_active> |
| 43 |
</defaults> |
| 44 |
|
| 45 |
<annotate key="org.freedesktop.policykit.imply">io.systemd.mount-file-system.mount-image</annotate> |
| 46 |
</action> |
| 47 |
|
| 48 |
<!-- Allow mounting DDIs into a private user namespace --> |
| 49 |
<action id="io.systemd.mount-file-system.mount-image-privately"> |
| 50 |
<description gettext-domain="systemd">Allow private mounting of trusted file system image</description> |
| 51 |
<message gettext-domain="systemd">Authentication is required for an application to privately mount a file system image or an image whose cryptographic signature is recognized.</message> |
| 52 |
<defaults> |
| 53 |
<allow_any>yes</allow_any> |
| 54 |
<allow_inactive>yes</allow_inactive> |
| 55 |
<allow_active>yes</allow_active> |
| 56 |
</defaults> |
| 57 |
</action> |
| 58 |
|
| 59 |
<action id="io.systemd.mount-file-system.mount-untrusted-image-privately"> |
| 60 |
<description gettext-domain="systemd">Allow private mounting of untrusted file system image</description> |
| 61 |
<message gettext-domain="systemd">Authentication is required for an application to privately mount a cryptographically unsigned file system image or an image whose cryptographic signature is not recognized.</message> |
| 62 |
<defaults> |
| 63 |
<allow_any>auth_admin</allow_any> |
| 64 |
<allow_inactive>auth_admin</allow_inactive> |
| 65 |
<allow_active>auth_admin</allow_active> |
| 66 |
</defaults> |
| 67 |
|
| 68 |
<annotate key="org.freedesktop.policykit.imply">io.systemd.mount-file-system.mount-image-privately</annotate> |
| 69 |
</action> |
| 70 |
|
| 71 |
<!-- Allow mounting directories into the host user namespace --> |
| 72 |
<action id="io.systemd.mount-file-system.mount-directory"> |
| 73 |
<!-- If the directory is owned by the user (or by the foreign UID range, with a parent |
| 74 |
directory owned by the user), make little restrictions --> |
| 75 |
<description gettext-domain="systemd">Allow mounting of directory</description> |
| 76 |
<message gettext-domain="systemd">Authentication is required for an application to mount directory $(directory).</message> |
| 77 |
<defaults> |
| 78 |
<allow_any>auth_admin_keep</allow_any> |
| 79 |
<allow_inactive>auth_admin_keep</allow_inactive> |
| 80 |
<allow_active>yes</allow_active> |
| 81 |
</defaults> |
| 82 |
</action> |
| 83 |
|
| 84 |
<action id="io.systemd.mount-file-system.mount-untrusted-directory"> |
| 85 |
<!-- If the directory is owned by an other user, require authentication --> |
| 86 |
<description gettext-domain="systemd">Allow mounting of untrusted directory</description> |
| 87 |
<message gettext-domain="systemd">Authentication is required for an application to mount directory $(directory) which is not owned by the user.</message> |
| 88 |
<defaults> |
| 89 |
<allow_any>auth_admin</allow_any> |
| 90 |
<allow_inactive>auth_admin</allow_inactive> |
| 91 |
<allow_active>auth_admin</allow_active> |
| 92 |
</defaults> |
| 93 |
|
| 94 |
<annotate key="org.freedesktop.policykit.imply">io.systemd.mount-file-system.mount-directory</annotate> |
| 95 |
</action> |
| 96 |
|
| 97 |
<!-- Allow mounting directories into a private user namespace --> |
| 98 |
<action id="io.systemd.mount-file-system.mount-directory-privately"> |
| 99 |
<description gettext-domain="systemd">Allow private mounting of directory</description> |
| 100 |
<message gettext-domain="systemd">Authentication is required for an application to privately mount directory $(directory).</message> |
| 101 |
<defaults> |
| 102 |
<allow_any>yes</allow_any> |
| 103 |
<allow_inactive>yes</allow_inactive> |
| 104 |
<allow_active>yes</allow_active> |
| 105 |
</defaults> |
| 106 |
</action> |
| 107 |
|
| 108 |
<action id="io.systemd.mount-file-system.mount-untrusted-directory-privately"> |
| 109 |
<description gettext-domain="systemd">Allow private mounting of untrusted directory</description> |
| 110 |
<message gettext-domain="systemd">Authentication is required for an application to privately mount directory $(directory) which is not owned by the user.</message> |
| 111 |
<defaults> |
| 112 |
<allow_any>auth_admin</allow_any> |
| 113 |
<allow_inactive>auth_admin</allow_inactive> |
| 114 |
<allow_active>auth_admin</allow_active> |
| 115 |
</defaults> |
| 116 |
|
| 117 |
<annotate key="org.freedesktop.policykit.imply">io.systemd.mount-file-system.mount-directory-privately</annotate> |
| 118 |
</action> |
| 119 |
|
| 120 |
<!-- Allow making foreign UID range owned directories --> |
| 121 |
<action id="io.systemd.mount-file-system.make-directory"> |
| 122 |
<description gettext-domain="systemd">Allow creating directory owned by the foreign UID range</description> |
| 123 |
<message gettext-domain="systemd">Authentication is required for an application to create $(directory) owned by the foreign UID range.</message> |
| 124 |
<defaults> |
| 125 |
<allow_any>yes</allow_any> |
| 126 |
<allow_inactive>yes</allow_inactive> |
| 127 |
<allow_active>yes</allow_active> |
| 128 |
</defaults> |
| 129 |
</action> |
| 130 |
|
| 131 |
<action id="io.systemd.mount-file-system.make-directory-untrusted"> |
| 132 |
<description gettext-domain="systemd">Allow creating directory owned by the foreign UID range below directory not owned by the user</description> |
| 133 |
<message gettext-domain="systemd">Authentication is required for an application to create $(directory) owned by the foreign UID range, below a directory not owned by the user.</message> |
| 134 |
<defaults> |
| 135 |
<allow_any>auth_admin</allow_any> |
| 136 |
<allow_inactive>auth_admin</allow_inactive> |
| 137 |
<allow_active>auth_admin</allow_active> |
| 138 |
</defaults> |
| 139 |
|
| 140 |
<annotate key="org.freedesktop.policykit.imply">io.systemd.mount-file-system.make-directory</annotate> |
| 141 |
</action> |
| 142 |
</policyconfig> |