Commit Graph

5667 Commits

Author SHA1 Message Date
Lennart Poettering 23dce98e89
Merge pull request #16603 from benzea/benzea/special-app-slice
Use app.slice by default in user manager (and define special user slices)
2020-11-11 14:11:02 +01:00
Zbigniew Jędrzejewski-Szmek b5e798de20 NEWS,man: tweak the description of FixedRandomDelay=
Explain why this is useful, but don't describe the implementation exactly,
since we're likely to want to change details in the future.
2020-11-11 19:10:34 +09:00
Lennart Poettering af8e571450 man: properly list relative time event source API in man page
The content was already there, but it wasn't listed in the header
metadata. Fix that.
2020-11-10 14:20:06 +01:00
Lennart Poettering 394131d5be
Merge pull request #17497 from anitazha/randomizeonce
timer: add new feature FixedRandomDelay=
2020-11-10 13:29:04 +01:00
Yu Watanabe 41d544a1c1 journal: refuse skip parameter for sd_journal_next_skip() larger than INT_MAX
Fixes #17502.
2020-11-10 13:14:42 +01:00
Yu Watanabe 71a5db49fd network: make default router lifetime to 30min
Closes #17527.
2020-11-10 00:04:42 +09:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Kristijan Gjoshev acf24a1a84 timer: add new feature FixedRandomDelay=
FixedRandomDelay=yes will use
`siphash24(sd_id128_get_machine() || MANAGER_IS_SYSTEM(m) || getuid() || u->id)`,
where || is concatenation, instead of a random number to choose a value between
0 and RandomizedDelaySec= as the timer delay.
This essentially sets up a fixed, but seemingly random, offset for each timer
iteration rather than having a random offset recalculated each time it fires.

Closes #10355

Co-author: Anita Zhang <the.anitazha@gmail.com>
2020-11-05 10:59:33 -08:00
Anita Zhang 5cecbae158 man: add <option> around default booleans in systemd.timer 2020-11-03 20:25:53 -08:00
Lennart Poettering 8b2e362651 man: remove misplaced comma 2020-11-03 20:05:46 +01:00
Lennart Poettering d3dcf4e3b9 fileio: beef up READ_FULL_FILE_CONNECT_SOCKET to allow setting sender socket name
This beefs up the READ_FULL_FILE_CONNECT_SOCKET logic of
read_full_file_full() a bit: when used a sender socket name may be
specified. If specified as NULL behaviour is as before: the client
socket name is picked by the kernel. But if specified as non-NULL the
client can pick a socket name to use when connecting. This is useful to
communicate a minimal amount of metainformation from client to server,
outside of the transport payload.

Specifically, these beefs up the service credential logic to pass an
abstract AF_UNIX socket name as client socket name when connecting via
READ_FULL_FILE_CONNECT_SOCKET, that includes the requesting unit name
and the eventual credential name. This allows servers implementing the
trivial credential socket logic to distinguish clients: via a simple
getpeername() it can be determined which unit is requesting a
credential, and which credential specifically.

Example: with this patch in place, in a unit file "waldo.service" a
configuration line like the following:

    LoadCredential=foo:/run/quux/creds.sock

will result in a connection to the AF_UNIX socket /run/quux/creds.sock,
originating from an abstract namespace AF_UNIX socket:

    @$RANDOM/unit/waldo.service/foo

(The $RANDOM is replaced by some randomized string. This is included in
the socket name order to avoid namespace squatting issues: the abstract
socket namespace is open to unprivileged users after all, and care needs
to be taken not to use guessable names)

The services listening on the /run/quux/creds.sock socket may thus
easily retrieve the name of the unit the credential is requested for
plus the credential name, via a simpler getpeername(), discarding the
random preifx and the /unit/ string.

This logic uses "/" as separator between the fields, since both unit
names and credential names appear in the file system, and thus are
designed to use "/" as outer separators. Given that it's a good safe
choice to use as separators here, too avoid any conflicts.

