diff options
-rw-r--r-- | util-linux/mkswap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c index bf0d7b074..1c364efe9 100644 --- a/util-linux/mkswap.c +++ b/util-linux/mkswap.c | |||
@@ -35,7 +35,8 @@ static void mkswap_selinux_setcontext(int fd, const char *path) | |||
35 | newcon = context_str(context); | 35 | newcon = context_str(context); |
36 | if (!newcon) | 36 | if (!newcon) |
37 | goto error; | 37 | goto error; |
38 | if (strcmp(oldcon, newcon) != 0 && fsetfilecon_raw(fd, newcon) < 0) | 38 | /* fsetfilecon_raw is hidden */ |
39 | if (strcmp(oldcon, newcon) != 0 && fsetfilecon(fd, newcon) < 0) | ||
39 | goto error; | 40 | goto error; |
40 | if (ENABLE_FEATURE_CLEAN_UP) { | 41 | if (ENABLE_FEATURE_CLEAN_UP) { |
41 | context_free(context); | 42 | context_free(context); |