Systemd/src/login
David Herrmann 05bae4a60c bus: use EUID over UID and fix unix-creds
Whenever a process performs an action on an object, the kernel uses the
EUID of the process to do permission checks and to apply on any newly
created objects. The UID of a process is only used if someone *ELSE* acts
on the process. That is, the UID of a process defines who owns the
process, the EUID defines what privileges are used by this process when
performing an action.

Process limits, on the other hand, are always applied to the real UID, not
the effective UID. This is, because a process has a user object linked,
which always corresponds to its UID. A process never has a user object
linked for its EUID. Thus, accounting (and limits) is always done on the
real UID.

This commit fixes all sd-bus users to use the EUID when performing
privilege checks and alike. Furthermore, it fixes unix-creds to be parsed
as EUID, not UID (as the kernel always takes the EUID on UDS). Anyone
using UID (eg., to do user-accounting) has to fall back to the EUID as UDS
does not transmit the UID.
2015-01-18 13:55:55 +01:00
..
.gitignore build-sys: create "compatibility libraries" section 2014-01-25 18:10:08 -05:00
70-power-switch.rules logind: add support for TPS65217 Power Button 2014-09-27 19:29:45 -04:00
70-uaccess.rules rules: uaccess - add ID_SOFTWARE_RADIO 2014-07-15 17:35:53 +02: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 delta: diff returns 1 when files differ, ignore this 2014-11-29 11:10:51 -05:00
loginctl.c loginctl: fix misuse compound literals 2015-01-14 23:18:33 +01:00
logind-acl.c hashmap: introduce hash_ops to make struct Hashmap smaller 2014-09-15 16:08:50 +02: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: add HandleLidSwitchDocked= option to logind.conf + documentation 2014-08-26 22:08:02 +02: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 treewide: another round of simplifications 2014-11-28 19:57:32 +01:00
logind-button.h logind: detect whether the system is docked, and if it is inhibit lid switch processing 2014-02-24 16:22:23 +01:00
logind-core.c logind: unify how we cast between uid_t and pointers for hashmap keys 2015-01-09 18:35:36 +01:00
logind-dbus.c bus: use EUID over UID and fix unix-creds 2015-01-18 13:55:55 +01: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: add HandleLidSwitchDocked= option to logind.conf + documentation 2014-08-26 22:08:02 +02:00
logind-inhibit.c treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01: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 logind: hide 'self' links if not available 2015-01-18 12:59:39 +01:00
logind-seat.c treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
logind-seat.h logind: always kill session when termination is requested 2014-02-11 19:14:47 -05:00
logind-session-dbus.c bus: use EUID over UID and fix unix-creds 2015-01-18 13:55:55 +01:00
logind-session-device.c api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
logind-session-device.h logind: remove fbdev session-device support 2013-10-01 18:08:54 +02:00
logind-session.c logind: unify how we cast between uid_t and pointers for hashmap keys 2015-01-09 18:35:36 +01:00
logind-session.h login: pause devices before acknowledging VT switches 2014-09-19 13:26:39 +02:00
logind-user-dbus.c logind: hide 'self' links if not available 2015-01-18 12:59:39 +01:00
logind-user.c logind: unify how we cast between uid_t and pointers for hashmap keys 2015-01-09 18:35:36 +01:00
logind-user.h logind: fix Display property of user objects 2014-05-19 09:03:20 +09:00
logind.c treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
logind.conf logind: Support logind.conf.d directories in the usual search paths 2014-11-26 19:11:37 -05:00
logind.h logind: when a bus call is done on a session, user or seat, optionally determine them from the caller credentials 2015-01-09 18:35:36 +01:00
Makefile logind: move logind into its own subdirectory 2011-12-31 03:16:08 +01:00
org.freedesktop.login1.conf login: Allow calling org.freedesktop.login1.Seat.SwitchTo 2014-02-25 13:14:55 +01:00
org.freedesktop.login1.policy.in Remove "to allow" from policy messages 2015-01-01 09:45:04 -05:00
org.freedesktop.login1.service relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
pam_systemd.c pam_systemd: remove spurious include of <sys/capability.h> 2014-12-25 10:57:29 -05:00
pam_systemd.sym pam_systemd: replace regex with sym file 2014-06-21 15:45:49 +02:00
sysfs-show.c use new name DRAW_TREE_VERTICAL 2014-04-23 19:22:39 +02:00
sysfs-show.h build-sys: move core/build.h → shared/build.h 2014-12-23 21:05:28 +01:00
systemd-user login: update systemd-user PAM configuration file 2014-07-29 13:20:20 +02:00
test-inhibit.c tests: use assert_se instead of assert 2014-11-30 02:35:52 +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
user-sessions.c treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00