This is a minimal patch only: the new logic is used only for the unit
file credential logic. For other places where we use
READ_FULL_FILE_CONNECT_SOCKET it is probably a good idea to use this
scheme too, but this should be done carefully in later patches, since
the socket names become API that way, and we should determine the right
amount of info to pass over.
2020-11-03 09:48:04 +01:00
Sorin Ionescu d008666aca Fix typo 2020-11-01 23:26:16 +09:00
Yu Watanabe 819a555bc5
Merge pull request #17399 from afq984/udev-escaped-string
Allow escaped string in udev rules
2020-10-30 09:52:45 +09:00
Yu, Li-Yu bc117ec359 document udev escaped string in udev(7) 2020-10-29 22:57:00 +08:00
Luca Weiss 50f7b8fb28 Update org.freedesktop.hostname1 documentation
This documents the polkit actions for `SetDeployment()` and `SetLocation()` which previously were undocumented.
2020-10-28 22:16:57 +01:00
Zbigniew Jędrzejewski-Szmek 32c3a623ce
Merge pull request #17467 from keszybz/unconditionally-pull-in-cryptsetup-remote
Unconditionally pull in cryptsetup-remote.target in the initramfs
2020-10-28 18:00:04 +01:00
Lennart Poettering 48625dc437
Merge pull request #17471 from keszybz/man-update-fedora-version
Update fedora version in man pages
2020-10-28 10:09:12 +01:00
Zbigniew Jędrzejewski-Szmek d468c81e26 man: update fedora version
F33 was released today!
2020-10-27 16:02:18 +01:00
Zbigniew Jędrzejewski-Szmek 5fadff3352 man/machinectl: fix pull-raw example
We do not allow machine names with "_", so the command would fail as written.
Share the example with the systemd-nspawn page instead.
2020-10-27 16:02:18 +01:00
Lennart Poettering 95923d7e13 man: document the new Timestamping= option 2020-10-27 14:12:45 +01:00
Lennart Poettering 2d6d4136cd socket-util: make socket_set_recvpktinfo control PACKET_AUXDATA sockopt on AF_PACKET
Just for the sake of completness.
2020-10-27 14:12:10 +01:00
Lennart Poettering c758bea722 man: add references to fifo(7) and mq_overview(7) man pages 2020-10-27 14:11:48 +01:00
Zbigniew Jędrzejewski-Szmek 6bdcb72086 Revert "units: add initrd-cryptsetup.target"
This reverts commit 6c5496c492.

sysinit.target is shared between the initrd and the host system. Pulling in
initrd-cryptsetup.target into sysinit.target causes the following warning at
boot:
Oct 27 10:42:30 workstation-uefi systemd[1]: initrd-cryptsetup.target: Starting requested but asserts failed.
Oct 27 10:42:30 workstation-uefi systemd[1]: Assertion failed for initrd-cryptsetup.target.
2020-10-27 13:36:22 +01:00
Josh Brobst c690bd0bc6 man: correct xdg-autostart-generator path 2020-10-27 15:13:20 +09:00
Yu Watanabe 377a9545e9 tree-wide: fix typos found by Fossies codespell report 2020-10-24 13:29:31 +02:00
Zbigniew Jędrzejewski-Szmek 0dc9fd56a5 man: document what variables are allowed 2020-10-23 15:49:03 +02:00
Benjamin Berg 0f7793bebd man: Document app, session and background special user slice units
Add documentation for the special slice user slice units.
2020-10-23 10:32:02 +02:00
Yu Watanabe 9c914c0401
Merge pull request #17357 from yuwata/network-dhcp6-pd-announce-17353
network: add an option to control announcement of delegated prefix
2020-10-23 12:57:58 +09:00
Lennart Poettering 3ec554ad17
Merge pull request #17418 from poettering/news-247-more
more v247 preps
2020-10-22 18:20:47 +02:00
Lennart Poettering e1da60e430
Merge pull request #17324 from keszybz/resolvectl-compat-output
resolvectl compat output
2020-10-22 14:57:41 +02:00
Lennart Poettering d975310342
Merge pull request #16632 from keszybz/test-path-yet-again
Tighten handling of spawned services in tests that may fail
2020-10-22 14:56:46 +02:00
Lennart Poettering 66ad93e86d net_id: fix newly added naming scheme name
v246 is long released. Hence the new scheme should be named v247.

(Interesting, how we pretty systematically for the last releases changed
the scheme only every second release)
2020-10-22 14:26:23 +02:00
Lennart Poettering 44f88e7050
Merge pull request #17415 from keszybz/logind-resolved-docs
A bunch of updates to logind and resolved man pages
2020-10-22 13:44:17 +02:00
Zbigniew Jędrzejewski-Szmek bace688394 man: document differences between nss-resolve and nss-dns
https://bugzilla.redhat.com/show_bug.cgi?id=1889012
https://serverfault.com/questions/626612/dns-just-started-resolving-my-server-prod-addresses-to-127-0-53-53
https://serverfault.com/questions/649352/what-are-the-security-implications-of-the-allow-dns-suffix-appending-to-unquali
2020-10-22 11:55:35 +02:00
Zbigniew Jędrzejewski-Szmek 2ce493672c man/org.freedesktop.resolve1: briefly document a bunch of methods and properties
Fixes #13799.
2020-10-22 11:55:35 +02:00
Zbigniew Jędrzejewski-Szmek 9e1804b24c man/systemd-resolved: reword the description of query a bit
The phrase "routing domains" is used to mean both route-only domains and search
domains. Route-only domains are always called like that, and not just "route domains".

