mirror of
https://github.com/systemd/systemd.git
synced 2025-03-22 06:50:18 +03:00
Merge pull request #1516 from poettering/dontisolaterootslice
Don't isolate `-.slice`
This commit is contained in:
commit
88ef5e639b
@ -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#* }%% *}" )
|
||||
|
||||
|
@ -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:");
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user