summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-14 22:51:19 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-14 22:51:28 +0200
commitd40c98162feaae6e43fa51d702da4153e3ec19dc (patch)
tree167a5de8271a233e69a4f357419cc50475950af1 /src
parent74b91131ed09850ed487a2f7849147ff6f80194d (diff)
uaccess: become a nop when not run on a systemd system
Diffstat (limited to 'src')
-rw-r--r--src/uaccess.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/uaccess.c b/src/uaccess.c
index 435471e91a..a9713a5023 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];