mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
add O_NOFOLLOW when creating files in link stack
This commit is contained in:
parent
8b56bada9a
commit
9355f324e1
@ -323,7 +323,7 @@ static void link_update(struct udev_device *dev, const char *slink, bool add)
|
|||||||
err = util_create_path(udev, filename);
|
err = util_create_path(udev, filename);
|
||||||
if (err != 0 && err != -ENOENT)
|
if (err != 0 && err != -ENOENT)
|
||||||
break;
|
break;
|
||||||
fd = open(filename, O_WRONLY|O_CREAT, 0444);
|
fd = open(filename, O_WRONLY|O_CREAT|O_NOFOLLOW, 0444);
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
close(fd);
|
close(fd);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user