summaryrefslogtreecommitdiff
path: root/src/core/selinux-access.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/selinux-access.c')
-rw-r--r--src/core/selinux-access.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c
index cdbfb83a1a..184f202c1e 100644
--- a/src/core/selinux-access.c
+++ b/src/core/selinux-access.c
@@ -250,6 +250,27 @@ finish:
return r;
}
+int selinux_unit_access_check_strv(char **units,
+ sd_bus_message *message,
+ Manager *m,
+ const char *permission,
+ sd_bus_error *error) {
+ char **i;
+ Unit *u;
+ int r;
+
+ STRV_FOREACH(i, units) {
+ u = manager_get_unit(m, *i);
+ if (u) {
+ r = selinux_unit_access_check(u, message, permission, error);
+ if (r < 0)
+ return r;
+ }
+ }
+
+ return 0;
+}
+
#else
int selinux_generic_access_check(
@@ -264,4 +285,12 @@ int selinux_generic_access_check(
void selinux_access_free(void) {
}
+int selinux_unit_access_check_strv(char **units,
+ sd_bus_message *message,
+ Manager *m,
+ const char *permission,
+ sd_bus_error *error) {
+ return 0;
+}
+
#endif