Some paragraphs are reordered to describe synthetisized records first, then
LLMNR, then various ways quries are routed.

Fixes #8928, hopefully.
2020-10-22 11:55:35 +02:00
Zbigniew Jędrzejewski-Szmek b8ee3493a5 meson: convert developer_mode boolean to an enum
I initially changed this to add a third state. But even with two values having
an explicit name instead of just 0/1 is mode descriptive.
2020-10-22 11:05:17 +02:00
Jonathan Lebon 6c5496c492 units: add initrd-cryptsetup.target
For encrypted block devices that we need to unlock from the initramfs,
we currently rely on dracut shipping `cryptsetup.target`. This works,
but doesn't cover the case where the encrypted block device requires
networking (i.e. the `remote-cryptsetup.target` version). That target
however is traditionally dynamically enabled.

Instead, let's rework things here by adding a `initrd-cryptsetup.target`
specifically for initramfs encrypted block device setup. This plays the
role of both `cryptsetup.target` and `remote-cryptsetup.target` in the
initramfs.

Then, adapt `systemd-cryptsetup-generator` to hook all generated
services to this new unit when running from the initrd. This is
analogous to `systemd-fstab-generator` hooking all mounts to
`initrd-fs.target`, regardless of whether they're network-backed or not.
2020-10-21 22:08:19 +02:00
Arian van Putten 429495163c cgtop: Display cpu time in microseonds with --raw
this makes the CPU time easily parseable; which was the goal
of --raw in the first place.

This only triggers if --raw is combined with --cpu=time
2020-10-21 14:29:48 +02:00
Lennart Poettering aa5502bb33
Merge pull request #16444 from oniko/luks-detached-header
Add support for detached LUKS header on kernel cmd line
2020-10-21 10:41:11 +02:00
Zbigniew Jędrzejewski-Szmek 2c91906e25 man: add example of negative trust anchor file
Fixes #17226.
2020-10-20 19:58:37 +02:00
Дамјан Георгиевски c4b843473a bootctl: add @current/@oneshot/@default targets to set-default/set-oneshot
Using `bootctl set-default @current` will set the default loader entry
to the currently booted entry as read from the `LoaderEntrySelected` EFI
variable.

Also `bootctl set-oneshot @current` will set the oneshot loader entry to
the current booted entry.

Correspondingly `@default` and `@oneshot` can be used to read from the
LoaderEntryDefault and LoaderEntryOneshot EFI variables.
2020-10-20 15:02:58 +02:00
Yu Watanabe 0ce8a9d6e5
Merge pull request #16939 from Rahix/robust-first-boot-machine-id
Make ConditionFirstBoot safe against power failures
2020-10-20 14:01:41 +09:00
Yu Watanabe 1586d324bd
Merge pull request #17352 from msekletar/ens-names-fix
udev/net_id: don't generate slot based names if multiple devices might claim the same slot
2020-10-20 13:49:29 +09:00
Yu Watanabe 4b28e50f9e
Merge pull request #17390 from keszybz/logind-notifications-and-links
Fix sd_notify() usage in various daemons and update some documentation links
2020-10-20 13:44:52 +09:00
Michal Sekletár 2c8ec0095e udev/net_id: don't generate slot based names if multiple devices might claim the same slot 2020-10-19 17:55:44 +02:00
Lennart Poettering 43e7dd70bc
Merge pull request #17344 from keszybz/bus-connect-more-logs
Add some debug logs to help diagnose bus connections
2020-10-19 17:39:37 +02:00
Harald Seiler a48627ef87 man: Document new machine-id and first boot behavior 2020-10-19 16:28:22 +02:00
Harald Seiler f4466bdbf9 units: add first-boot-complete.target for first boot ordering
Add a new target for synchronizing units that wish to run once during
the first boot of the system.  The machine-id will be committed to disk
only after the target has been reached, thus ensuring that all units
ordered before it had a chance to complete.
2020-10-19 16:28:22 +02:00
Zbigniew Jędrzejewski-Szmek 515736d0f3 tree-wide: update web link to logind description
https://www.freedesktop.org/wiki/Software/systemd/multiseat/ says that it
is obsoleted by sd-login(3), so it doesn't make much sense to link to the former.
2020-10-19 15:23:37 +02:00