Commit a9e98056 authored by Owen W. Taylor's avatar Owen W. Taylor

gsm-systemd.c: Restrict the login monitor to the "session" category

We only are interested in changes to sd_session_get_active(), so only
listen for changes in the "session" category. This reduces overhead
by a small amount, and also reduces the amount of /var/run/systemd
that needs to be read. (Bug 772537 is a failure because of a SELinux
policy preventint reading /var/run/systemd/machines - which we don't
need to monitor anyways.)
parent 1a841aa5
......@@ -231,7 +231,7 @@ sd_source_new (void)
source = g_source_new (&sd_source_funcs, sizeof (SdSource));
sd_source = (SdSource *)source;
if ((ret = sd_login_monitor_new (NULL, &sd_source->monitor)) < 0) {
if ((ret = sd_login_monitor_new ("session", &sd_source->monitor)) < 0) {
g_warning ("Error getting login monitor: %d", ret);
} else {
sd_source->pollfd.fd = sd_login_monitor_get_fd (sd_source->monitor);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment