modular session management daemon

Add user lingering support #27

Merged r0chd.pl
targeting master
Merged opened by and assigned to r0chd.pl
targeting master

Add user lingering support

Implements lingering: enabling it for a user keeps their /run/user/ runtime dir and cgroup alive independent of any active session.

  • SetLingering request + Lingering event on session_core_user, persisted per-uid in /var/lib/sessiond.
  • Session cgroups nest under a per-user user- cgroup.
  • Runtime dir and user cgroup are only reclaimed on last-session-exit if the user isn't lingering; toggling lingering for an offline user creates/reclaims them directly.
  • Daemon startup rehydrates lingering state from /var/lib/sessiond and recreates the runtime dir/cgroup per uid, since /run and /sys/fs/cgroup don't survive a reboot.

Also adds the sessionctl user list / user linger on|off commands, covering some items from #2.

This pull request has no versions submitted yet.