summaryrefslogtreecommitdiff
path: root/src/login
AgeCommit message (Collapse)Author
2015-08-23logind.c cleanupAndy Wingo
* src/login/logind.c: Remove unused vcsa dispatch function. Add mkdir_label header. Don't mkdir /run/systemd; we require that it be mounted over ramfs or tmpfs.
2015-08-23Remove systemd subscription and user/session unitsAndy Wingo
This removes attempts by logind to listen to systemd messages over the bus, and to start and/or manage units associated with sessions and users.
2015-08-23Remove support for auto-spawning VTsAndy Wingo
Auto-spawning VTs requires systemd in practice. If you're using systemd you can just use its logind :)
2015-08-20Actually working with pamelogind/v219.5Andy Wingo
* src/login/logind-user.c (user_start): Don't start slices and systemd-user services. * src/login/logind-dbus.c (method_create_session): Send a reply directly instead of waiting on systemd that isn't there. * configure.ac: Bump version.
2015-08-20Don't try to set up cgroups for new userselogind/v219.4Andy Wingo
* src/login/logind-session.c (session_start): Punt on setting up a scope.
2015-08-20Create /run/systemd as neededelogind/v219.3Andy Wingo
* src/login/logind.c (main): Also create /run/systemd at startup. * configure.ac: Bump to 219.3.
2015-08-19Play better with non-FHS distroselogind/v219.2Andy Wingo
* Makefile.am: Remove rootprefix, rootbindir, and rootlibexecdir. udevrulesdir is substed from configure.ac. Adapt distcheck. * autogen.sh: Make more normal. * configure.ac: Add --with-udevrulesdir. Remove --with-rootprefix. Detect bin dir for udev.
2015-08-18Fix logind startupAndy Wingo
* src/login/logind.c (manager_connect_bus): Warn instead of error if we can't subscribe to updates from systemd. Perhaps we should remove this entirely.
2015-08-15Rename systemd-logind to logind.Ricardo Wurmus
2015-08-15Rename PAM configuration file.Ricardo Wurmus
2015-04-08pam_elogind compilingAndy Wingo
2015-04-08Compiling.Andy Wingo
2015-03-15logind: check return value of session_releaseZbigniew Jędrzejewski-Szmek
It allocates memory, so it can fail. CID #1237527.
2015-03-13logind: explicitly ignore errors we can do nothing aboutZbigniew Jędrzejewski-Szmek
CID #1237545.
2015-03-13tree-wide: there is no ENOTSUP on linuxDavid Herrmann
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
2015-03-07login: fix copy-pasto in error pathZbigniew Jędrzejewski-Szmek
CID #1256583.
2015-03-06login: make hold-off timeout configurableDavid Herrmann
This introduces 'HoldoffTimeoutSec' to logind.conf to make IGNORE_LID_SWITCH_{SUSPEND,STARTUP}_USEC configurable. Background: If an external monitor is connected, or if the system is docked, we want to ignore LID events. This is required to support setups where a laptop is used with external peripherals while the LID is closed. However, this requires us to probe all hot-plugged devices before reacting to LID events. But with modern buses like USB, the standards do not impose any timeout on the slots, so we have no chance to know whether a given slot is used or not. Hence, after resume and startup, we have to wait a fixed timeout to give the kernel a chance to probe devices. Our timeout has always been generous enough to support even the slowest devices. However, a lot of people didn't use these features and wanted to disable the hold-off timer. Now we provide a knob to do that.
2015-03-03Do not advertise .d snippets over main config fileZbigniew Jędrzejewski-Szmek
For daemons which have a main configuration file, there's little reason for the administrator to use configuration snippets. They are useful for packagers which need to override settings, but we shouldn't advertise that as the main way of configuring those services. https://bugs.freedesktop.org/show_bug.cgi?id=89397
2015-02-27user-sessions: move into own subdir and build independently of logindIvan Shapovalov
Suggested by Zbyszek on IRC. [zj: /run/nologin is used with PAM. systemd-user-session is independent of logind.]
2015-02-24po: simplify one sentenceZbigniew Jędrzejewski-Szmek
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-02-21logind: fix a typo in a polkit descriptionPiotr Drąg
2015-02-18logind: open up most bus calls for unpriviliged processes, using PolicyKitLennart Poettering
Also, allow clients to alter their own objects without any further priviliges. i.e. this allows clients to kill and lock their own sessions without involving PK.
2015-02-10logind: tell Coverity that we knowingly ignore mkdir()'s return valueLennart Poettering
2015-02-03util: rework strappenda(), and rename it strjoina()Lennart Poettering
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
2015-02-02remove unused variablesThomas Hindoe Paaboel Andersen
2015-01-28logind: handle closing sessions over daemon restartsMartin Pitt
It may happen that you have several sessions with the same VT: - Open a session c1 which leaves some processes around, and log out. The session will stay in State=closing and become Active=no. - Log back in on the same VT, get a new session "c2" which is State=active and Active=yes. When restarting logind after that, the first session that matches the current VT becomes Active=yes, which will be c1; c2 thus is Active=no and does not get the usual polkit/device ACL privileges. Restore the "closing" state in session_load(), to avoid treating all restored sessions as State=active. In seat_active_vt_changed(), prefer active sessions over closing ones if more than one session matches the current VT. Finally, fix the confusing comment in session_load() and explain it a bit better. https://launchpad.net/bugs/1415104
2015-01-27logind: chown+chmod /run/user/$UID if mount(tmpfs) fails with EPERMChristian Seiler
In containers without CAP_SYS_ADMIN, it is not possible to mount tmpfs (or any filesystem for that matter) on top of /run/user/$UID. Previously, logind just failed in such a situation. Now, logind will resort to chown+chmod of the directory instead. This allows logind still to work in those environments, although without the guarantees it provides (i.e. users not being able to DOS /run or other users' /run/user/$UID space) when CAP_SYS_ADMIN is available.
2015-01-27logind: remove per-user runtime dir again if setup failsChristian Seiler
If setup of per-user runtime dir fails, clean up afterwards by removing the directory before returning from the function, so we don't leave the directory behind. If this is not done, the second time the user logs in logind would assume that the directory is already set up, even though it isn't.
2015-01-22logind: fix sd_eviocrevoke ioctl callPeter Hutterer
If the third argument is non-null, the kernel will always error out with EINVAL and devices won't get revoked. Reported-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-22tmpfiles: add 'a' type to set ACLsZbigniew Jędrzejewski-Szmek
2015-01-22Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad.
2015-01-18bus: use EUID over UID and fix unix-credsDavid Herrmann
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-18logind: hide 'self' links if not availableDavid Herrmann
If the caller does not run in a session/seat or has no tracked user, hide the /org/freedesktop/login1/.../self links in introspection data. Otherwise, "busctl tree org.freedesktop.login1" tries to query those nodes even though it cant.
2015-01-14loginctl: fix misuse compound literalsLennart Poettering
The lifetime of compound literals is bound to the local scope, we hence cannot refernce them outside of it.
2015-01-09loginctl: make session/user arguments optional for a number commands, and ↵Lennart Poettering
imply calling session/user instead This turns "lock-session", "activate", "unlock-session", "enable-linger", "disable-linger" into commands that take no argument, optionally in which case the callers session/user is implied.
2015-01-09logind: unify how we cast between uid_t and pointers for hashmap keysLennart Poettering
2015-01-09logind: when a bus call is done on a session, user or seat, optionally ↵Lennart Poettering
determine them from the caller credentials More specifically, if an operation is requested on a session with an empty name, the caller's session is used. If an operation is requested on a seat with an empty name, the seat of the caller's session is used. Finally, if an operation on the user with UID -1 is requested, the user of the client's session is used (and not the UID of the client!).
2015-01-09logind: include "self" object links in dbus introspectionLennart Poettering
Makes "busctl introspect" a lot more fun.
2015-01-09loginctl: make "loginctl session-status" without session ID show the ↵Lennart Poettering
caller's session status Similar for user-status and seat-status.
2015-01-08loginctl: port to generic verbs.h APILennart Poettering
2015-01-08systemctl,loginctl: start polkit agent for all polkit enabled operationsLennart Poettering
2015-01-08loginctl: show the 10 most recent log user/session log lines in "loginctl ↵Lennart Poettering
user-status" and "loginctl session-status"
2015-01-01Remove "to allow" from policy messagesZbigniew Jędrzejewski-Szmek
It carries no additional information and forces a passive sentence structure which is longer and harder to parse.
2014-12-29machined: ignore spurious errorLennart Poettering
2014-12-28tmpfiles: add new line type 'v' for creating btrfs subvolumesLennart Poettering
2014-12-26loginctl: reindent --help textLennart Poettering
2014-12-26loginctl: add more --help sectionsLennart Poettering
2014-12-25pam_systemd: remove spurious include of <sys/capability.h>Filipe Brandenburger
It does not use any functions or constants from libcap directly. Tested that "pam_systemd.la" builds cleanly and works after this change.
2014-12-25logind: remove spurious include of <sys/capability.h>Filipe Brandenburger
They do not use any functions from libcap directly. The CAP_* constants in use through these files come from "missing.h" which will import <linux/capability.h> and complement it with CAP_* constants not defined by the current kernel headers. The "missing.h" header is imported through "util.h" which gets imported in "logind.h". Tested that "systemd-logind" builds cleanly and works after this change.