summaryrefslogtreecommitdiff
path: root/util-linux/mkswap.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-04-24 10:44:31 +0000
committerBernhard Reutner-Fischer2008-04-24 10:44:31 +0000
commitc6191e9a0ab4c05040d246760a619be7c62f84b2 (patch)
tree1734831bab3066b33659b3fb56a0fc974e05dbdd /util-linux/mkswap.c
parent15ce7f5b58563c6b8183da9b5404e5b5d9ba8507 (diff)
downloadbusybox-c6191e9a0ab4c05040d246760a619be7c62f84b2.zip
busybox-c6191e9a0ab4c05040d246760a619be7c62f84b2.tar.gz
- fsetfilecon_war is hidden so use fsetfilecon instead.
Fixes dynamic linking-error: util-linux/lib.a(mkswap.o): In function `mkswap_selinux_setcontext': util-linux/mkswap.c:38: undefined reference to `fsetfilecon_raw'
Diffstat (limited to 'util-linux/mkswap.c')
-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 bf0d7b0..1c364ef 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);