From: Kay Sievers Date: Thu, 13 Mar 2008 14:54:21 +0000 (+0100) Subject: selinux: set context for real file name not the temp name X-Git-Tag: 174~1760 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=35ea39e277338192f1140492234ce993a56ecb2c selinux: set context for real file name not the temp name --- diff --git a/udev_node.c b/udev_node.c index bd58a6c48..6ca0601ea 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) {