From 35ea39e277338192f1140492234ce993a56ecb2c Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 13 Mar 2008 15:54:21 +0100 Subject: [PATCH] selinux: set context for real file name not the temp name --- udev_node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev_node.c b/udev_node.c index bd58a6c4..6ca0601e 100644 --- a/udev_node.c +++ b/udev_node.c @@ -164,7 +164,7 @@ static int node_symlink(const char *node, const char *slink) strlcpy(slink_tmp, slink, sizeof(slink_tmp)); strlcat(slink_tmp, TMP_FILE_EXT, sizeof(slink_tmp)); unlink(slink_tmp); - selinux_setfscreatecon(slink_tmp, NULL, S_IFLNK); + selinux_setfscreatecon(slink, NULL, S_IFLNK); retval = symlink(target, slink_tmp); selinux_resetfscreatecon(); if (retval != 0) { -- 2.39.5