summaryrefslogtreecommitdiff
path: root/udev/udev-node.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-12-11 14:00:46 +0100
committerKay Sievers <kay.sievers@vrfy.org>2010-12-11 14:00:46 +0100
commit24d1076696ebe6696a8b8df414ab265aa6fc89c2 (patch)
tree6b988e0ea24457f1d3256fca64ced4da792f8b03 /udev/udev-node.c
parent2713e6ab0abfc47a54ccbae26be22471aef46b24 (diff)
udevd: simplify udev database and fix DEVNAME handling
Diffstat (limited to 'udev/udev-node.c')
-rw-r--r--udev/udev-node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev/udev-node.c b/udev/udev-node.c
index 70488c420b..a9ffa988b1 100644
--- a/udev/udev-node.c
+++ b/udev/udev-node.c
@@ -327,7 +327,7 @@ static void link_update(struct udev_device *dev, const char *slink, bool add)
err = util_create_path(udev, filename);
if (err != 0 && err != -ENOENT)
break;
- fd = open(filename, O_WRONLY|O_CREAT|O_NOFOLLOW, 0444);
+ fd = open(filename, O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444);
if (fd >= 0)
close(fd);
else