summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-03-13 15:54:21 +0100
committerKay Sievers <kay.sievers@vrfy.org>2008-03-13 15:54:21 +0100
commit35ea39e277338192f1140492234ce993a56ecb2c (patch)
treef9064edf4cf382ef73aedd64ce8b1fd5d4ea3ab2
parent44d01dced113203c2c3eda7cb6e34ab8fb5c88d5 (diff)
selinux: set context for real file name not the temp name
-rw-r--r--udev_node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev_node.c b/udev_node.c
index bd58a6c485..6ca0601ea4 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) {