summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-10-09 17:32:30 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2015-10-09 17:32:30 +0200
commit88ef5e639b30b53b3663f766874dc519908de74d (patch)
tree6d03c9d5d3391283e37a6e44d2a34263678f7cbb
parent2c882b8bfa29937fb808fa1dd60c2a7ab0e8e85e (diff)
parent417800228f69db9ff37f4193d11508757dd09308 (diff)
Merge pull request #1516 from poettering/dontisolaterootslice
Don't isolate `-.slice`
-rw-r--r--shell-completion/zsh/_udevadm2
-rw-r--r--src/core/dbus-manager.c6
-rw-r--r--src/core/scope.c3
-rw-r--r--src/core/slice.c3
-rw-r--r--src/libsystemd/sd-daemon/sd-daemon.c6
5 files changed, 12 insertions, 8 deletions
diff --git a/shell-completion/zsh/_udevadm b/shell-completion/zsh/_udevadm
index e5d252c818..bb23e64d24 100644
--- a/shell-completion/zsh/_udevadm
+++ b/shell-completion/zsh/_udevadm
@@ -89,7 +89,7 @@ _udevadm_test-builtin(){
_udevadm_mounts(){
local dev_tmp dpath_tmp mp_tmp mline
- tmp=( "${(@f)$(< /etc/mtab)}" )
+ tmp=( "${(@f)$(< /proc/self/mounts)}" )
dev_tmp=( "${(@)${(@)tmp%% *}:#none}" )
mp_tmp=( "${(@)${(@)tmp#* }%% *}" )
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 9e21b0787d..3f4f60d6e2 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -122,8 +122,7 @@ static int property_get_tainted(
void *userdata,
sd_bus_error *error) {
- char buf[sizeof("split-usr:mtab-not-symlink:cgroups-missing:local-hwclock:")] = "", *e = buf;
- _cleanup_free_ char *p = NULL;
+ char buf[sizeof("split-usr:cgroups-missing:local-hwclock:")] = "", *e = buf;
Manager *m = userdata;
assert(bus);
@@ -133,9 +132,6 @@ static int property_get_tainted(
if (m->taint_usr)
e = stpcpy(e, "split-usr:");
- if (readlink_malloc("/etc/mtab", &p) < 0)
- e = stpcpy(e, "mtab-not-symlink:");
-
if (access("/proc/cgroups", F_OK) < 0)
e = stpcpy(e, "cgroups-missing:");
diff --git a/src/core/scope.c b/src/core/scope.c
index 7325e3601b..ea7d846578 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -534,6 +534,9 @@ static int scope_enumerate(Manager *m) {
u->transient = true;
u->default_dependencies = false;
u->no_gc = true;
+ u->ignore_on_isolate = true;
+ u->refuse_manual_start = true;
+ u->refuse_manual_stop = true;
SCOPE(u)->deserialized_state = SCOPE_RUNNING;
SCOPE(u)->kill_context.kill_signal = SIGRTMIN+14;
diff --git a/src/core/slice.c b/src/core/slice.c
index 063024134a..1542e83eb6 100644
--- a/src/core/slice.c
+++ b/src/core/slice.c
@@ -274,6 +274,9 @@ static int slice_enumerate(Manager *m) {
u->default_dependencies = false;
u->no_gc = true;
+ u->ignore_on_isolate = true;
+ u->refuse_manual_start = true;
+ u->refuse_manual_stop = true;
SLICE(u)->deserialized_state = SLICE_ACTIVE;
if (!u->description)
diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/sd-daemon/sd-daemon.c
index 437518119b..582fb53529 100644
--- a/src/libsystemd/sd-daemon/sd-daemon.c
+++ b/src/libsystemd/sd-daemon/sd-daemon.c
@@ -450,8 +450,10 @@ _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char
if (n_fds > 0 || have_pid) {
/* CMSG_SPACE(0) may return value different then zero, which results in miscalculated controllen. */
- msghdr.msg_controllen = (n_fds ? CMSG_SPACE(sizeof(int) * n_fds) : 0) +
- CMSG_SPACE(sizeof(struct ucred)) * have_pid;
+ msghdr.msg_controllen =
+ (n_fds > 0 ? CMSG_SPACE(sizeof(int) * n_fds) : 0) +
+ (have_pid ? CMSG_SPACE(sizeof(struct ucred)) : 0);
+
msghdr.msg_control = alloca(msghdr.msg_controllen);
cmsg = CMSG_FIRSTHDR(&msghdr);