]> err.no Git - systemd/commitdiff
manager: fix taint check for /usr
authorLennart Poettering <lennart@poettering.net>
Tue, 29 Mar 2011 22:47:50 +0000 (00:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 29 Mar 2011 22:47:50 +0000 (00:47 +0200)
TODO
src/dbus-manager.c
src/manager.c
src/manager.h

diff --git a/TODO b/TODO
index 4759fcdd87fa80890f2ce4dd27dd55656520786e..59bd2130d368c41b3b9561dde1534cedef960bb7 100644 (file)
--- a/TODO
+++ b/TODO
@@ -27,10 +27,10 @@ F15:
 
 * LOG_DAEMON/LOG_USER für kmsg messages schreiben
 
-* fix /usr taint
-
 * disable /dev/console status messages after plymouth went down
 
+* quotacheck pulled in too often
+
 Features:
 
 * when key file cannot be found, read it from kbd in cryptsetup
index c21cb5f5766c46908057971369d14c062d4eefd7..a2a25b72ffdd6053e9879498ba63595740f05762 100644 (file)
@@ -223,7 +223,7 @@ static int bus_manager_append_tainted(Manager *m, DBusMessageIter *i, const char
         assert(i);
         assert(property);
 
-        if (dir_is_empty("/usr") > 0)
+        if (m->taint_usr)
                 e = stpcpy(e, "usr-separate-fs");
 
         if (readlink_malloc("/etc/mtab", &p) < 0) {
index 69d231a85f00cc446df7c583b50cacf434f8b737..faf30dc49e5662627c4b434d81f55461aa10886b 100644 (file)
@@ -278,6 +278,8 @@ int manager_new(ManagerRunningAs running_as, Manager **_m) {
                 log_error("Failed to connect to audit log: %m");
 #endif
 
+        m->taint_usr = dir_is_empty("/usr") > 0;
+
         *_m = m;
         return 0;
 
index c183e105af9b30a48dd748f7b79ef38f0708d0f5..4b405d61c1236cf7259be7778c9c59d019794bac 100644 (file)
@@ -211,6 +211,8 @@ struct Manager {
         bool dispatching_run_queue:1;
         bool dispatching_dbus_queue:1;
 
+        bool taint_usr:1;
+
         bool show_status;
         bool confirm_spawn;
 #ifdef HAVE_SYSV_COMPAT