machined: open up OpenMachinePTY() for unpriv clients
The method call already does a PK check, it was just forgotten to allowlist this in the dbus policy. And in the dbus vtable for OpenMachinePTY() call. (It was allowlisted in the per-machine vtable…) Anyway, clean this up.
This commit is contained in:
@@ -948,7 +948,7 @@ const sd_bus_vtable manager_vtable[] = {
|
||||
SD_BUS_ARGS("s", name),
|
||||
SD_BUS_RESULT("h", pty, "s", pty_path),
|
||||
method_open_machine_pty,
|
||||
0),
|
||||
SD_BUS_VTABLE_UNPRIVILEGED),
|
||||
SD_BUS_METHOD_WITH_ARGS("OpenMachineLogin",
|
||||
SD_BUS_ARGS("s", name),
|
||||
SD_BUS_RESULT("h", pty, "s", pty_path),
|
||||
|
||||
@@ -72,6 +72,10 @@
|
||||
send_interface="org.freedesktop.machine1.Manager"
|
||||
send_member="OpenMachineLogin"/>
|
||||
|
||||
<allow send_destination="org.freedesktop.machine1"
|
||||
send_interface="org.freedesktop.machine1.Manager"
|
||||
send_member="OpenMachinePTY"/>
|
||||
|
||||
<allow send_destination="org.freedesktop.machine1"
|
||||
send_interface="org.freedesktop.machine1.Manager"
|
||||
send_member="OpenMachineShell"/>
|
||||
@@ -176,6 +180,10 @@
|
||||
send_interface="org.freedesktop.machine1.Machine"
|
||||
send_member="OpenLogin"/>
|
||||
|
||||
<allow send_destination="org.freedesktop.machine1"
|
||||
send_interface="org.freedesktop.machine1.Machine"
|
||||
send_member="OpenPTY"/>
|
||||
|
||||
<allow send_destination="org.freedesktop.machine1"
|
||||
send_interface="org.freedesktop.machine1.Machine"
|
||||
send_member="OpenShell"/>
|
||||
|
||||
Reference in New Issue
Block a user