[systemd-commits] 2 commits - TODO src/core

Lennart Poettering lennart at kemper.freedesktop.org
Sun Jan 12 04:14:07 PST 2014


 TODO               |    7 +++++++
 src/core/manager.c |   36 ++++++++++++++++++++++--------------
 2 files changed, 29 insertions(+), 14 deletions(-)

New commits:
commit f069efb4710332139ac508180cb8246b02428c17
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Jan 12 20:10:40 2014 +0800

    core: don't allow setting NOTIFY_SOCKET and similar env vars we need ourselves via SetEnvironment bus calls
    
    We just quietly eat them up, so that simple environment importing still
    works without error.

diff --git a/src/core/manager.c b/src/core/manager.c
index 91c3d59..95fc7e6 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -332,6 +332,23 @@ static int manager_setup_signals(Manager *m) {
         return 0;
 }
 
+static void manager_clean_environment(Manager *m) {
+        assert(m);
+
+        /* Let's remove some environment variables that we
+         * need ourselves to communicate with our clients */
+        strv_env_unset_many(
+                        m->environment,
+                        "NOTIFY_SOCKET",
+                        "MAINPID",
+                        "MANAGERPID",
+                        "LISTEN_PID",
+                        "LISTEN_FDS",
+                        "WATCHDOG_PID",
+                        "WATCHDOG_USEC",
+                        NULL);
+}
+
 static int manager_default_environment(Manager *m) {
         assert(m);
 
@@ -352,24 +369,12 @@ static int manager_default_environment(Manager *m) {
                 /* The user manager passes its own environment
                  * along to its children. */
                 m->environment = strv_copy(environ);
-
-                /* Let's remove some environment variables that we
-                 * need ourselves to communicate with our clients */
-                strv_env_unset_many(
-                                m->environment,
-                                "NOTIFY_SOCKET",
-                                "MAINPID",
-                                "MANAGERPID",
-                                "LISTEN_PID",
-                                "LISTEN_FDS",
-                                "WATCHDOG_PID",
-                                "WATCHDOG_USEC",
-                                NULL);
         }
 
         if (!m->environment)
                 return -ENOMEM;
 
+        manager_clean_environment(m);
         strv_sort(m->environment);
 
         return 0;
@@ -2689,7 +2694,10 @@ int manager_environment_add(Manager *m, char **minus, char **plus) {
         if (b != l)
                 strv_free(b);
 
-        m->environment = strv_sort(l);
+        m->environment = l;
+        manager_clean_environment(m);
+        strv_sort(m->environment);
+
         return 0;
 }
 

commit 09ecd746c9d6581664873674c2188f8c93ed7780
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Jan 12 20:10:33 2014 +0800

    update TODO

diff --git a/TODO b/TODO
index 04f23dd..521ba8d 100644
--- a/TODO
+++ b/TODO
@@ -32,6 +32,13 @@ External:
 
 Features:
 
+* introduce bus call FreezeUnit(s, b), as well as "systemctl freeze
+  $UNIT" and "systemctl thaw $UNIT" as wrappers around this. The calls
+  should SIGSTOP all unit processes in a loop until all processes of
+  it are fully stopped. This can later be used for app management by
+  desktop UIs such as gnome-shell to freeze apps that are not visible
+  on screen, not unlike how job control works on the shell
+
 * machinectl bash completion is missing
 * busctl bash and zsh completions are outdated
 



More information about the systemd-commits mailing list