diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-03-30 02:12:46 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-03-30 02:12:46 +0200 |
commit | 871c44a747a8bf4465cbfda445216e9ac66d4a40 (patch) | |
tree | 5b491ba159502fc2da1a984e12216837256d2861 /src/dbus-manager.c | |
parent | d885ac661b74bb44691c4ac16822e93cf08e11e9 (diff) |
taint: add missing cgroups taint flag
Diffstat (limited to 'src/dbus-manager.c')
-rw-r--r-- | src/dbus-manager.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/dbus-manager.c b/src/dbus-manager.c index a2a25b72ff..92a602219b 100644 --- a/src/dbus-manager.c +++ b/src/dbus-manager.c @@ -20,6 +20,7 @@ ***/ #include <errno.h> +#include <unistd.h> #include "dbus.h" #include "log.h" @@ -224,16 +225,17 @@ static int bus_manager_append_tainted(Manager *m, DBusMessageIter *i, const char assert(property); if (m->taint_usr) - e = stpcpy(e, "usr-separate-fs"); + e = stpcpy(e, "usr-separate-fs "); - if (readlink_malloc("/etc/mtab", &p) < 0) { - if (e != buf) - e = stpcpy(e, " "); - e = stpcpy(e, "etc-mtab-not-symlink"); - } else + if (readlink_malloc("/etc/mtab", &p) < 0) + e = stpcpy(e, "etc-mtab-not-symlink "); + else free(p); - t = buf; + if (access("/proc/cgroups", F_OK) < 0) + e = stpcpy(e, "cgroups-missing "); + + t = strstrip(buf); if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t)) return -ENOMEM; |