X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmain.c;h=d1be83d44f9eb774025e5c8ccf18e7dc23eb8dbd;hb=4dba533a137486719fb385c45fc2ff75593fdf53;hp=96a282a34fe7c35281dd3f2e5f5aca8ae9b51722;hpb=934da0359966a77ff4f1505a4663e34aa434f4d3;p=elogind.git diff --git a/src/main.c b/src/main.c index 96a282a34..d1be83d44 100644 --- a/src/main.c +++ b/src/main.c @@ -1012,6 +1012,11 @@ int main(int argc, char *argv[]) { if (parse_argv(argc, argv) < 0) goto finish; + if (arg_action == ACTION_TEST && geteuid() == 0) { + log_error("Don't run test mode as root."); + 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/.systemd/plymouth", F_OK) >= 0)