summaryrefslogtreecommitdiff
path: root/src/udev/udev-event.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-10-08 01:59:10 +0200
committerAnthony G. Basile <blueness@gentoo.org>2014-01-09 18:47:32 -0500
commit87539be4377dd8a3c6be306b6552e2111d09d735 (patch)
treeb151c454ccfd6149ebf078f0ee38d942344cd37a /src/udev/udev-event.c
parent9e46e94ba2fe713a6d768134dc6a4503d1e4deb2 (diff)
udev: support custom Linux Security Module labels for device nodes
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r--src/udev/udev-event.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 11ce364c40..7867263b81 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -47,6 +47,7 @@ struct udev_event *udev_event_new(struct udev_device *dev)
event->dev = dev;
event->udev = udev;
udev_list_init(udev, &event->run_list, false);
+ udev_list_init(udev, &event->seclabel_list, false);
event->fd_signal = -1;
event->birth_usec = now(CLOCK_MONOTONIC);
event->timeout_usec = 30 * 1000 * 1000;
@@ -58,6 +59,7 @@ void udev_event_unref(struct udev_event *event)
if (event == NULL)
return;
udev_list_cleanup(&event->run_list);
+ udev_list_cleanup(&event->seclabel_list);
free(event->program_result);
free(event->name);
free(event);
@@ -987,7 +989,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules,
}
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);
+ udev_node_add(dev, apply, event->mode, event->uid, event->gid, &event->seclabel_list);
}
/* preserve old, or get new initialization timestamp */