HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

TODO.md

158,479 bytesGit mode 100644Download original fileLGPL-2.1-or-later

Git blob: 10c59d0b424af14ef5cbfde9e99aa680c9466f25

Lines 1001–2000 of 3,058

 
- Find a solution for SMACK capabilities stuff:
  https://lists.freedesktop.org/archives/systemd-devel/2014-December/026188.html
 
- fix bug around run0 background color on ls in fresh terminal
 
- Fix DECIMAL_STR_MAX or DECIMAL_STR_WIDTH. One includes a trailing NUL, the
  other doesn't. What a disaster. Probably to exclude it.
 
- fix homed/homectl confusion around terminology, i.e. "home directory"
  vs. "home" vs. "home area". Stick to one term for the concept, and it
  probably shouldn't contain "area".
 
- fix our various hwdb lookup keys to end with ":" again. The original idea was
  that hwdb patterns can match arbitrary fields with expressions like
  "*:foobar:*", to wildcard match both the start and the end of the string.
  This only works safely for later extensions of the string if the strings
  always end in a colon. This requires updating our udev rules, as well as
  checking if the various hwdb files are fine with that.
 
- flush_accept() should look at sockdiag queued sockets count and exit once we
  flushed out the specified number of connections.
 
- flush_fd() should probably try to be smart and stop reading once we know that
  all further queued data was enqueued after flush_fd() was originally
  called. For that, try SIOCINQ if fd refers to stream socket, and look at
  timestamps for datagram sockets.
 
- for better compat with major clouds: implement simple PTP device support in
  timesyncd
 
- for better compat with major clouds: introduce imds mini client service that
  sets up primary netif in a private netns (ipvlan?) to query imds without
  affecting rest of the host. pick up literal credentials from there plus the
  fields the hwdb reports for the other fields and turn them into credentials.
  then write generator that used detected virtualization info and plugs this
  service into the early boot, waiting for the DMI and network device to show
  up.
 
- for better compat with major clouds: recognize clouds via hwdb on DMI device,
  and add udev properties to it that help with handling IMDS, i.e. entrypoint
  URL, which fields to find ip hostname, ssh key, …
 
- For timer units: add some mechanisms so that timer units that trigger immediately on boot do not have the services
  they run added to the initial transaction and thus confuse Type=idle.
 
- **for vendor-built signed initrds:**
  - kernel-install should be able to install encrypted creds automatically for
    machine id, root pw, rootfs uuid, resume partition uuid, and place next to
    EFI kernel, for sd-stub to pick them up. These creds should be locked to
    the TPM, and bind to the right PCR the kernel is measured to.
  - kernel-install should be able to pick up initrd sysexts automatically and
    place them next to EFI kernel, for sd-stub to pick them up.
  - systemd-fstab-generator should look for rootfs device to mount in creds
  - systemd-resume-generator should look for resume partition uuid in creds
 
- **foreign uid:**
  - add support to export-fs, import-fs
  - systemd-dissect should learn mappings, too, when doing mtree and such
 
- fstab-generator: default to tmpfs-as-root if only usr= is specified on the kernel cmdline
 
- generator that automatically discovers btrfs subvolumes, identifies their purpose based on some xattr on them.
 
- generic interface for varlink for setting log level and stuff that all our daemons can implement
 
- get rid of compat with libbpf.so.0 (retainly only for libbpf.so.1)
 
