aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mkswap.c3
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)
newcon = context_str(context);
if (!newcon)
goto error;
- if (strcmp(oldcon, newcon) != 0 && fsetfilecon_raw(fd, newcon) < 0)
+ /* fsetfilecon_raw is hidden */
+ if (strcmp(oldcon, newcon) != 0 && fsetfilecon(fd, newcon) < 0)
goto error;
if (ENABLE_FEATURE_CLEAN_UP) {
context_free(context);