diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-10-23 18:34:58 +0200 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-10-25 18:34:28 -0400 |
commit | 7ede4612365f6420a3aad963d0d8bb7bd390344d (patch) | |
tree | 81943a1c2bf39e396fb2bd70ab2529a2504212a9 /src/shared/label.c | |
parent | c649be35f12331321ef2e5da522d91baa9a77550 (diff) |
smack: rework SMACK label fixing code to follow more closely the semantics of the matching selinux code
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared/label.c')
-rw-r--r-- | src/shared/label.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/shared/label.c b/src/shared/label.c index 32b155088c..44b1eca0c2 100644 --- a/src/shared/label.c +++ b/src/shared/label.c @@ -21,19 +21,15 @@ #include "util.h" int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { - int r = 0; + int r, q; - if (mac_selinux_use()) { - r = mac_selinux_fix(path, ignore_enoent, ignore_erofs); - if (r < 0) - return r; - } + r = mac_selinux_fix(path, ignore_enoent, ignore_erofs); + q = mac_smack_fix(path, ignore_enoent, ignore_erofs); - if (mac_smack_use()) { - r = mac_smack_fix(path); - if (r < 0) - return r; - } + if (r < 0) + return r; + if (q < 0) + return q; - return r; + return 0; } |