Skip to content

Commit

Permalink
core: ignore -.slice and init.scope when isolating
Browse files Browse the repository at this point in the history
Otherwise, we might end up trying to isolate it away when starting user
instances.

While we are at it, also prohibit manual start/stop of these two units.

Fixes: #1507
  • Loading branch information
poettering committed Oct 9, 2015
1 parent c463a6f commit 4178002
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/scope.c
Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions src/core/slice.c
Expand Up @@ -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)
Expand Down

0 comments on commit 4178002

Please sign in to comment.