diff options
author | Kay Sievers <kay@vrfy.org> | 2013-03-21 23:11:51 +0100 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2013-03-21 23:13:17 +0100 |
commit | 9a8ae49d91ae303c4f7c87f9c56fba3e8d646af7 (patch) | |
tree | cfdddad7ce891f91f6c8f13f17c67cf7f57e2766 | |
parent | e3017af97310da024ffb378ed155bc1676922ce7 (diff) |
udev: always set selinux label at "add" events
https://bugs.freedesktop.org/show_bug.cgi?id=62615
-rw-r--r-- | src/udev/udev-event.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index efd9b6d71d..3db2cb7165 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -838,6 +838,8 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, } if (major(udev_device_get_devnum(dev)) > 0) { + bool apply; + /* remove/update possible left-over symlinks from old database entry */ if (event->dev_db != NULL) udev_node_update_old_links(dev, event->dev_db); @@ -861,8 +863,8 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, } } - udev_node_add(dev, event->owner_set || event->group_set || event->mode_set, - event->mode, event->uid, event->gid); + apply = streq(udev_device_get_action(dev), "add") || event->owner_set || event->group_set || event->mode_set; + udev_node_add(dev, apply, event->mode, event->uid, event->gid); } /* preserve old, or get new initialization timestamp */ |