summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/selinux-access.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c
index 50a90b0bac..2ecfa40974 100644
--- a/src/core/selinux-access.c
+++ b/src/core/selinux-access.c
@@ -38,6 +38,7 @@
#include "selinux-util.h"
#include "audit-fd.h"
#include "strv.h"
+#include "path-util.h"
static bool initialized = false;
@@ -302,7 +303,10 @@ int mac_selinux_unit_access_check_strv(
int r;
STRV_FOREACH(i, units) {
- r = manager_load_unit(m, *i, NULL, error, &u);
+ if (is_path(*i))
+ r = manager_load_unit(m, NULL, *i, error, &u);
+ else
+ r = manager_load_unit(m, *i, NULL, error, &u);
if (r < 0)
return r;
r = mac_selinux_unit_access_check(u, message, permission, error);