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
committerKay Sievers <kay@vrfy.org>2013-10-08 02:23:24 +0200
commitc26547d612733371494330e26c7d3604a5dba3d9 (patch)
tree2a89eb3090316bd0c91f3c10aa2b66adc11065dd /src/udev/udev-event.c
parent8b197c3a8a57c3f7c231b39e5660856fd9580c80 (diff)
udev: support custom Linux Security Module labels for device nodes
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 3db2cb7165..c4603a0c0e 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);
@@ -864,7 +866,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 */