From d40c98162feaae6e43fa51d702da4153e3ec19dc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 14 Jul 2011 22:51:19 +0200 Subject: [PATCH] uaccess: become a nop when not run on a systemd system --- src/uaccess.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/uaccess.c b/src/uaccess.c index 435471e9..a9713a50 100644 --- a/src/uaccess.c +++ b/src/uaccess.c @@ -25,6 +25,7 @@ #include "logind-acl.h" #include "util.h" #include "log.h" +#include "sd-daemon.h" int main(int argc, char *argv[]) { int r; @@ -43,6 +44,11 @@ int main(int argc, char *argv[]) { goto finish; } + /* Make sure we don't muck around with ACLs the system is not + * running systemd. */ + if (!sd_booted()) + return 0; + path = argv[1]; seat = argc < 3 || isempty(argv[2]) ? "seat0" : argv[2]; -- 2.39.5