diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-03-09 23:59:27 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-03-09 23:59:27 +0100 |
commit | fe783b03419181bed69003ffdd73132426de246a (patch) | |
tree | 47f1cdb6b1eac0d2e6c959cadde720a28f765873 /src | |
parent | b0c8757b056c18863d2f9c07ca3ba21f64a47b54 (diff) |
main: refuse system to be started in a chroot
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 769fc6772c..6d1fd7d55d 100644 --- a/src/main.c +++ b/src/main.c @@ -1030,9 +1030,16 @@ int main(int argc, char *argv[]) { goto finish; } + if (arg_running_as == MANAGER_SYSTEM && + arg_action == ACTION_RUN && + running_in_chroot() > 0) { + log_error("Cannot be run in a chroot() environment."); + goto finish; + } + /* If Plymouth is being run make sure we show the status, so * that there's something nice to see when people press Esc */ - if (access("/dev/.run/systemd/plymouth", F_OK) >= 0) + if (access("/dev/.systemd/plymouth", F_OK) >= 0) arg_show_status = true; if (arg_action == ACTION_HELP) { |