- Get rid of the symlinks in /run/systemd/units/* and exclusively use cgroupfs
  xattrs to convey info about invocation ids, logging settings and so on.
  support for cgroupfs xattrs in the "trusted." namespace was added in linux
  3.7, i.e. which we don't pretend to support anymore.
 
- go through all --help texts in our codebases, and make sure:
  1. the one sentence description of the tool is highlighted via ANSI how we
     usually do it
  2. If more than one or two commands are supported (as opposed to switches),
     separate commands + switches from each other, using underlined --help sections.
  3. If there are many switches, consider adding additional --help sections.
 
- go through all uses of table_new() in our codebase, and make sure we support
  all three of:
  1. --no-legend properly
  2. --json= properly
  3. --no-pager properly
 
- go through our codebase, and convert "vertical tables" (i.e. things such as
  "systemctl status") to use table_new_vertical() for output
 
- **gpt-auto-generator:**
  - Make /home automount rather than mount?
 
- have a signal that reloads every unit that supports reloading
 
- hibernate/s2h: if swap is on weird storage and refuse if so
 
- homed/pam_systemd: allow authentication by ssh-agent, so that run0/polkit can
  be allowed if caller comes with the right ssh-agent keys.
 
- homed/userdb: maybe define a "companion" dir for home directories where apps
  can safely put privileged stuff in. Would not be writable by the user, but
  still conceptually belong to the user. Would be included in user's quota if
  possible, even if files are not owned by UID of user. Use case: container
  images that owned by arbitrary UIDs, and are owned/managed by the users, but
  are not directly belonging to the user's UID. Goal: we shouldn't place more
  privileged dirs inside of unprivileged dirs, and thus containers really
  should not be placed inside of traditional UNIX home dirs (which are owned by
  users themselves) but somewhere else, that is separate, but still close
  by. Inform user code about path to this companion dir via env var, so that
  container managers find it. the ~/.identity file is also a candidate for a
  file to move there, since it is managed by privileged code (i.e. homed) and
  not unprivileged code.
 
- **homed:**
  - when user tries to log into record signed by unrecognized key, automatically add key to our chain after polkit auth
  - rollback when resize fails mid-operation
  - GNOME's side for forget key on suspend (requires rework so that lock screen runs outside of uid)
  - update LUKS password on login if we find there's a password that unlocks the JSON record but not the LUKS device.
  - create on activate?
  - properties: icon url?, administrator bool (which translates to 'wheel' membership)?, address?, telephone?, vcard?, samba stuff?, parental controls?
  - communicate clearly when usb stick is safe to remove. probably involves
    beefing up logind to make pam session close hook synchronous and wait until
    systemd --user is shut down.
  - logind: maybe keep a "busy fd" as long as there's a non-released session around or the user@.service
  - maybe make automatic, read-only, time-based reflink-copies of LUKS disk
    images (and btrfs snapshots of subvolumes) (think: time machine)
  - distinguish destroy / remove (i.e. currently we can unregister a user, unregister+remove their home directory, but not just remove their home directory)
  - fingerprint authentication, pattern authentication, …
  - make sure "classic" user records can also be managed by homed
  - make size of $XDG_RUNTIME_DIR configurable in user record
  - move acct mgmt stuff from pam_systemd_home to pam_systemd?
  - when "homectl --pkcs11-token-uri=" is used, synthesize ssh-authorized-keys records for all keys we have private keys on the stick for
  - make slice for users configurable (requires logind rework)
  - logind: populate auto-login list bus property from PKCS#11 token
  - when determining state of a LUKS home directory, check DM suspended sysfs file
  - when homed is in use, maybe start the user session manager in a mount namespace with MS_SLAVE,
    so that mounts propagate down but not up - eg, user A setting up a backup volume
    doesn't mean user B sees it
  - use credentials logic/TPM2 logic to store homed signing key
  - permit multiple user record signing keys to be used locally, and pick
    the right one for signing records automatically depending on a pre-existing
    signature
  - add a way to "take possession" of a home directory, i.e. strip foreign signatures
    and insert a local signature instead.
  - as an extension to the directory+subvolume backend: if located on
    especially marked fs, then sync down password into LUKS header of that fs,
    and always verify passwords against it too. Bootstrapping is a problem
    though: if no one is logged in (or no other user even exists yet), how do you
    unlock the volume in order to create the first user and add the first pw.
  - support new FS_IOC_ADD_ENCRYPTION_KEY ioctl for setting up fscrypt
  - maybe pre-create ~/.cache as subvol so that it can have separate quota
    easily?
  - store PKCS#11 + FIDO2 token info in LUKS2 header, compatible with
    systemd-cryptsetup, so that it can unlock homed volumes
  - maybe make all *.home files owned by `systemd-home` user or so, so that we
    can easily set overall quota for all users
  - on login, if we can't fallocate initially, but rebalance is on, then allow
    login in discard mode, then immediately rebalance, then turn off discard
  - add "homectl unbind" command to remove local user record of an inactive
    home dir
  - use systemd-storagetm to expose home dirs via nvme-tcp. Then,
    teach homed/pam_systemd_homed with a user name such as
    lennart%nvme_tcp_192.168.100.77_8787 to log in from any linux host with the
    same home dir. Similar maybe for nbd, iscsi? this should then first ask for
    the local root pw, to authenticate that logging in like this is ok, and would
    then be followed by another password prompt asking for the user's own
    password. Also, do something similar for CIFS: if you log in via
    lennart%cifs-someserver_someshare, then set up the homed dir for it
    automatically. The PAM module should update the user name used for login to
    the short version once it set up the user. Some care should be taken, so that
    the long version can be still be resolved via NSS afterwards, to deal with
    PAM clients that do not support PAM sessions where PAM_USER changes half-way.
  - add a basic form of secrets management to homed, that stores
    secrets in $HOME somewhere, is protected by the accounts own authentication
    mechanisms. Should implement something PKCS#11-like that can be used to
    implement emulated FIDO2 in unpriv userspace on top (which should happen
    outside of homed), emulated PKCS11, and libsecrets support. Operate with a
    2nd key derived from volume key of the user, with which to wrap all
    keys. maintain keys in kernel keyring if possible.
  - when resizing an fs don't sync identity beforehand there might simply
    not be enough disk space for that. try to be defensive and sync only after
    resize.
  - if for some reason the partition ended up being much smaller than
    whole disk, recover from that, and grow it again.
  - if the homed shell fallback thing has access to an SSH agent, try to
    use it to unlock home dir (if ssh-agent forwarding is enabled). We
    could implement SSH unlocking of a homedir with that: when enrolling a new
    ssh pubkey in a user record we'd ask the ssh-agent to sign some random value
    with the privkey, then use that as luks key to unlock the home dir. Will not
    work for ECDSA keys since their signatures contain a random component, but
    will work for RSA and Ed25519 keys.
 
- honour validatefs xattrs in dissect-image.c too
 
- hook up journald with TPMs? measure new journal records to the TPM in regular
  intervals, validate the journal against current TPM state with that. (taking
  inspiration from IMA log)
 
- Hook up journald's FSS logic with TPM2: seal the verification disk by
  time-based policy, so that the verification key can remain on host and be
  validated via TPM.
 
- Hook up systemd-journal-upload with RESTART_RESET=1 logic (should probably
  be conditioned on the num of successfully uploaded entries?)
 
- hostnamectl: show root image uuid
 
- if /usr/bin/swapoff fails due to OOM, log a friendly explanatory message about it
 
- if we fork of a service with StandardOutput=journal, and it forks off a
  subprocess that quickly dies, we might not be able to identify the cgroup it
  comes from, but we can still derive that from the stdin socket its output
  came from. We apparently don't do that right now.
 
- If we try to find a unit via a dangling symlink, generate a clean
  error. Currently, we just ignore it and read the unit from the search
  path anyway.
 
- image policy should be extended to allow dictating *how* a disk is unlocked,
  i.e. root=encrypted-tpm2+encrypted-fido2 would mean "root fs must be
  encrypted and unlocked via fido2 or tpm2, but not otherwise"
 
- imds: maybe do smarter api version handling
 
- implement a varlink registry service, similar to the one of the reference
  implementation, backed by /run/varlink/registry/. Then, also implement
  connect-via-registry-resolution in sd-varlink and varlinkctl. Care needs to
  be taken to do the resolution asynchronousy. Also, note that the Varlink
  reference implementation uses a different address syntax, which needs to be
  taken into account.
 
- implement Distribute= in socket units to allow running multiple
  service instances processing the listening socket, and open this up
  for ReusePort=
 
- **importd/importctl:**
  - complete varlink interface
  - download images into .v/ dirs
 
- importd: support image signature verification with PKCS#7 + OpenBSD signify
  logic, as alternative to crummy gpg
 
- In .socket units, add ConnectStream=, ConnectDatagram=,
  ConnectSequentialPacket= that create a socket, and then *connect to* rather than
  listen on some socket. Then, add a new setting WriteData= that takes some
  base64 data that systemd will write into the socket early on. This can then
  be used to create connections to arbitrary services and issue requests into
  them, as long as the data is static. This can then be combined with the
  aforementioned journald subscription varlink service, to enable
  activation-by-message id and similar.
 
- In DynamicUser= mode: before selecting a UID, use disk quota APIs on relevant
  disks to see if the UID is already in use.
 
- in journald, write out a recognizable log record whenever the system clock is
  changed ("stepped"), and in timesyncd whenever we acquire an NTP fix
  ("slewing"). Then, in journalctl for each boot time we come across, find
  these records, and use the structured info they include to display
  "corrected" wallclock time, as calculated from the monotonic timestamp in the
  log record, adjusted by the delta declared in the structured log record.
 
- in journald: whenever we start a new journal file because the boot ID
  changed, let's generate a recognizable log record containing info about old
  and new ID. Then, when displaying log stream in journalctl look for these
  records, to be able to order them.
 
- in networkd, when matching device types, fix up DEVTYPE rubbish the kernel passes to us
 
- in nss-systemd, if we run inside of RootDirectory= with PrivateUsers= set,
  find a way to map the User=/Group= of the service to the right name. This way
  a user/group for a service only has to exist on the host for the right
  mapping to work.
 
- in os-release define a field that can be initialized at build time from
  SOURCE_DATE_EPOCH (maybe even under that name?). Would then be used to
  initialize the timestamp logic of ConditionNeedsUpdate=.
 
- in pid1: include ExecStart= cmdlines (and other Exec*= cmdlines) in polkit
  request, so that policies can match against command lines.
 
- in sd-stub: optionally add support for a new PE section .keyring or so that
  contains additional certificates to include in the Mok keyring, extending
  what shim might have placed there. why? let's say I use "ukify" to build +
  sign my own fedora-based UKIs, and only enroll my personal lennart key via
  shim.  Then, I want to include the fedora keyring in it, so that kmods work.
  But I might not want to enroll the fedora key in shim, because this would
  also mean that the key would be in effect whenever I boot an archlinux UKI
  built the same way, signed with the same lennart key.
 
- in the initrd, once the rootfs encryption key has been measured to PCR 15,
  derive default machine ID to use from it, and pass it to host PID 1.
 
- in the initrd: derive the default machine ID to pass to the host PID 1 via
  $machine_id from the same seed credential.
 
- in the long run: permit a system with /etc/machine-id linked to /dev/null, to
  make it lose its identity, i.e. be anonymous. For this we'd have to patch
  through the whole tree to make all code deal with the case where no machine
  ID is available.
 
- In vmspawn/nspawn/machined wait for X_SYSTEMD_UNIT_ACTIVE=ssh-active.target
  and X_SYSTEMD_SIGNALS_LEVEL=2 as indication whether/when SSH and the POSIX
  signals are available. Similar for D-Bus (but just use sockets.target for
  that). Report as property for the machine.
 
- initialize the hostname from the fs label of /, if /etc/hostname does not exist?
 
- initrd: when transitioning from initrd to host, validate that
  /lib/modules/`uname -r` exists, refuse otherwise
 
- instead of going directly for DefineSpace when initializing nvpcrs, check if
  they exist first. apparently DefineSpace is broken on some tpms, and also
  creates log spam if the nvindex already exists.
 
- introduce /etc/boottab or so which lists block devices that bootctl +
  kernel-install shall update the ESPs on (and register in EFI BootXYZ
  variables), in addition to whatever is currently the booted /usr/.
  systemd-sysupdate should also take it into consideration and update the
  /usr/ images on all listed devices.
 
- introduce a .acpitable section for early ACPI table override
 
- Introduce a CGroupRef structure, inspired by PidRef. Should contain cgroup
  path, cgroup id, and cgroup fd. Use it to continuously pin all v2 cgroups via
  a cgroup_ref field in the CGroupRuntime structure. Eventually switch things
  over to do all cgroupfs access only via that structure's fd.
 
- introduce a new group to own TPM devices
 
- introduce an option (or replacement) for "systemctl show" that outputs all
  properties as JSON, similar to busctl's new JSON output. In contrast to that
  it should skip the variant type string though.
 
- introduce DefaultSlice= or so in system.conf that allows changing where we
  place our units by default, i.e. change system.slice to something
  else. Similar, ManagerSlice= should exist so that PID1's own scope unit could
  be moved somewhere else too. Finally machined and logind should get similar
  options so that it is possible to move user session scopes and machines to a
  different slice too by default. Use case: people who want to put resources on
  the entire system, with the exception of one specific service. See:
  https://lists.freedesktop.org/archives/systemd-devel/2018-February/040369.html
 
- introduce mntid_t, and make it 64bit, as apparently the kernel switched to
  64bit mount ids
 
- introduce new ANSI sequence for communicating log level and structured error
  metadata to terminals.
 
- introduce new structure Tpm2CombinedPolicy, that combines the various TPm2
  policy bits into one structure, i.e. public key info, pcr masks, pcrlock
  stuff, pin and so on. Then pass that around in tpm2_seal() and tpm2_unseal().
 
- introduce per-unit (i.e. per-slice, per-service) journal log size limits.
 
- investigate whether the gnome pty helper should be moved into systemd, to provide cgroup support.
 
- **journal:**
  - consider introducing implicit _TTY= + _PPID= + _EUID= + _EGID= + _FSUID= + _FSGID= fields
  - journald: also get thread ID from client, plus thread name
  - journal: when waiting for journal additions in the client always sleep at least 1s or so, in order to minimize wakeups
  - add API to close/reopen/get fd for journal client fd in libsystemd-journal.
  - fall back to /dev/log based logging in libsystemd-journal, if we cannot log natively?
  - declare the local journal protocol stable in the wiki interface chart
  - sd-journal: speed up sd_journal_get_data() with transparent hash table in bg
  - journald: when dropping msgs due to ratelimit make sure to write
    "dropped %u messages" not only when we are about to print the next
    message that works, but already after a short timeout
  - check if we can make journalctl by default use --follow mode inside of less if called without args?
  - maybe add API to send pairs of iovecs via sd_journal_send
  - journal: add a setgid "systemd-journal" utility to invoke from libsystemd-journal, which passes fds via STDOUT and does PK access
  - journalctl: support negative filtering, i.e. FOOBAR!="waldo",
    and !FOOBAR for events without FOOBAR.
  - journal: store timestamp of journal_file_set_offline() in the header,
    so it is possible to display when the file was last synced.
  - journal-send.c, log.c: when the log socket is clogged, and we drop, count this and write a message about this when it gets unclogged again.
  - journal: find a way to allow dropping history early, based on priority, other rules
  - journal: When used on NFS, check payload hashes
  - journald: add kernel cmdline option to disable ratelimiting for debug purposes
  - refuse taking lower-case variable names in sd_journal_send() and friends.
  - journald: we currently rotate only after MaxUse+MaxFilesize has been reached.
  - journal: deal nicely with byte-by-byte copied files, especially regards header
  - journal: sanely deal with entries which are larger than the individual file size, but where the components would fit
  - Replace utmp, wtmp, btmp, and lastlog completely with journal
  - journalctl: instead --after-cursor= maybe have a --cursor=XYZ+1 syntax?
  - when a kernel driver logs in a tight loop, we should ratelimit that too.
  - journald: optionally, log debug messages to /run but everything else to /var
  - journald: when we drop syslog messages because the syslog socket is
    full, make sure to write how many messages are lost as first thing
    to syslog when it works again.
  - journald: allow per-priority and per-service retention times when rotating/vacuuming
  - journald: make use of uid-range.h to manage uid ranges to split
    journals in.
  - journalctl: add the ability to look for the most recent process of a binary.
                journalctl /usr/bin/X11 --invocation=-1
  - systemctl: change 'status' to show logs for the last invocation, not a fixed
    number of lines
  - improve journalctl performance by loading journal files
    lazily. Encode just enough information in the file name, so that we
    do not have to open it to know that it is not interesting for us, for
    the most common operations.
  - man: document that corrupted journal files is nothing to act on
  - rework journald sigbus stuff to use mutex
  - Set RLIMIT_NPROC for systemd-journal-xyz, and all other of our
    services that run under their own user ids, and use User= (but only
    in a world where userns is ubiquitous since otherwise we cannot
    invoke those daemons on the host AND in a container anymore). Also,
    if LimitNPROC= is used without User= we should warn and refuse
    operation.
  - journalctl --verify: don't show files that are currently being
    written to as FAIL, but instead show that they are being written to.
  - add journalctl -H that talks via ssh to a remote peer and passes through
    binary logs data
  - add a version of --merge which also merges /var/log/journal/remote
  - journalctl: -m should access container journals directly by enumerating
    them via machined, and also watch containers coming and going.
    Benefit: nspawn --ephemeral would start working nicely with the journal.
  - assign MESSAGE_ID to log messages about failed services
  - check if loop in decompress_blob_xz() is necessary
  - log pidfid as another field, i.e. _PIDFDID=
  - beef up ClientContext logic to store pidfd_id of peer, to validate
    we really use the right cache entry
  - log client's pidfd id as a new automatic field _PIDFDID= or so.
  - split up ClientContext cache in two: one cache keyed by pid/pidfdid
    with process information, and another one keyed by cgroup path/cgroupid with
    cgroup information. This way if a service consisting of many logging
    processes can take benefit of the cgroup caching.
  - support RFC3164 fully for the incoming syslog transport, see
    https://github.com/systemd/systemd/issues/19251#issuecomment-816601955
  - add varlink service that allows subscribing to certain log events,
    for example matching by message ID, or log level returns a list of journal
    cursors as they happen.
  - also collect CLOCK_BOOTTIME timestamps per log entry. Then, derive
    "corrected" CLOCK_REALTIME information on display from that and the timestamp
    info of the newest entry of the specific boot (as identified by the boot
    ID). This way, if a system comes up without a valid clock but acquires a
    better clock later, we can "fix" older entry timestamps on display, by
    calculating backwards. We cannot use CLOCK_MONOTONIC for this, since it does
    not account for suspend phases. This would then also enable us to correct the
    kmsg timestamping we consume (where we erroneously assume the clock was in
    CLOCK_MONOTONIC, but it actually is CLOCK_BOOTTIME as per kernel).
  - generate recognizable log events whenever we shutdown journald
    cleanly, and when we migrate run → var. This way tools can verify that a
    previous boot terminated cleanly, because either of these two messages must
    be safely written to disk, then.
  - do journal file writing out-of-process, with one writer process per
    client UID, so that synthetic hash table collisions can slow down a specific
    user's journal stream down but not the others.
  - make sure -f ends when the container indicated by -M terminates
  - sigbus API via a signal-handler safe function that people may call
    from the SIGBUS handler
 
- journalctl/timesyncd: whenever timesyncd acquires a synchronization from NTP,
  create a structured log entry that contains boot ID, monotonic clock and
  realtime clock (I mean, this requires no special work, as these three fields
  are implicit). Then in journalctl when attempting to display the realtime
  timestamp of a log entry, first search for the closest later log entry
  of this kinda that has a matching boot id, and convert the monotonic clock
  timestamp of the entry to the realtime clock using this info. This way we can
  retroactively correct the wallclock timestamps, in particular for systems
  without RTC, i.e. where initially wallclock timestamps carry rubbish, until
  an NTP sync is acquired.
 
- landlock: for unprivileged systemd (i.e. systemd --user), use landlock to
  implement ProtectSystem=, ProtectHome= and so on. Landlock does not require
  privs, and we can implement pretty similar behaviour. Also, maybe add a mode
  where ProtectSystem= combined with an explicit PrivateMounts=no could request
  similar behaviour for system services, too.
 
- landlock: lock down RuntimeDirectory= via landlock, so that services lose
  ability to write anywhere else below /run/. Similar for
  StateDirectory=. Benefit would be clear delegation via unit files: services
  get the directories they get, and nothing else even if they wanted to.
 
- Lennart: big blog story about "why systemd-boot"
 
- Lennart: big blog story about building initrds
 
- Lennart: big blog story about DDIs
 
- let's not GC a unit while its ratelimits are still pending
 
- libsystemd-journal, libsystemd-login, libudev: add calls to easily attach these objects to sd-event event loops
 
- lock down acceptable encrypted credentials at boot, via simple allowlist,
  maybe on kernel command line:
  systemd.import_encrypted_creds=foobar.waldo,tmpfiles.extra to protect locked
  down kernels from credentials generated on the host with a weak kernel
 
- lock down swtpm a bit to make it harder to extract keys from it as it is
  running. i.e. make ptracing + termination hard from the outside. also run
  swtpm as unpriv user (not trivial, probably requires patch swtpm, as it needs
  to allocate vtpm device), to lock it down from the inside.
 
- loginctl: show "service identifier" in tabular list-sessions output, to make
  run0 sessions easily visible.
 
- loginctl: show argv[] of "leader" process in tabular list-sessions output
 
- **logind:**
  - logind: optionally, ignore idle-hint logic for autosuspend, block suspend as long as a session is around
  - logind: wakelock/opportunistic suspend support
  - Add pretty name for seats in logind
  - logind: allow showing logout dialog from system?
  - add Suspend() bus calls which take timestamps to fix double suspend issues when somebody hits suspend and closes laptop quickly.
  - if pam_systemd is invoked by su from a process that is outside of a
    any session we should probably just become a NOP, since that's
    usually not a real user session but just some system code that just
    needs setuid().
  - logind: make the Suspend()/Hibernate() bus calls wait for the for
    the job to be completed. before returning, so that clients can wait
    for "systemctl suspend" to finish to know when the suspending is
    complete.
  - logind: when the power button is pressed short, just popup a
    logout dialog. If it is pressed for 1s, do the usual
    shutdown. Inspiration are Macs here.
  - expose "Locked" property on logind session objects
  - maybe allow configuration of the StopTimeout for session scopes
  - rename session scope so that it includes the UID. THat way
    the session scope can be arranged freely in slices and we don't have
    make assumptions about their slice anymore.
  - follow PropertiesChanged state more closely, to deal with quick logouts and
    relogins
  - (optionally?) spawn seat-manager@$SEAT.service whenever a seat shows up that as CanGraphical set
  - invoke a service manager for "area" logins too. i.e. instantiate
    user@.service also for logins where XDG_AREA is set, in per-area fashion, and
    ref count it properly. Benefit: graphical logins should start working with
    the area logic.
  - when logging in, always take an fd to the home dir, to keep the dir
    busy, so that autofs release can never happen. (this is generally a good
    idea, and specifically works around the fact the autofs ignores busy by mount
    namespaces)
 
- look at nsresourced, mountfsd, homed, importd, portabled, and try to come up
  with a way how the forked off worker processes can be moved into transient
  services with sandboxing, without breaking notify socket stuff and so on.
 
- **machined:**
  - add an API so that libvirt-lxc can inform us about network interfaces being
    removed or added to an existing machine
  - "machinectl migrate" or similar to copy a container from or to a
    difference host, via ssh
  - introduce systemd-nspawn-ephemeral@.service, and hook it into
    "machinectl start" with a new --ephemeral switch
  - "machinectl status" should also show internal logs of the container in
    question
  - "machinectl history"
  - "machinectl diff"
  - "machinectl commit" that takes a writable snapshot of a tree, invokes a
    shell in it, and marks it read-only after use
  - gc for OCI layers that are not referenced anymore by any .mstack/ links.
  - optionally track nspawn unix-export/ runtime for each machined, and
    then update systemd-ssh-proxy so that it can connect to that.
 
- make "bootctl install" + "bootctl update" useful for installing shim too. For
  that introduce new dir /usr/lib/systemd/efi/extra/ which we copy mostly 1:1
  into the ESP at install time. Then make the logic smart enough so that we
  don't overwrite bootx64.efi with our own if the extra tree already contains
  one. Also, follow symlinks when copying, so that shim rpm can symlink their
  stuff into our dir (which is safe since the target ESP is generally VFAT and
  thus does not have symlinks anyway). Later, teach the update logic to look at
  the ELF package metadata (which we also should include in all PE files, see
  above) for version info in all *.EFI files, and use it to only update if
  newer.
 
- make cryptsetup lower --iter-time
 
- Make it possible to set the keymap independently from the font on
  the kernel cmdline. Right now setting one resets also the other.
 
- make killing more debuggable: when we kill a service do so setting the
  .si_code field with a little bit of info. Specifically, we can set a
  recognizable value to first of all indicate that it's systemd that did the
  killing. Secondly, we can give a reason for the killing, i.e. OOM or so, and
  also the phase we are in, and which process we think we are killing (i.e.
  main vs control process, useful in case of sd_notify() MAINPID= debugging).
  Net result: people who try to debug why their process gets killed should have
  some minimal, nice metadata directly on the signal event.
 
- make MAINPID= message reception checks even stricter: if service uses User=,
  then check sending UID and ignore message if it doesn't match the user or
  root.
 
- make nspawn containers, portable services and vmspawn VMs optionally survive
  soft reboot wholesale.
 
- Make nspawn to a frontend for systemd-executor, so that we have to ways into
  the executor: via unit files/dbus/varlink through PID1 and via cmdline/OCI
  through nspawn.
 
- make persistent restarts easier by adding a new setting OpenPersistentFile=
  or so, which allows opening one or more files that is "persistent" across
  service restarts, hot reboot, cold reboots (depending on configuration): the
  files are created empty on first invocation, and on subsequent invocations
  the files are reboot. The files would be backed by tmpfs, pmem or /var
  depending on desired level of persistency.
 
- make repeated alt-ctrl-del presses printing a dump
 
- make rfkill uaccess controllable by default, i.e. steal rule from
  gnome-bluetooth and friends
 
- Make run0 forward various signals to the forked process so that sending
  signals to a child process works roughly the same regardless of whether the
  child process is spawned via run0 or not.
 
- make sure systemd-ask-password-wall does not shutdown systemd-ask-password-console too early
 
- make sure the ratelimit object can deal with USEC_INFINITY as way to turn off things
 
- make systemd work nicely without /bin/sh, logins and associated shell tools around
  - make sure debug shell service (sushell) has a nice failure mode, prints a message and reboots
  - varlink interface for "systemctl start" and friends
  - https://github.com/util-linux/util-linux/issues/4117
 
- make the systemd-repart "seed" value provisionable via credentials, so that
  confidential computing environments can set it and deterministically
  enforce the uuids for partitions created, so that they can calculate PCR 15
  ahead of time.
 
- make use of ethtool veth peer info in machined, for automatically finding out
  host-side interface pointing to the container.
 
- make use of new glibc 2.32 APIs sigabbrev_np().
 
- make vmspawn/nspawn/importd/machined a bit more usable in a WSL-like
  fashion. i.e. teach unpriv systemd-vmspawn/systemd-nspawn a reasonable
  --bind-user= behaviour that mounts the calling user through into the
  machine. Then, ship importd with a small database of well known distro images
  along with their pinned signature keys. Then add some minimal glue that binds
  this together: downloads a suitable image if not done so yet, starts it in
  the bg via vmspawn/nspawn if not done so yet and then requests a shell inside
  it for the invoking user.
 
- man: rework os-release(5), and clearly separate our extension-release.d/ and
  initrd-release parts, i.e. list explicitly which fields are about what.
 
- man: the documentation of Restart= currently is very misleading and suggests the tools from ExecStartPre= might get restarted.
 
- maybe add a new standard slice where process that are started in the initrd
  and stick around for the whole system runtime (i.e. root fs storage daemons,
  the bpf loader daemon discussed above, and such) are placed. maybe
  protected.slice or so? Then write docs that suggest that services like this
  set Slice=protected.slice, RefuseManualStart=yes, RefuseManualStop=yes and a
  couple of other things.
 
- maybe add call sd_journal_set_block_timeout() or so to set SO_SNDTIMEO for
  the sd-journal logging socket, and, if the timeout is set to 0, sets
  O_NONBLOCK on it. That way people can control if and when to block for
  logging.
 
- maybe add kernel cmdline params: to force random seed crediting
 
- maybe add new flags to gpt partition tables for rootfs and usrfs indicating
  purpose, i.e. whether something is supposed to be bootable in a VM, on
  baremetal, on an nspawn-style container, if it is a portable service image,
  or a sysext for initrd, for host os, or for portable container. Then hook
  portabled/… up to udev to watch block devices coming up with the flags set, and
  use it.
 
- maybe add support for binding and connecting AF_UNIX sockets in the file
  system outside of the 108ch limit. When connecting, open O_PATH fd to socket
  inode first, then connect to /proc/self/fd/XYZ. When binding, create symlink
  to target dir in /tmp, and bind through it.
 
- Maybe add SwitchRootEx() as new bus call that takes env vars to set for new
  PID 1 as argument. When adding SwitchRootEx() we should maybe also add a
  flags param that allows disabling and enabling whether serialization is
  requested during switch root.
 
- maybe allow timer units with an empty Units= setting, so that they
  can be used for resuming the system but nothing else.
 
- maybe beef up sd-event: optionally, allow sd-event to query the timestamp of
  next pending datagram inside a SOCK_DGRAM IO fd, and order event source
  dispatching by that. Enable this on the native + syslog sockets in journald,
  so that we add correct ordering between the two. Use MSG_PEEK + SCM_TIMESTAMP
  for this.
 
- maybe define a /etc/machine-info field for the ANSI color to associate with a
  hostname. Then use it for the shell prompt to highlight the hostname. If no
  color is explicitly set, hash a color automatically from the hostname as a
  fallback, in a reasonable way. Take inspiration from the ANSI_COLOR= field
  that already exists in /etc/os-release, i.e. use the same field name and
  syntax. When hashing the color, use the hsv_to_rgb() helper we already have,
  fixate S and V to something reasonable and constant, and derive the H from
  the hostname. Ultimate goal with this: give people a visual hint about the
  system they are on if the have many to deal with, by giving each a color
  identity. This code should be placed in hostnamed, so that clients can query
  the color via varlink or dbus.
 
- maybe do not install getty@tty1.service symlink in /etc but in /usr?
 
- maybe extend .path units to expose fanotify() per-mount change events
 
- maybe extend the capsule concept to the per-user instance too: invokes a
  systemd --user instance with a subdir of $HOME as $HOME, and a subdir of
  $XDG_RUNTIME_DIR as $XDG_RUNTIME_DIR.
 
- Maybe extend the service protocol to support handling of some specific SIGRT
  signal for setting service log level, that carries the level via the
  sigqueue() data parameter. Enable this via unit file setting.
 
- maybe implicitly attach monotonic+realtime timestamps to outgoing messages in
  log.c and sd-journal-send
 
- maybe introduce "@icky" as a seccomp filter group, which contains acct() and
  certain other syscalls that aren't quite obsolete, but certainly icky.
 
- Maybe introduce a helper safe_exec() or so, which is to execve() which
  safe_fork() is to fork(). And then make revert the RLIMIT_NOFILE soft limit
  to 1K implicitly, unless explicitly opted-out.
 
- maybe introduce a new partition that we can store debug logs and similar at
  the very last moment of shutdown. idea would be to store reference to block
  device (major + minor + partition id + diskseq?) in /run somewhere, than use
  that from systemd-shutdown, just write a raw JSON blob into the partition.
  Include timestamp, boot id and such, plus kmsg. on next boot immediately
  import into journal. maybe use timestamp for making clock more monotonic.
  also use this to detect unclean shutdowns, boot into special target if
  detected
 
- maybe introduce a new per-unit drop-in directory .confext.d/ that may contain
  symlinks to confext images to enable for the unit.
 
- Maybe introduce an InodeRef structure inspired by PidRef, which references a
  specific inode, and combines: a path, an O_PATH fd, and possibly a FID into
  one. Why? We often pass around path and fd separately in chaseat() and similar
  calls. Because passing around both separately is cumbersome we sometimes pass
  only one, sometimes the other, and sometimes both. It would make the code a
  lot simpler if we could pass both around at the same time in a simple way, via
  an InodeRef which *both* pins the inode via an fd, *and* gives us a friendly
  name for it.
 
- maybe introduce an OSC sequence that signals when we ask for a password, so
  that terminal emulators can maybe connect a password manager or so, and
  highlight things specially.
 
- maybe introduce container-shell@.service or so, to match
  container-getty.service but skips authentication, so you get a shell prompt
  directly. Usecase: wsl-like stuff (they have something pretty much like
  that). Question: how to pick user for this. Instance parameter? somehow from
  credential (would probably require some binary that converts credential to
  User= parameter?
 
- maybe introduce xattrs that can be set on the root dir of the root fs
  partition that declare the volatility mode to use the image in. Previously I
  thought marking this via GPT partition flags but that's not ideal since
  that's outside of the LUKS encryption/verity verification, and we probably
  shouldn't operate in a volatile mode unless we got told so from a trusted
  source.
 
- maybe prohibit setuid() to the nobody user, to lock things down, via seccomp.
  the nobody is not a user any code should run under, ever, as that user would
  possibly get a lot of access to resources it really shouldn't be getting
  access to due to the userns + nfs semantics of the user. Alternatively: use
  the seccomp log action, and allow it.
 
- maybe reconsider whether virtualization consoles (hvc1) are considered local
  or remote. i.e. are they more like an ssh login, or more like a /dev/tty1
  login? Lennart used to believe the former, but maybe the latter is more
  appropriate? This has effect on polkit interactivity, since it would mean
  questions via hvc0 would suddenly use the local polkit property. But this
  also raises the question whether such sessions shall be considered active or
  not
 
- Maybe rename pkcs7 and public verbs of systemd-keyutil to be more verb like.
 
- maybe rework systemd-modules-load to be a generator that just instantiates
  modprobe@.service a bunch of times
 
- maybe teach repart.d/ dropins a new setting MakeMountNodes= or so, which is
  just like MakeDirectories=, but uses an access mode of 0000 and sets the +i
  chattr bit. This is useful as protection against early uses of /var/ or /tmp/
  before their contents is mounted.
 
- maybe trigger a uevent "change" on a device if "systemctl reload xyz.device"
  is issued.
 
- maybe: in PID1, when we detect we run in an initrd, make superblock read-only
  early on, but provide opt-out via kernel cmdline.
 
- measure GPT and LUKS headers somewhere when we use them (i.e. in
  systemd-gpt-auto-generator/systemd-repart and in systemd-cryptsetup?)
 
- measure some string via pcrphase whenever we end up booting into emergency
  mode.
 
- measure some string via pcrphase whenever we resume from hibernate
 
- Merge systemd-creds options --uid= (which accepts user names) and --user.
 
- merge unit_kill_common() and unit_kill_context()
 
- mount /tmp/ and /var/tmp with a uidmap applied that blocks out "nobody" user
  among other things such as dynamic uid ranges for containers and so on. That
  way no one can create files there with these uids and we enforce they are only
  used transiently, never persistently.
 
- mount /var/ from initrd, so that we can apply sysext and stuff before the
  initrd transition. Specifically:
  1. There should be a var= kernel cmdline option, matching root= and usr=
  2. systemd-gpt-auto-generator should auto-mount /var if it finds it on disk
  3. mount.x-initrd mount option in fstab should be implied for /var
 
- mount most file systems with a restrictive uidmap. e.g. mount /usr/ with a
  uidmap that blocks out anything outside 0…1000 (i.e. system users) and similar.
 
- mount the root fs with MS_NOSUID by default, and then mount /usr/ without
  both so that suid executables can only be placed there. Do this already in
  the initrd. If /usr/ is not split out create a bind mount automatically.
 
- mount: turn dependency information from /proc/self/mountinfo into dependency information between systemd units.
 
- MountFlags=shared acts as MountFlags=slave right now.
 
- **mountfsd/nsresourced:**
  - userdb: maybe allow callers to map one uid to their own uid
  - bpflsm: allow writes if resulting UID on disk would be userns' owner UID
  - make encrypted DDIs work (password…)
  - add API for creating a new file system from scratch (together with some
    dm-integrity/HMAC key). Should probably work using systemd-repart (access
    via varlink).
  - add api to make an existing file "trusted" via dm-integry/HMAC key
  - port: portabled
  - port: tmpfiles, sysusers and similar
  - lets see if we can make runtime bind mounts into unpriv nspawn work
 
- move documentation about our common env vars (SYSTEMD_LOG_LEVEL,
  SYSTEMD_PAGER, …) into a man page of its own, and just link it from our
  various man pages that so far embed the whole list again and again, in an
  attempt to reduce clutter and noise a bid.
 
- move multiseat vid/pid matches from logind udev rule to hwdb
 
- Move RestrictAddressFamily= to the new cgroup create socket
 
- networkd's resolved hook: optionally map all lease IP addresses handed out to
  the same hostname which is configured on the .network file. Optionally, even
  derive this single name from the network interface name (i.e. probably
  altname or so). This way, when spawning a VM the host could pick the hostname
  for it and the client gets no say.
 
- networkd/machined: implement reverse name lookups in the resolved hook
 
- networkd: maintain a file in /run/ that can be symlinked into /run/issue.d/
  that always shows the current primary IP address
 
- **networkd:**
  - add more keys to [Route] and [Address] sections
  - add support for more DHCPv4 options (and, longer term, other kinds of dynamic config)
  - add reduced [Link] support to .network files
  - properly handle routerless dhcp leases
  - work with non-Ethernet devices
  - dhcp: do we allow configuring dhcp routes on interfaces that are not the one we got the dhcp info from?
  - the DHCP lease data (such as NTP/DNS) is still made available when
    a carrier is lost on a link. It should be removed instantly.
  - expose in the API the following bits:
        - option 15, domain name
        - option 12, hostname and/or option 81, fqdn
        - option 123, 144, geolocation
        - option 252, configure http proxy (PAC/wpad)
  - provide a way to define a per-network interface default metric value
    for all routes to it. possibly a second default for DHCP routes.
  - allow Name= to be specified repeatedly in the [Match] section. Maybe also
    support Name=foo*|bar*|baz ?
  - whenever uplink info changes, make DHCP server send out FORCERENEW
 
- nspawn/vmspawn/pid1: add ability to easily insert fully booted VMs/FOSC into
  shell pipelines, i.e. add easy to use switch that turns off console status
  output, and generates the right credentials for systemd-run-generator so that
  a program is invoked, and its output captured, with correct EOF handling and
  exit code propagation
 
- nspawn/vmspawn: define hotkey that one can hit on the primary interface to
  ask for a friendly, acpi style shutdown.
 
- **nspawn:**
  - emulate /dev/kmsg using CUSE and turn off the syslog syscall
    with seccomp. That should provide us with a useful log buffer that
    systemd can log to during early boot, and disconnect container logs
    from the kernel's logs.
  - as soon as networkd has a bus interface, hook up --network-interface=,
    --network-bridge= with networkd, to trigger netdev creation should an
    interface be missing
  - a nice way to boot up without machine id set, so that it is set at boot
    automatically for supporting --ephemeral. Maybe hash the host machine id
    together with the machine name to generate the machine id for the container
  - fix logic always print a final newline on output.
    https://github.com/systemd/systemd/pull/272#issuecomment-113153176
  - should optionally support receiving WATCHDOG=1 messages from its payload
    PID 1...
  - optionally automatically add FORWARD rules to iptables whenever nspawn is
    running, remove them when shut down.
  - add support for sysext extensions, too. i.e. a new --extension= switch that
    takes one or more arguments, and applies the extensions already during
    startup.
  - when main nspawn supervisor process gets suspended due to SIGSTOP/SIGTTOU
    or so, freeze the payload too.
  - support time namespaces
  - on cgroupsv1 issue cgroup empty handler process based on host events, so
    that we make cgroup agent logic safe
  - add API to invoke binary in container, then use that as fallback in
    "machinectl shell"
  - make nspawn suitable for shell pipelines: instead of triggering a hangup
    when input is finished, send ^D, which synthesizes an EOF. Then wait for
    hangup or ^D before passing on the EOF.
  - greater control over selinux label?
  - support that /proc, /sys/, /dev are pre-mounted
  - maybe allow TPM passthrough, backed by swtpm, and measure --image= hash
    into its PCR 11, so that nspawn instances can be TPM enabled, and partake
    in measurements/remote attestation and such. swtpm would run outside of
    control of container, and ideally would itself bind its encryption keys to
    host TPM.
  - make boot assessment do something sensible in a container. i.e send an
    sd_notify() from payload to container manager once boot-up is completed
    successfully, and use that in nspawn for dealing with boot counting,
    implemented in the partition table labels and directory names.
  - optionally set up nftables/iptables routes that forward UDP/TCP traffic on
    port 53 to resolved stub 127.0.0.54
  - maybe optionally insert .nspawn file as GPT partition into images, so that
    such container images are entirely stand-alone and can be updated as one.
  - The subreaper logic we currently have seems overly complex. We should
    investigate whether creating the inner child with CLONE_PARENT isn't better.
  - Reduce the number of sockets that are currently in use and just rely on one
    or two sockets.
  - map foreign UID range through 1:1
  - systemd-nspawn should get the same SSH key support that vmspawn now has.
 
- oci: add support for "importctl import-oci" which implements the "OCI layout"
  spec (i.e. acquiring via local fs access), as opposed to the current
  "importctl pull-oci" which focuses on the "OCI image spec", i.e. downloads
  from the web (i.e. acquiring via URLs).
 
- oci: add support for blake hashes for layers
 
- oci: support "data" in any OCI descriptor, not just manifest config.
 
- On boot, auto-generate an asymmetric key pair from the TPM,
  and use it for validating DDIs and credentials. Maybe upload it to the kernel
  keyring, so that the kernel does this validation for us for verity and kernel
  modules
 
- on shutdown: move utmp, wall, audit logic all into PID 1 (or logind?)
 
- once swtpm's sd_notify() support has landed in the distributions, remove the
  invocation in tpm2-swtpm.c and let swtpm handle it.
 
- Once the root fs LUKS volume key is measured into PCR 15, default to binding
  credentials to PCR 15 in "systemd-creds"
 
- optionally, also require WATCHDOG=1 notifications during service start-up and shutdown
 
- optionally, collect cgroup resource data, and store it in per-unit RRD files,
  suitable for processing with rrdtool. Add bus API to access this data, and
  possibly implement a CPULoad property based on it.
 
- optionally: turn on cgroup delegation for per-session scope units
 
- pam_systemd: on interactive logins, maybe show SUPPORT_END information at
  login time, à la motd
 
- pam_systemd_home: add module parameter to control whether to accept only
  password or only pkcs11/fido2 auth, and then use this to hook nicely into two
  of the three PAM stacks gdm provides.
  See discussion at https://github.com/authselect/authselect/pull/311
 
- paranoia: whenever we process passwords, call mlock() on the memory
  first. i.e. look for all places we use free_and_erasep() and
  augment them with mlock(). Also use MADV_DONTDUMP.
  Alternatively (preferably?) use memfd_secret().
 
- pcrextend/tpm2-util: add a concept of "rotation" to event log. i.e. allow
  trailing parts of the logs if time or disk space limit is hit. Protect the
  boot-time measurements however (i.e. up to some point where things are
  settled), since we need those for pcrlock measurements and similar. When
  deleting entries for rotation, place an event that declares how many items
  have been dropped, and what the hash before and after that.
 
- pcrextend: after measuring get an immediate quote from the TPM, and validate
  it. if it doesn't check out, i.e. the measurement we made doesn't appear in
  the PCR then also reboot.
 
- pcrextend: maybe add option to disable measurements entirely via kernel cmdline
 
- pcrextend: when we fail to measure, reboot the system (at least optionally).
  important because certain measurements are supposed to "destroy" tpm object
  access.
 
- pcrlock: add support for multi-profile UKIs
 
- **pcrlock:**
  - add kernel-install plugin that automatically creates UKI .pcrlock file when
    UKI is installed, and removes it when it is removed again
  - automatically install PE measurement of sd-boot on "bootctl install"
  - pre-calc sysext + kernel cmdline measurements
  - pre-calc cryptsetup root key measurement
  - maybe make systemd-repart generate .pcrlock for old and new GPT header in
    /run?
  - Add support for more than 8 branches per PCR OR
  - add "systemd-pcrlock lock-kernel-current" or so which synthesizes .pcrlock