diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-10-26 17:53:59 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-26 17:53:59 +0100 |
commit | a9067193dd883289570b05ff2c9f0c3def302a39 (patch) | |
tree | 0bc12b97829aa959f902024d873e6065144b3c03 /src/core/dbus-unit.c | |
parent | 5422848d63cdab4beac935d78de229676ba87243 (diff) | |
parent | efb30ba1a6476240688b218224ac22c0fa77b8d7 (diff) |
Merge pull request #1679 from evverx/refuse-manual-start-by-reload-or-restart
core: don't allow manual start with reload-or-restart too
Diffstat (limited to 'src/core/dbus-unit.c')
-rw-r--r-- | src/core/dbus-unit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index b2b9eceeb3..7220fe688f 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -986,7 +986,8 @@ int bus_unit_queue_job( if ((type == JOB_START && u->refuse_manual_start) || (type == JOB_STOP && u->refuse_manual_stop) || - ((type == JOB_RESTART || type == JOB_TRY_RESTART) && (u->refuse_manual_start || u->refuse_manual_stop))) + ((type == JOB_RESTART || type == JOB_TRY_RESTART) && (u->refuse_manual_start || u->refuse_manual_stop)) || + (type == JOB_RELOAD_OR_START && job_type_collapse(type, u) == JOB_START && u->refuse_manual_start)) return sd_bus_error_setf(error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, unit %s may be requested by dependency only.", u->id); r = manager_add_job(u->manager, type, u, mode, true, error, &j); |