diff options
-rw-r--r-- | src/core/selinux-access.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c index e9a9a020de..50a90b0bac 100644 --- a/src/core/selinux-access.c +++ b/src/core/selinux-access.c @@ -302,12 +302,12 @@ int mac_selinux_unit_access_check_strv( int r; STRV_FOREACH(i, units) { - u = manager_get_unit(m, *i); - if (u) { - r = mac_selinux_unit_access_check(u, message, permission, error); - if (r < 0) - return r; - } + r = manager_load_unit(m, *i, NULL, error, &u); + if (r < 0) + return r; + r = mac_selinux_unit_access_check(u, message, permission, error); + if (r < 0) + return r; } #endif return 0; |