]> git.ipfire.org Git - thirdparty/systemd.git/commit
logind: Restore chvt as non-root user without polkit
authorJoshua Watt <JPEWhacker@gmail.com>
Fri, 30 Oct 2020 13:15:43 +0000 (08:15 -0500)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 Feb 2021 19:24:53 +0000 (20:24 +0100)
commit7820a56ccb6b164699f25fc00cbe3c38fbc182a4
tree588c2e78cf2143010a6bcecb0550c437cb381285
parentb8f762f2fe59c94323c95d2aadea68612dca2b04
logind: Restore chvt as non-root user without polkit

4acf0cfd2f ("logind: check PolicyKit before allowing VT switch") broke
the ability to write user sessions that run graphical sessions (e.g.
weston/X11). This was partially amended in 19bb87fbfa ("login: allow
non-console sessions to change vt") by changing the default PolicyKit
policy so that non-root users with a session are again allowed to switch
the VT. This makes the policy when PolKit is not enabled (as on many
embedded systems) closer the default PolKit policy and allows launching
graphical sessions as a non-root user.

Closes #17473

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
src/login/logind-dbus.c
src/login/logind-polkit.c [new file with mode: 0644]
src/login/logind-polkit.h [new file with mode: 0644]
src/login/logind-seat-dbus.c
src/login/logind-session-dbus.c
src/login/meson.build