Commit Graph

1125 Commits

Author SHA1 Message Date
Yu Watanabe
940441b44c network/tuntap: deny non-system users/groups from owning Tun/Tap interfaces
This is analogous to #36123, but for Tun/Tap interfaces created by
systemd-networkd.

If a regular user account want to control a Tun/Tap interface, then
assign the interface to a system group, e.g., vpn, and add the user
to the group.

Closes #37279.
2025-04-30 20:31:00 +09:00
Yu Watanabe
4db8663b81 tree-wide: fix typo 2025-04-27 10:36:12 +09:00
Beniamino Galvani
2451cd2512 networkd: reduce the IPv4 DAD timeout to 200ms
The original timeout of 7 seconds is very long for today's networks. Reduce it
to 200ms. Note that this change also affects IPv4 link-local addressing.
2025-04-26 14:44:52 +09:00
Yu Watanabe
87541e254f meson: use deprecated tag for dns-over-tls and cryptolib meson options
Follow-up for #36937.
2025-04-22 10:10:53 +02:00
Yu Watanabe
a0e078e785 NEWS: mention org.freedesktop.systemd1.StartAuxiliaryScope() has been removed 2025-04-22 09:02:48 +09:00
Yu Watanabe
e895a490b7 NEWS: mention that F20 and friends has been replaced with micmute and so on
Follow-up for #34325.
2025-04-19 05:30:32 +09:00
Mike Yuan
3180c4d461 logind: drop session fifo logic, rely solely on pidfd for exit notification
Traditionally, logind installed a fifo in the PAM session and
used EOF on the fd as signal for session close. With the addition of
pidfd (76f2191d8e) however,
logind tracks the leader process and the session is terminated
as soon as that exits. I think the new behavior generally makes
more sense, and the behavior got changed *in the mentioned commit
already* without anyone ever showing up to complain. It hence
feels safe to kill the concept now (also before the varlink interface
gets rolled out).

