diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-09-21 18:29:23 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-09-21 18:31:42 +0200 |
commit | ce0458be09911e75bfd3b4d802c9594c55a9c98d (patch) | |
tree | edd9bdf44bec9479f7fe8a9e77aa7d5e70bc4723 /src/basic/fileio.c | |
parent | 71a80dcc0b64b01c73e7141c4292ef301543a011 (diff) | |
download | systemd-ce0458be09911e75bfd3b4d802c9594c55a9c98d.tar.gz |
smack: move helper function to smack-util.c
The function was in basic/fileio.c, but it's more appropriate to
keep it out of src/basic.
Fixes compilation with -Dsmack-run-label= set.
Diffstat (limited to 'src/basic/fileio.c')
-rw-r--r-- | src/basic/fileio.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 60a9885108..6a4a65723f 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -1434,16 +1434,3 @@ int warn_file_is_world_accessible(const char *filename, struct stat *st, const c filename, st->st_mode & 07777); return 0; } - -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; -#endif - return r; -} |