1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

selinux: set context for real file name not the temp name

This commit is contained in:
Kay Sievers 2008-03-13 15:54:21 +01:00
parent 44d01dced1
commit 35ea39e277

View File

@ -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) {