X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fverbs.c;h=d9cdb38d651feb9194ff40b34370549bce61373c;hb=9eaebafed6dec1c3b5d1307b37f1b03a19530527;hp=c7beccc2dc291c762307a3f7ccb87200c0fdf9eb;hpb=3b22396a4b2767a98172f6915929c47738cb0a1e;p=elogind.git
diff --git a/src/basic/verbs.c b/src/basic/verbs.c
index c7beccc2d..d9cdb38d6 100644
--- a/src/basic/verbs.c
+++ b/src/basic/verbs.c
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
/***
This file is part of systemd.
@@ -19,8 +17,16 @@
along with systemd; If not, see .
***/
-#include "util.h"
+#include
+#include
+#include
+#include
+
+#include "log.h"
+#include "macro.h"
+#include "string-util.h"
#include "verbs.h"
+#include "virt.h"
int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) {
const Verb *verb;
@@ -77,6 +83,11 @@ int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) {
return -EINVAL;
}
+ if ((verb->flags & VERB_NOCHROOT) && running_in_chroot() > 0) {
+ log_info("Running in chroot, ignoring request.");
+ return 0;
+ }
+
if (name)
return verb->dispatch(left, argv + optind, userdata);
else {