summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-30 00:47:50 +0200
committerLennart Poettering <lennart@poettering.net>2011-03-30 00:47:50 +0200
commit72bc8d005654ad30838edfe9373109a49cc29448 (patch)
treea891c6319589f493234f4cbe1af863714fc100e4
parentea87ca5a9ee9c82b456a54747d442c715ff26bee (diff)
manager: fix taint check for /usr
-rw-r--r--TODO4
-rw-r--r--src/dbus-manager.c2
-rw-r--r--src/manager.c2
-rw-r--r--src/manager.h2
4 files changed, 7 insertions, 3 deletions
diff --git a/TODO b/TODO
index 4759fcdd87..59bd2130d3 100644
--- 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
diff --git a/src/dbus-manager.c b/src/dbus-manager.c
index c21cb5f576..a2a25b72ff 100644
--- a/src/dbus-manager.c
+++ b/src/dbus-manager.c
@@ -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) {
diff --git a/src/manager.c b/src/manager.c
index 69d231a85f..faf30dc49e 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -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;
diff --git a/src/manager.h b/src/manager.h
index c183e105af..4b405d61c1 100644
--- a/src/manager.h
+++ b/src/manager.h
@@ -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