diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-08-30 22:45:46 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-08-30 23:04:36 +0200 |
commit | 2528a7a62c4ad9b2f4773b608d208239299da50c (patch) | |
tree | de5fa60c236e8da0df509d1583fb5369ae66828f /src/manager.c | |
parent | b2bb3dbed9607c440b1a9ccacc515e28136d39ae (diff) |
unit: introduce AllowIsolate= switch
Diffstat (limited to 'src/manager.c')
-rw-r--r-- | src/manager.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/manager.c b/src/manager.c index 0afc99243e..f542883b34 100644 --- a/src/manager.c +++ b/src/manager.c @@ -1523,6 +1523,11 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove return -EINVAL; } + if (mode == JOB_ISOLATE && !unit->meta.allow_isolate) { + dbus_set_error(e, BUS_ERROR_NO_ISOLATION, "Operation refused, unit may not be isolated."); + return -EPERM; + } + log_debug("Trying to enqueue job %s/%s", unit->meta.id, job_type_to_string(type)); if ((r = transaction_add_job_and_dependencies(m, type, unit, NULL, true, override, false, e, &ret)) < 0) { |