summaryrefslogtreecommitdiff
path: root/src/core/selinux-access.c
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2014-10-08 11:59:46 +0200
committerLukas Nykryn <lnykryn@redhat.com>2014-10-08 12:44:00 +0200
commite94937df954451eb4aa63573f0d7404ed2db987e (patch)
tree9dbafa0dd1e58991e7e761d83480b2f5276d0d28 /src/core/selinux-access.c
parentcb87a73b45503eaa6bead291423a529b00d27156 (diff)
systemctl: add add-wants and add-requires verbs
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