Systemd/src/login
Lennart Poettering adacb9575a bus: introduce "trusted" bus concept and encode access control in object vtables
Introduces a new concept of "trusted" vs. "untrusted" busses. For the
latter libsystemd-bus will automatically do per-method access control,
for the former all access is automatically granted. Per-method access
control is encoded in the vtables: by default all methods are only
accessible to privileged clients. If the SD_BUS_VTABLE_UNPRIVILEGED flag
is set for a method it is accessible to unprivileged clients too. By
default whether a client is privileged is determined via checking for
its CAP_SYS_ADMIN capability, but this can be altered via the
SD_BUS_VTABLE_CAPABILITY() macro that can be ORed into the flags field
of the method.

Writable properties are also subject to SD_BUS_VTABLE_UNPRIVILEGED and
SD_BUS_VTABLE_CAPABILITY() for controlling write access to them. Note
however that read access is unrestricted, as PropertiesChanged messages
might send out the values anyway as an unrestricted broadcast.

By default the system bus is set to "untrusted" and the user bus is
"trusted" since per-method access control on the latter is unnecessary.

On dbus1 busses we check the UID of the caller rather than the
configured capability since the capability cannot be determined without
race. On kdbus the capability is checked if possible from the attached
meta-data of a message and otherwise queried from the sending peer.

This also decorates the vtables of the various daemons we ship with
these flags.
2013-12-10 16:52:49 +00:00
..
.gitignore login: properly detect MIMO USB displays 2012-05-31 01:20:37 +02:00
70-power-switch.rules login: Use the GOTO properly in udev rule 2012-05-30 18:34:28 +02:00
70-uaccess.rules uaccess: Add new DRM render nodes 2013-11-12 18:11:43 +01:00
71-seat.rules.in Move udevadm to rootbindir 2013-03-11 07:18:33 +01:00
73-seat-late.rules.in relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
inhibit.c bus: introduce concept of a default bus for each thread and make use of it everywhere 2013-11-12 00:12:43 +01:00
libsystemd-login.pc.in relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
libsystemd-login.sym sd-login: add a public accessor for the VT number 2013-09-11 19:08:20 +02:00
login-shared.c login: fix login_is_valid test 2013-09-16 11:10:55 -05:00
login-shared.h login: fix login_is_valid test 2013-09-16 11:10:55 -05:00
loginctl.c Help output spring cleaning 2013-12-08 19:26:51 -05:00
logind-acl.c logind: port logind to libsystemd-bus 2013-11-05 01:13:05 +01:00
logind-acl.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
logind-action.c logind: log which process is delaying suspend and not closing locks 2013-11-27 02:39:19 +01:00
logind-action.h conf-parser: distinguish between multiple sections with the same name 2013-11-25 19:35:44 +01:00
logind-button.c button: don't exit if we cannot handle a button press 2013-11-10 23:05:32 +01:00
logind-button.h use #pragma once instead of foo*foo define guards 2013-11-18 20:28:54 -05:00
logind-core.c logind: make VT numbers unsigned 2013-11-28 17:38:16 +01:00
logind-dbus.c bus: introduce "trusted" bus concept and encode access control in object vtables 2013-12-10 16:52:49 +00:00
logind-device.c Remove dead code and unexport some calls 2013-11-08 18:12:45 +01:00
logind-device.h Remove dead code and unexport some calls 2013-11-08 18:12:45 +01:00
logind-gperf.gperf logind: port over to use scopes+slices for all cgroup stuff 2013-07-02 01:48:55 +02:00
logind-inhibit.c Get rid of our reimplementation of basename 2013-12-06 21:29:55 -05:00
logind-inhibit.h logind: log which process is delaying suspend and not closing locks 2013-11-27 02:39:19 +01:00
logind-seat-dbus.c bus: introduce "trusted" bus concept and encode access control in object vtables 2013-12-10 16:52:49 +00:00
logind-seat.c Get rid of our reimplementation of basename 2013-12-06 21:29:55 -05:00
logind-seat.h logind: make VT numbers unsigned 2013-11-28 17:38:16 +01:00
logind-session-dbus.c bus: introduce "trusted" bus concept and encode access control in object vtables 2013-12-10 16:52:49 +00:00
logind-session-device.c logind: ignore failing close() on session-devices 2013-11-28 15:16:49 +01:00
logind-session-device.h logind: remove fbdev session-device support 2013-10-01 18:08:54 +02:00
logind-session.c Get rid of our reimplementation of basename 2013-12-06 21:29:55 -05:00
logind-session.h logind: remove unused session->closing field 2013-11-28 17:41:44 +01:00
logind-user-dbus.c bus: introduce "trusted" bus concept and encode access control in object vtables 2013-12-10 16:52:49 +00:00
logind-user.c logind: expose linger state on User object 2013-11-05 01:27:27 +01:00
logind-user.h bus: also add error parameter to object find and enumerator callbacks 2013-11-22 01:42:15 +01:00
logind.c bus: make sd_bus_request_name() and sd_bus_release_name() behave more like other calls 2013-12-03 18:02:46 +01:00
logind.conf logind: port over to use scopes+slices for all cgroup stuff 2013-07-02 01:48:55 +02:00
logind.h logind: make VT numbers unsigned 2013-11-28 17:38:16 +01:00
Makefile logind: move logind into its own subdirectory 2011-12-31 03:16:08 +01:00
multi-seat-x.c multi-seat-x: drop a lot of unnecessary code 2012-09-21 17:03:40 +02:00
org.freedesktop.login1.conf bus: introduce "trusted" bus concept and encode access control in object vtables 2013-12-10 16:52:49 +00:00
org.freedesktop.login1.policy.in logind: if a user is sitting in front of the computer and can shutdown the machine anyway he should also be able to reboot it 2013-09-26 20:31:37 +02:00
org.freedesktop.login1.service relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
pam-module.c logind: make VT numbers unsigned 2013-11-28 17:38:16 +01:00
sd-login.c Use assert_return in more of the public API 2013-12-02 23:13:58 +01:00
sysfs-show.c sysfs-show.c: return negative error 2013-11-30 21:59:40 +01:00
systemd-user Add pam configuration to allow user sessions to work out of the box 2013-09-11 15:35:06 -04:00
test-inhibit.c login: port test-inhibit to libsystemd-bus 2013-11-05 21:34:42 +01:00
test-login-shared.c Add more tests and fix capability logging 2013-09-19 16:22:59 -05:00
test-login-tables.c tests: add tests for string lookup tables 2013-07-05 01:36:16 -04:00
test-login.c Make test-login and test-sleep output debugging 2013-09-17 16:44:38 -04:00
user-sessions.c user-sessions: modernizations 2013-11-05 01:13:05 +01:00