Note that the 'PID' field in CreateSession() Varlink method
is now marked as strict, i.e. failure to acquire pidfd
is immediately treated as fatal.
2025-04-19 04:43:04 +09:00
Daan De Meyer
3bb398c299 resolve,import: always use openssl (#36937) 2025-04-18 15:30:33 +02:00
Yu Watanabe
8e7ef6abb8 NEWS: mention integration-tests meson option is deprecated
Follow-up for 710653d3bc.
2025-04-18 09:36:29 +09:00
Yu Watanabe
7de438cdb5 NEWS,TODO: fix typo 2025-04-07 16:54:05 +09:00
Yu Watanabe
3d2391a004 meson: remove more deprecated meson options
- default-hierarchy meson option was deprecated by
  31323f21bb (v256).
- nscd meson option was deprecated by
  28f1f1a5e6 (v257).

Let's completely remove them now.
2025-04-05 22:54:42 +09:00
Mike Yuan
1b781af6ee NEWS: document kernel baseline bump
Follow-up for 16ac586e5a
2025-04-04 15:34:52 +02:00
Mike Yuan
44a8b3d30b NEWS: remark cgroup v1 removal 2025-04-04 15:34:52 +02:00
Yu Watanabe
99cc106670 Update NEWS 2025-04-02 05:49:00 +09:00
Yu Watanabe
11361e3293 meson: drop split-usr, rootlibdir, and rootprefix from meson_options.txt
These options were deprecated by b0d3095fd6 (v255).
Let's remove them completely.
2025-03-12 15:21:57 +01:00
Lennart Poettering
9e050b0458 repart: port to new factory reset state apis 2025-03-05 12:37:24 +01:00
Lennart Poettering
14871a6529 efivars: kill SystemdOptions efi var support
This has been depracted since v254 (2023). Let's kill it for
good now, it has been long enough with 2y. Noone has shown up who wants
to keep it. And given it doesn't work in SB world anyway, and is not
measured is quite problematic security wise.
2025-02-26 17:28:43 +01:00
Steve Ramage
a4750ae156 network: doc and code typo fixes (#36422)
This fixes some typos in the documentation, both grammar as well as
incorrect field names.
It also changes the casing of CheckSum to Checksum in L2TP to match
other casings.
2025-02-19 02:08:16 +09:00
Lennart Poettering
4b840414be cryptenroll/repart/creds: no longer default to binding against literal PCR 7
PCR 7 covers the SecureBoot policy, in particular "dbx", i.e. the
denylist of bad actors. That list is pretty much as frequently updated
as firmware these days (as fwupd took over automatic updating). This
means literal PCR 7 policies are problematic: they likely break soon,
and are as brittle as any other literal PCR policies.

hence, pick safer defaults, i.e. exclude PCR 7 from the default mask.
This means the mask is now empty.

Generally, people should really switch to signed PCR policies covering
PCR 11, in combination with systemd-pcrlock for the other PCRs.
2025-01-30 10:32:26 +01:00
Yu Watanabe
7e6786b7fb NEWS: mention OWNER=/GROUP= in udev rules now refuses non-system user/group 2025-01-24 02:33:18 +09:00
Lennart Poettering
cf8f6cd057 logind: introduce "user-light" session class
This new session class is to "user" what "background" is to
"background-light": it doesn't cause the per-user service manager to
start.

This new session class is now the default if no session class was
provided at session registration time and the following conditions hold:

1. The session is not graphical
2. The user is not a regular user (but not root)

Or in other words root and system users won't get a service manager
started automatically if they go through a PAM session as part of things
like cron or ftp. They will however still get one if they log in
graphically.

This changes behaviour a bit, but hopefully in OK was.

This also makes "background-light" for system users incl. root.

This addresses one of the ideas discussed in #34988.
2025-01-15 17:03:21 +01:00
Lennart Poettering
f54390de87 NEWS: mention mesg y/n 2025-01-14 15:38:39 +01:00
Yu Watanabe
a4d1891475 meson: allow to customize the access mode for tty/pts devices
Then, switch the default value to "0600", due to general security
concerns about terminals being written to by other users.

Closing #35599.
2024-12-16 21:36:07 +00:00
Mike Yuan
3ae314afdc Revert "run: disable --expand-environment by default for --scope"
This reverts commit 8167c56bfa.

We've announced the breaking change during v254-v257. Let's actually
apply it for v258.
2024-12-12 06:05:30 +09:00
Luca Boccassi
9df1ca63fb NEWS: add placeholder for v258 2024-12-10 19:31:07 +00:00
Luca Boccassi
70bae7648f Finalize NEWS and meson.version for v257 2024-12-10 19:23:45 +00:00
Luca Boccassi
9e5e1cf6ca NEWS: update list of contributors 2024-12-10 15:18:39 +00:00
Zbigniew Jędrzejewski-Szmek
d5df77b474 NEWS: adjust grammar
Follow-up for 1072618023.
2024-12-02 10:48:59 +01:00
Yu Watanabe
1072618023 NEWS: metion changes for networkd 2024-12-01 23:37:32 +09:00
Luca Boccassi
d08946c19c NEWS: update date 2024-11-27 21:11:33 +00:00
Luca Boccassi
a881ca663f NEWS: update contributors list 2024-11-27 15:17:23 +00:00
Vito Caputo
4f3df8c1bb NEWS: add blurb thanking Nick Owens
Nick's largely responsible for nerd-sniping me into fixing #34516
and did most of the testing.
2024-11-24 16:31:27 +09:00
Luca Boccassi
a66fd4ac9f NEWS: update date 2024-11-15 19:16:47 +00:00
Luca Boccassi
69cd0f4781 NEWS: update contributors list 2024-11-15 17:26:07 +00:00
Luca Boccassi
7751bfb179 NEWS: systemd-keyutil, --certificate-source, --certificate-provider 2024-11-15 17:25:29 +00:00
Zbigniew Jędrzejewski-Szmek
579e905ffe NEWS: add specific versions in key codes entry
This should be easier for folks to consume.

Refs:
https://lists.x.org/archives/xorg-announce/2024-October/003543.html
https://lists.x.org/archives/xorg-announce/2024-October/003544.html
2024-11-07 16:55:53 +01:00
Yu Watanabe
fed7857672 NEWS: fix typo
Follow-up for a6d7cc74d6.
2024-11-07 10:05:32 +09:00
Lennart Poettering
acc8bae0b3 NEWS: various cleanups 2024-11-06 22:18:55 +01:00
Lennart Poettering
a6d7cc74d6 NEWS: various cleanups 2024-11-06 21:50:56 +01:00
Luca Boccassi
f10d1c679e NEWS: finalize 2024-11-06 16:58:14 +00:00
Luca Boccassi
e1c8f3a8d9 NEWS: update list of contributors 2024-11-06 16:53:46 +00:00
Luca Boccassi
859634ea63 NEWS: add note about sd-sbsign 2024-11-06 16:49:42 +00:00
Luca Boccassi
66d044b560 Update NEWS for recent PRs 2024-11-06 15:50:59 +00:00
Michele Dionisio
d865abf9eb networkd: add possibility to specify MulticastIGMPVersion 2024-11-06 15:50:27 +00:00
Luca Boccassi
f72fe2d73c Grammar and formatting for DeviceTree docs (#35050) 2024-11-06 15:13:18 +00:00
Zbigniew Jędrzejewski-Szmek
265488414c tree-wide: use Device*T*ree spelling
We used both, in fact "Devicetree" was more common. But we have a general rule
that we capitalize all words in names and also we have a DeviceTree=
configuration setting, which we cannot change. If we use two different
spelllings, this will make it harder for people to use the correct one in
config files. So use the "DeviceTree" spelling everywhere.
2024-11-06 15:00:55 +01:00
Zbigniew Jędrzejewski-Szmek
d0ab0e5fa5 pid1: stop refusing to boot with cgroup v1
Since v256 we completely fail to boot if v1 is configured. Fedora 41 was just
released with v256.7 and this is probably the first major exposure of users to
this code. It turns out not work very well. Fedora switched to v2 as default in
F31 (2019) and at that time some people added configuration to use v1 either
because of Docker or for other reasons. But it's been long enough ago that
people don't remember this and are now very unhappy when the system refuses to
boot after an upgrade.

Refusing to boot is also unnecessarilly punishing to users. For machines that
are used remotely, this could mean somebody needs to physically access the
machine. For other users, the machine might be the only way to access the net
and help, and people might not know how to set kernel parameters without some
docs. And because this is in systemd, after an upgrade all boot choices are
affected, and it's not possible to e.g. select an older kernel for boot. And
crashing the machine doesn't really serve our goal either: we were giving a
hint how to continue using v1 and nothing else.

If the new override is configured, warn and immediately boot to v1.
If v1 is configured w/o the override, warn and wait 30 s and boot to v2.
Also give a hint how to switch to v2.

https://bugzilla.redhat.com/show_bug.cgi?id=2323323
https://bugzilla.redhat.com/show_bug.cgi?id=2323345
https://bugzilla.redhat.com/show_bug.cgi?id=2322467
https://www.reddit.com/r/Fedora/comments/1gfcyw9/refusing_to_run_under_cgroup_01_sy_specified_on/

The advice is to set systemd.unified_cgroup_hierarchy=1 (instead of removing
systemd.unified_cgroup_hierarchy=0). I think this is easier to convey. Users
who are understand what is going on can just remove the option instead.

The caching is dropped in cg_is_legacy_wanted(). It turns out that the
order in which those functions are called during early setup is very fragile.
If cg_is_legacy_wanted() is called before we have set up the v2 hierarchy,
we incorrectly cache a true answer. The function is called just a handful
of times at most, so we don't really need to cache the response.
2024-11-06 13:43:25 +00:00
Zbigniew Jędrzejewski-Szmek
2257be13fe tree-wide: time-out → timeout
For justification, see 3f9a0a522f.
2024-11-05 19:32:19 +00:00
Daan De Meyer
406f177501 core: Introduce PrivatePIDs=
This new setting allows unsharing the pid namespace in a unit. Because
you have to fork to get a process into a pid namespace, we fork in
systemd-executor to get into the new pid namespace. The parent then
sends the pid of the child process back to the manager and exits while
the child process continues on with the rest of exec_invoke() and then
executes the actual payload.

Communicating the child pid is done via a new pidref socket pair that is
set up on manager startup.

We unshare the PID namespace right before the mount namespace so we
mount procfs correctly. Note PrivatePIDs=yes always implies MountAPIVFS=yes
to mount procfs.

When running unprivileged in a user session, user namespace is set up first
to allow for PID namespace to be unshared. However, when running in
privileged mode, we unshare the user namespace last to ensure the user
namespace does not own the PID namespace and cannot break out of the sandbox.

Note we disallow Type=forking services from using PrivatePIDs=yes since the
init proess inside the PID namespace must not exit for other processes in
the namespace to exist.

Note Daan De Meyer did the original work for this commit with Ryan Wilson
addressing follow-ups.

Co-authored-by: Daan De Meyer <daan.j.demeyer@gmail.com>
2024-11-05 05:32:02 -08:00
Lennart Poettering
f57efb3d6c update NEWS 2024-11-04 12:42:40 +01:00