summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-18 01:55:24 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-18 01:55:24 +0200
commitaba15a0391a04d5444319a609737c6b05f71e7c9 (patch)
treec8e4dacab8d113ed958de6220c4a10f0c150683c /src
parent901c3d0d85628e6a4708bc9748766029cf5c7f97 (diff)
selinux: prefer source path over fragment path
Diffstat (limited to 'src')
-rw-r--r--src/core/dbus-unit.c4
-rw-r--r--src/core/selinux-access.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index d86f60e498..3d3458bed7 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -420,9 +420,9 @@ static DBusHandlerResult bus_unit_message_dispatch(Unit *u, DBusConnection *conn
connection,
message,
m,
- (u->fragment_path ? u->fragment_path: u->source_path),
+ u->source_path ? u->source_path : u->fragment_path,
&error);
- if (r)
+ if (r < 0)
return bus_send_error_reply(connection, message, &error, r);
if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Unit", "Start"))
diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c
index 30eab68336..fc1df866cf 100644
--- a/src/core/selinux-access.c
+++ b/src/core/selinux-access.c
@@ -684,7 +684,7 @@ int selinux_manager_access_check(DBusConnection *connection, DBusMessage *messag
}
}
- path = (u->fragment_path ? u->fragment_path: u->source_path);
+ path = u->source_path ? u->source_path : u->fragment_path;
}
r = selinux_access_check(connection, message, m, error, perm, path);