diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2015-08-26 10:53:45 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-08-26 10:53:45 +0200 |
commit | be5afe9f5fdf0b2295cf728a9623b0b5347fe8f4 (patch) | |
tree | 40a81581ef6dc3e5e8903fa913acbe2f0be571d9 | |
parent | 031fc5a1ac1c3f4739eb2a1c9761bfb2fab5af3e (diff) | |
parent | 9fa7c1aeb9ec7e9d9f35184ce5c9d334f057d9de (diff) |
Merge pull request #1044 from d-hatayama/fix_systemctl_abspath
selinux: fix regression of systemctl subcommands when absolute unit file paths are specified
-rw-r--r-- | src/core/selinux-access.c | 6 |
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); |