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



commit a9e980566d4c6b37dbcfbd0fd5098d1ed8bd1f42
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Feb 2 13:03:20 2017 -0500

    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.)

 gnome-session/gsm-systemd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gnome-session/gsm-systemd.c b/gnome-session/gsm-systemd.c
index 69971b8..539e991 100644
--- a/gnome-session/gsm-systemd.c
+++ b/gnome-session/gsm-systemd.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]