mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
smack-util: tiny simplification
This commit is contained in:
parent
3fc0688d42
commit
f7c9ade22f
@ -286,14 +286,13 @@ int mac_smack_copy(const char *dest, const char *src) {
|
||||
#endif
|
||||
|
||||
int rename_and_apply_smack_floor_label(const char *from, const char *to) {
|
||||
int r = 0;
|
||||
|
||||
if (rename(from, to) < 0)
|
||||
return -errno;
|
||||
|
||||
#if HAVE_SMACK_RUN_LABEL
|
||||
r = mac_smack_apply(to, SMACK_ATTR_ACCESS, SMACK_FLOOR_LABEL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
return mac_smack_apply(to, SMACK_ATTR_ACCESS, SMACK_FLOOR_LABEL);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user