X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogind.c;h=28ba58bf5481bab8c29445c1ab957ab143cb4ed7;hb=25d934917d3dd2ab10e8acc9a6bacd8c7f2f1067;hp=fd17d80541e8dbd02fe28d454456dc48292bec7f;hpb=193197e85ccc5622abd9653dcd939712334d3ea3;p=elogind.git diff --git a/src/logind.c b/src/logind.c index fd17d8054..28ba58bf5 100644 --- a/src/logind.c +++ b/src/logind.c @@ -56,7 +56,14 @@ Manager *manager_new(void) { m->cgroups = hashmap_new(string_hash_func, string_compare_func); m->fifo_fds = hashmap_new(trivial_hash_func, trivial_compare_func); - if (!m->devices || !m->seats || !m->sessions || !m->users) { + if (!m->devices || !m->seats || !m->sessions || !m->users || !m->cgroups || !m->fifo_fds) { + manager_free(m); + return NULL; + } + + m->reset_controllers = strv_new("cpu", NULL); + m->kill_exclude_users = strv_new("root", NULL); + if (!m->reset_controllers || !m->kill_exclude_users) { manager_free(m); return NULL; } @@ -264,11 +271,6 @@ int manager_process_seat_device(Manager *m, struct udev_device *d) { assert(m); - /* FIXME: drop this check as soon as libudev's enum support - * honours tags and subsystem matches at the same time */ - if (!streq_ptr(udev_device_get_subsystem(d), "graphics")) - return 0; - if (streq_ptr(udev_device_get_action(d), "remove")) { /* FIXME: use syspath instead of sysname here, as soon as fb driver is fixed */