Prep v231.6: Allow elogind to be daemonized using -D/--daemon option
Prep v234.3: Set defaults for the sleep config *after* loading the config file.
Prep v234: Eventually fix the cgroup stuff. elogind is not init.
Prep v234: Apply missing upstream fixes in src/login (3/6)
tree-wide: fix wrong indent (#5757) Fixes wrong indent introduced by the commit 43688c49d1fdb585196d94e2e30bb29755fa591b.
logind: save/restore session devices and their respective file descriptors This patch ensures that session devices are saved for each session. In order to make the revokation logic work when logind is restarted, the session devices are now saved in the session state files and their respective file descriptors sent to PID1's fdstore in order to keep them open accross restart. This is mandatory in order to keep the revokation logic working. Indeed in case of input-devices, the same file descriptors must be shared by logind and a given session controller in order EVIOCREVOKE to work otherwise multiple sessions can have device access in parallel. This should be the only remaining and missing piece for making logind fully restartable. Fixes: #1163
Rename formats-util.h to format-util.h We don't have plural in the name of any other -util files and this inconsistency trips me up every time I try to type this file name from memory. "formats-util" is even hard to pronounce.
Prep v232: Apply missing updates from upstream
logind: don't hit assert when we try to free NULL manager object Fixes: #4431
Prep v231.2: Make sure logs go to syslog or kmsg if elogind was started in debug mode, even if it was started from a tty.
Prep v231.2: Apply some minor style fixes
logind: don't hit assert when we try to free NULL manager object Fixes: #4431 (cherry picked from commit 84a4e6608dbda38c724ab196a226db209a50b224)
Prep v231: Move elogind specific code in login/logind.c to login/elogind.c
logind: change TasksMax= value for user logins to 33% Let's change from a fixed value of 12288 tasks per user to a relative value of 33%, which with the kernel's default of 32768 translates to 10813. This is a slight decrease of the limit, for no other reason than "33%" sounding like a nice round number that is close enough to 12288 (which would translate to 37.5%). (Well, it also has the nice effect of still leaving a bit of room in the PID space if there are 3 cooperating evil users that try to consume all PIDs... Also, I like my bikesheds blue). Since the new value is taken relative, and machined's TasksMax= setting defaults to 16384, 33% inside of containers is usually equivalent to 5406, which should still be ample space. To summarize: | on the host | in the container old default | 12288 | 12288 new default | 10813 | 5406
util: introduce physical_memory_scale() to unify how we scale by physical memory The various bits of code did the scaling all different, let's unify this, given that the code is not trivial.
Prep v230: src/logind.c: Do not call manager_free(m) if an error lead to m still being NULL.
Prep v230: Apply missing upstream fixes and updates (6/8) src/login.
logind: process session/inhibitor fds at higher priority Let's make sure we process session and inhibitor pipe fds (that signal sessions/inhibtors going away) at a higher priority than new bus calls that might create new sessions or inhibitors. This helps ensuring that the number of open sessions stays minimal.
selinux: always try to load the full selinux db https://github.com/elogind/elogind/pull/2508#issuecomment-190901170 Maybe fixes https://bugzilla.redhat.com/show_bug.cgi?id=1308771.
Prep v229: elogind should honor its Sleep configuration.