aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util-linux/mkswap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 53537fcd9..2e9662b2b 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -15,7 +15,7 @@ static void mkswap_selinux_setcontext(int fd, const char *path)
if (!is_selinux_enabled())
return;
- xfstat(fd, &stbuf, argv[0]);
+ xfstat(fd, &stbuf, path);
if (S_ISREG(stbuf.st_mode)) {
security_context_t newcon;
security_context_t oldcon = NULL;