selinux: prefer source path over fragment path

This commit is contained in:
Lennart Poettering 2012-09-18 01:55:24 +02:00
parent 901c3d0d85
commit aba15a0391
2 changed files with 3 additions and 3 deletions

View file

@ -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"))

View file

@ -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);