summaryrefslogtreecommitdiff
path: root/src/login/logind-user.h
Commit message (Collapse)AuthorAge
* Use a dash-truncated drop-in for user-%j.slice configurationZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | | | | | | | | | | This removes the UserTasksMax= setting in logind.conf. Instead, the generic TasksMax= setting on the slice should be used. Instead of a transient unit we use a drop-in to tweak the default definition of a .slice. It's better to use the normal unit mechanisms instead of creating units on the fly. This will also make it easier to start user@.service independently of logind, or set additional settings like MemoryMax= for user slices. The setting in logind is removed, because otherwise we would have two sources of "truth": the slice on disk and the logind config. Instead of trying to coordinate those two sources of configuration (and maintainer overrides to both), let's just convert to the new one fully. Right now now automatic transition mechanism is provided. logind will emit a hint when it encounters the setting, but otherwise it will be ignored. Fixes #2556.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* logind: change check_gc to may_gc everywhereZbigniew Jędrzejewski-Szmek2018-05-30
|
* Prep v236 : Add missing SPDX-License-Identifier (5/9) src/loginSven Eden2018-03-26
|
* Prep v230: Apply missing upstream fixes and updates (6/8) src/login.Sven Eden2017-06-16
|
* tree-wide: remove Emacs lines from all filesDaniel Mack2017-05-17
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* Prep v228: Condense elogind source masks (5/5)Sven Eden2017-04-26
|
* Prep v228: Add remaining updates from upstream (3/3)Sven Eden2017-04-26
| | | | | Apply remaining fixes and the performed move of utility functions into their own foo-util.[hc] files on the rest of elogind.
* Remove dependency of systemd units, services and slices for new sessions.Sven Eden2017-03-14
| | | | | | | | | | | | | | | | | | | | * elogind does not support systemd services and units. But at least the units are needed to support the systemd cgroup slice/scope system. * Remove systemd subscription to scope, service and slice jobs. These can not be supported in any way, as they depend on systemd running the machine. * The functions session_start_scope(), user_start_service() and user_start_slice() no longer try to call systemd via dbus for assistance. This way they generate their proper scope, service and slice names, and store them in the Managers HashMaps for session and user units. This should enable us to reverse track pids to users and such stuff, as that is what systemd-logind does, not knowing whether any unit *really* has been started or not. However, this will not work out of the box until we find a way to integrate cg_create_everywhere() into elogind without becoming dependent of systemd unit, service and job knowledge again.
* Prep v220: Use new cgroups functionsSven Eden2017-03-14
| | | | | Prep v220: Update logind and loginctl to upstream version. Prep v220: src/shared/rm-rf.c does not need to be able to handle btrfs subvolumes for elogind.
* sd-bus: drop bus parameter from message callback prototypeLennart Poettering2017-03-14
| | | | | | This should simplify the prototype a bit. The bus parameter is redundant in most cases, and in the few where it matters it can be derived from the message via sd_bus_message_get_bus().
* Remove systemd subscription and user/session unitsAndy Wingo2015-08-23
| | | | | | 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.
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | 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.
* logind: open up most bus calls for unpriviliged processes, using PolicyKitLennart Poettering2015-02-18
| | | | | | 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.
* logind: fix Display property of user objectsLennart Poettering2014-05-19
| | | | | | | | When we dropped support for creating a per-user to the "main" X11 display we stopped returning useful data in the "Display" user property. With this change this is fixed and we again expose an appropriate (graphical session) in the property that is useful as the "main" one, if one is needed.
* logind: always kill session when termination is requestedZbigniew Jędrzejewski-Szmek2014-02-11
| | | | | KillUserProcesses=yes/no should be ignored when termination is explicitly requested.
* logind: rework session shutdown logicLennart Poettering2014-02-07
| | | | | | | | | | | | | | | | | | | | | | | | Simplify the shutdown logic a bit: - Keep the session FIFO around in the PAM module, even after the session shutdown hook has been finished. This allows logind to track precisely when the PAM handler goes away. - In the ReleaseSession() call start a timer, that will stop terminate the session when elapsed. - Never fiddle with the KillMode of scopes to configure whether user processes should be killed or not. Instead, simply leave the scope units around when we terminate a session whose processes should not be killed. - When killing is enabled, stop the session scope on FIFO EOF or after the ReleaseSession() timeout. When killing is disabled, simply tell PID 1 to abandon the scope. Because the scopes stay around and hence all processes are always member of a scope, the system shutdown logic should be more robust, as the scopes can be shutdown as part of the usual shutdown logic.
* logind: remove dead variableZbigniew Jędrzejewski-Szmek2013-12-21
| | | | Noticed-by: Jan Alexander Steffens <jan.steffens@gmail.com>
* bus: also add error parameter to object find and enumerator callbacksLennart Poettering2013-11-22
| | | | | Just in order to bring things inline with the method and property callbacks.
* logind: expose linger state on User objectLennart Poettering2013-11-05
|
* logind: port logind to libsystemd-busLennart Poettering2013-11-05
|
* logind: restore logic to kill user processes when session endsLennart Poettering2013-08-13
|
* logind: port over to use scopes+slices for all cgroup stuffLennart Poettering2013-07-02
| | | | | | | | | In order to prepare things for the single-writer cgroup scheme, let's make logind use systemd's own primitives for cgroup management. Every login user now gets his own private slice unit, in which his sessions live in a scope unit each. Also, add user@$UID.service to the same slice, and implicitly start it on first login.
* logind: add infrastructure to keep track of machines, and move to slicesLennart Poettering2013-06-20
| | | | | | | | | | | | | | | | | | | | - This changes all logind cgroup objects to use slice objects rather than fixed croup locations. - logind can now collect minimal information about running VMs/containers. As fixed cgroup locations can no longer be used we need an entity that keeps track of machine cgroups in whatever slice they might be located. Since logind already keeps track of users, sessions and seats this is a trivial addition. - nspawn will now register with logind and pass various bits of metadata along. A new option "--slice=" has been added to place the container in a specific slice. - loginctl gained commands to list, introspect and terminate machines. - user.slice and machine.slice will now be pulled in by logind.service, since only logind.service requires this slice.
* Add __attribute__((const, pure, format)) in various placesZbigniew Jędrzejewski-Szmek2013-05-02
| | | | | | | | I'm assuming that it's fine if a _const_ or _pure_ function calls assert. It is assumed that the assert won't trigger, and even if it does, it can only trigger on the first call with a given set of parameters, and we don't care if the compiler moves the order of calls.
* use #pragma once instead of foo*foo #define guardsShawn Landden2012-07-19
| | | | | | | | | | | | | | | | | #pragma once has been "un-deprecated" in gcc since 3.3, and is widely supported in other compilers. I've been using and maintaining (rebasing) this patch for a while now, as it annoyed me to see #ifndef fooblahfoo, etc all over the place, almost arrogant about the annoyance of having to define all these names to perform a commen but neccicary functionality, when a completely superior alternative exists. I havn't sent it till now, cause its kindof a style change, and it is bad voodoo to mess with style that has been established by more established editors. So feel free to lambast me as a crazy bafoon. v2 - preserve externally used headers
* logind: introduce a state for session, being one of online, active, closingLennart Poettering2012-06-21
| | | | | | | | | | online = logged in active = logged in and session is in the fg closing = nominally logged out but some left-over processes still around Related to: https://bugzilla.gnome.org/show_bug.cgi?id=677556
* logind: add new user state 'closing'Lennart Poettering2012-05-31
|
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-12
| | | | | | | | | | | | | | We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
* logind: move logind into its own subdirectoryLennart Poettering2011-12-31