Susant Sahani [Sat, 30 May 2020 04:35:28 +0000 (06:35 +0200)]
network: L2TP fix crash
```
=220358== Invalid read of size 8
==220358== at 0x452F05: l2tp_session_free (l2tp-tunnel.c:46)
==220358== by 0x456926: l2tp_tunnel_done (l2tp-tunnel.c:725)
==220358== by 0x43CF4D: netdev_free (netdev.c:205)
==220358== by 0x43D045: netdev_unref (netdev.c:210)
==220358== by 0x4198B7: manager_free (networkd-manager.c:1877)
==220358== by 0x40D0B3: manager_freep (networkd-manager.h:105)
==220358== by 0x40DE1C: run (networkd.c:21)
==220358== by 0x40DE75: main (networkd.c:130)
==220358== Address 0x5c035d0 is 0 bytes inside a block of size 40 free'd
==220358== at 0x483A9F5: free (vg_replace_malloc.c:538)
==220358== by 0x452F87: l2tp_session_free (l2tp-tunnel.c:57)
==220358== by 0x456857: netdev_l2tp_tunnel_verify (l2tp-tunnel.c:710)
==220358== by 0x440947: netdev_load_one (netdev.c:738)
==220358== by 0x441222: netdev_load (netdev.c:851)
==220358== by 0x419C50: manager_load_config (networkd-manager.c:1934)
==220358== by 0x40D7BE: run (networkd.c:87)
==220358== by 0x40DE75: main (networkd.c:130)
==220358== Block was alloc'd at
==220358== at 0x4839809: malloc (vg_replace_malloc.c:307)
==220358== by 0x452A76: malloc_multiply (alloc-util.h:96)
==220358== by 0x4531E6: l2tp_session_new_static (l2tp-tunnel.c:82)
==220358== by 0x455C01: config_parse_l2tp_session_id (l2tp-tunnel.c:535)
==220358== by 0x48E6D72: next_assignment (conf-parser.c:133)
==220358== by 0x48E77A3: parse_line (conf-parser.c:271)
==220358== by 0x48E7E4F: config_parse (conf-parser.c:396)
==220358== by 0x48E80E5: config_parse_many_files (conf-parser.c:453)
==220358== by 0x48E8490: config_parse_many (conf-parser.c:512)
==220358== by 0x44089C: netdev_load_one (netdev.c:729)
==220358== by 0x441222: netdev_load (netdev.c:851)
==220358== by 0x419C50: manager_load_config (networkd-manager.c:1934)
```
Daan De Meyer [Sat, 30 May 2020 09:04:14 +0000 (11:04 +0200)]
Merge pull request #15958 from layderv/master
#15773 add --reboot-arg to systemctl reboot
Daan De Meyer [Sat, 30 May 2020 09:00:13 +0000 (11:00 +0200)]
Merge pull request #15975 from mgub/patch-1
Fix typo.
Michael Gubbels [Fri, 29 May 2020 23:40:39 +0000 (16:40 -0700)]
Fix typo.
laydervus [Fri, 29 May 2020 17:15:34 +0000 (13:15 -0400)]
#15773 add --reboot-argument to systemctl reboot
Lennart Poettering [Fri, 29 May 2020 15:46:40 +0000 (17:46 +0200)]
stat-util: trivial empty_or_null() tweaks
To small tweaks: /dev/null is definitely a char device. And if we have
the path, to a string base comparison first.
sterlinghughes [Thu, 28 May 2020 20:54:27 +0000 (13:54 -0700)]
Check ambient set against bounding set prior to applying ambient set
Fixes #15020
Lennart Poettering [Fri, 29 May 2020 16:32:28 +0000 (18:32 +0200)]
update TODO
Lennart Poettering [Fri, 29 May 2020 14:02:53 +0000 (16:02 +0200)]
Merge pull request #15954 from keszybz/unit-file-leak
Fix leak in unit path cache and another small optimization
Evgeny Vereshchagin [Fri, 29 May 2020 11:35:11 +0000 (13:35 +0200)]
README: add a Fossies codespell badge
I keep forgetting where the report is. Hopefully the badge will
make it easier to find it. I also fixed several typos codespell
found along the way.
Yu Watanabe [Fri, 29 May 2020 08:23:00 +0000 (17:23 +0900)]
network: fix memleaks
Fixes #15951.
Yu Watanabe [Fri, 29 May 2020 08:00:30 +0000 (17:00 +0900)]
network: clean up doubled white space
Lennart Poettering [Fri, 29 May 2020 08:47:06 +0000 (10:47 +0200)]
update NEWS
Susant Sahani [Sat, 4 Apr 2020 18:07:18 +0000 (20:07 +0200)]
network: DHCPv6 Assign delegated prefix to LAN interface
In DHCPv6-PD environment, where WAN interface requests IPv6 via DHCPv6,
receives the address as well as delegated prefixes, with LAN interfaces
serving those delegated prefixes in their router advertisement messages.
The LAN interfaces on the router themselves do not have
the IPv6 addresses assigned by networkd from the prefix it
serves on that interface. Now this patch enables it.
Susant Sahani [Thu, 16 Apr 2020 15:00:29 +0000 (17:00 +0200)]
sd-network: Rectify Advertise Message Processing by a Client
We need to fix RCC 2215 behaviour with rfc7550 errata
and https://tools.ietf.org/html/rfc8415.
[RFC3315] specifies that a client must ignore an Advertise message if
a server will not assign any addresses to a client, and [RFC3633]
specifies that a client must ignore an Advertise message if a server
returns the NoPrefixAvail status to a requesting router. Thus, a
client requesting both IA_NA and IA_PD, with a server that only
offers either addresses or delegated prefixes, is not supported by
the current protocol specifications.
Solution: a client SHOULD accept Advertise messages, even when not
all IA option types are being offered. And, in this case, the client
SHOULD include the not offered IA option types in its Request. A
client SHOULD only ignore an Advertise message when none of the
requested IA options include offered addresses or delegated prefixes.
Note that ignored messages MUST still be processed for SOL_MAX_RT and
INF_MAX_RT options as specified in [RFC7083].
Replace Section 17.1.3 of RFC 3315: (existing errata)
The client MUST ignore any Advertise message that includes a Status
Code option containing the value NoAddrsAvail, with the exception
that the client MAY display the associated status message(s) to the
user.
With the following text (which addresses the existing erratum
[Err2471] and includes the changes made by [RFC7083]):
The client MUST ignore any Advertise message that contains no
addresses (IAADDR options encapsulated in IA_NA or IA_TA options)
and no delegated prefixes (IAPREFIX options encapsulated in IA_PD
options; see RFC 3633) with the exception that the client:
- MUST process an included SOL_MAX_RT option (RFC 7083) and
- MUST process an included INF_MAX_RT option (RFC 7083).
A client can display any associated status message(s) to the user
or activity log.
The client ignoring this Advertise message MUST NOT restart the
Solicit retransmission timer.
Yu Watanabe [Fri, 29 May 2020 06:55:38 +0000 (15:55 +0900)]
Merge pull request #15911 from poettering/unit-name-tighten
pid1: improve logging when we encounter a path that is too long to be converted into a mount unit name
Lennart Poettering [Tue, 26 May 2020 21:27:20 +0000 (23:27 +0200)]
sd-device: check netlink netns matches host netns before using monitor
Tracking down #15931 confused the hell out of me, since running homed in
gdb from the command line worked fine, but doing so as a service failed.
Let's make this more debuggable and check if we live in the host netns
when allocating a new udev monitor.
This is just debug stuff, so that if things don't work, a quick debug
run will reveal what is going on.
That said, while we are at it, also fix unexpected closing of passed in
fd when failing.
Yu Watanabe [Fri, 29 May 2020 06:23:37 +0000 (15:23 +0900)]
Merge pull request #15944 from poettering/sd-path-fixups
sd-path: some fixups
Yu Watanabe [Fri, 29 May 2020 06:23:15 +0000 (15:23 +0900)]
Merge pull request #15942 from poettering/pass-pktinfo
disable PassCredentials= on networkd netlink socket, enable NETLINK_PKTINFO instead
Yu Watanabe [Fri, 29 May 2020 06:10:47 +0000 (15:10 +0900)]
Merge pull request #15956 from poettering/news-v246
start of a NEWS file for v246 and minor assorted fixes
Yu Watanabe [Fri, 29 May 2020 01:39:14 +0000 (10:39 +0900)]
Merge pull request #15930 from poettering/udev-no-lock-warn
udev: when the BSD lock on a block device is taken, don't complain
Yu Watanabe [Fri, 29 May 2020 01:04:00 +0000 (10:04 +0900)]
Merge pull request #15619 from ddstreet/ignore_carrier_loss_default
Set IgnoreCarrierLoss= default to value of ConfigureWithoutCarrier=
Lennart Poettering [Thu, 28 May 2020 07:38:00 +0000 (09:38 +0200)]
update TODO
Lennart Poettering [Thu, 28 May 2020 07:28:28 +0000 (09:28 +0200)]
sd-path: drop "-dir" and "-path" suffixes from path enums
Clean up the naming of the sd-path enums. Previously, the more recently
added fields where named in the form SD_PATH_xyz_DIR and
SD_PATH_xyz_PATH, while the older fields where called just SD_PATH_xyz
and SD_PATH_SEARCH_xyz. Let's clean this up, to come to a more unified
way how we name this stuff.
I opted to stick to the old naming, i.e. dropthe suffixes. It's a bit of
a bike-shedding question of course, but I think there's a good reason to
avoid the additional DIR and PATH suffixes: the enum prefix contains
"PATH" anyway (i.e. "SD_PATH_"), so including PATH twice in each name is
redundant. Moreover, the key difference between the enums with the "dir"
and the "path" in the name is that the latter are *seach* paths, and I
think this is better emphasized by sticking to the "SEARCH" in the name.
Moreover dropping the suffixes makes the identifiers a lot shorter, in
particular in the "systemd-path" list output. And that's always good.
This means the naming pkgconfig file and in sd-path slightly deviate
(though the mapping is very simple), but I think that's OK, given that
this is developer facing and not user facing.
Lennart Poettering [Thu, 28 May 2020 07:17:48 +0000 (09:17 +0200)]
path: use ROOTPREFIX properly
ROOTPREFIX doesn't include the trailing /, hence add it in where needed.
Also, given that sysctl.d/, binfmt.d/, sysusers.d/ are generally
accessed before /var/ is up they should use ROOTPREFIX rather than
PREFIX. Fix that.
Lennart Poettering [Thu, 28 May 2020 21:34:24 +0000 (23:34 +0200)]
xdg-autostart: fix two coverity found issues
Fixes: CID#
1429003
Fixes: CID#
1429004
Lennart Poettering [Thu, 28 May 2020 21:26:24 +0000 (23:26 +0200)]
homed: enable userdb too if homed is requested
Strictly speaking you can run homed without userdb. But it doesn't
really make much sense: they go hand in hand and implement the same
concepts, just for different sets of users. Let's hence disable both
automatically by default if homed is requested.
(We don't do the reverse: opting into userdbd shouldn't mean that you
are OK with homed.)
And of course, users can always deviate from our defaults easily, and
turn off userbd again right-away if they don't like it, and things will
generally work.
Lennart Poettering [Thu, 28 May 2020 21:26:16 +0000 (23:26 +0200)]
udev: catch genuine_random_bytes() failures
Fixes: CID#
1428926
Lennart Poettering [Thu, 28 May 2020 21:25:51 +0000 (23:25 +0200)]
libsystemd: properly export new sd_notify_barrier() API call
Follow-up for:
4f07ddfa9bc2242eaa6c288a15b8bce4e4383931
Lennart Poettering [Thu, 28 May 2020 21:25:33 +0000 (23:25 +0200)]
hwdb: whitespace fix
Lennart Poettering [Tue, 26 May 2020 20:23:14 +0000 (22:23 +0200)]
start NEWS file for v246
Lennart Poettering [Thu, 28 May 2020 07:17:31 +0000 (09:17 +0200)]
tree-wide: remove spurious whitespace
Zbigniew Jędrzejewski-Szmek [Thu, 28 May 2020 16:39:27 +0000 (18:39 +0200)]
manager: free the jobs hashmap after we have no jobs
After a larger transaction, e.g. after bootup, we're left with an empty hashmap
with hundreds of buckets. Long-term, it'd be better to size hashmaps down when
they are less than 1/4 full, but even if we implement that, jobs hashmap is
likely to be empty almost always, so it seems useful to deallocate it once the
jobs count reaches 0.
Zbigniew Jędrzejewski-Szmek [Thu, 28 May 2020 13:25:22 +0000 (15:25 +0200)]
core: define UnitDependency iterators in loops
Reduced scope of variables is always nice.
Zbigniew Jędrzejewski-Szmek [Thu, 28 May 2020 12:58:35 +0000 (14:58 +0200)]
shared/unit-file: make sure the old hashmaps and sets are freed upon replacement
Possibly fixes #15220. (There might be another leak. I'm still investigating.)
The leak would occur when the path cache was rebuilt. So in normal circumstances
it wouldn't be too bad, since usually the path cache is not rebuilt too often. But
the case in #15220, where new unit files are created in a loop and started, the leak
occurs once for each unit file:
$ for i in {1..300}; do cp ~/.config/systemd/user/test0001.service ~/.config/systemd/user/test$(printf %04d $i).service; systemctl --user start test$(printf %04d $i).service;done
Zbigniew Jędrzejewski-Szmek [Thu, 28 May 2020 12:09:43 +0000 (14:09 +0200)]
core: make unit_set_invocation_id static
No functional change.
Lennart Poettering [Wed, 27 May 2020 22:27:51 +0000 (00:27 +0200)]
Merge pull request #15882 from poettering/pam-sudo-fixes-part4
More pam_systemd fixes split out of #15742
Lennart Poettering [Wed, 27 May 2020 20:51:02 +0000 (22:51 +0200)]
Merge pull request #15893 from DaanDeMeyer/firstboot-overwrite
systemd-firstboot: Add --force, --delete-root-password and --root-password-is-hashed options
Lennart Poettering [Thu, 7 May 2020 11:21:14 +0000 (13:21 +0200)]
pam_systemd: set legacy D-Bus path only if the runtime directory is validated
Lennart Poettering [Thu, 7 May 2020 11:20:44 +0000 (13:20 +0200)]
pam_systemd: be more thorough when validating runtime paths
Lennart Poettering [Wed, 27 May 2020 17:38:38 +0000 (19:38 +0200)]
resolved: tweak cmsg calculation
We ask for the TTL, then have enough space for it.
We probably can drop the extra cmsg space now, but let's figure that out
another time, since the extra cmsg space is used elsewhere in resolved
as well.
Lennart Poettering [Wed, 27 May 2020 17:37:19 +0000 (19:37 +0200)]
networkd: clean up NETLINK_PKTINFO vs. SO_PASSCRED confusion
We actually care for NETLINK_PKTINFO, not for SO_PASSCRED, hence when
allocating the netlink socket, configure things accordingly.
Tracked down by Benjamin Robin, see:
https://github.com/systemd/systemd/pull/15571#issuecomment-
633213747
Lennart Poettering [Wed, 27 May 2020 17:36:56 +0000 (19:36 +0200)]
core: add new PassPacketInfo= socket unit property
Lennart Poettering [Wed, 27 May 2020 17:27:51 +0000 (19:27 +0200)]
socket-util: add generic socket_pass_pktinfo() helper
The helper turns on the protocol specific "packet info" structure cmsg
for three relevant protocols we know.
Daan De Meyer [Mon, 25 May 2020 19:39:51 +0000 (21:39 +0200)]
firstboot: Add --kernel-command-line option
Daan De Meyer [Mon, 25 May 2020 17:24:07 +0000 (19:24 +0200)]
firstboot: Add --root-password-hashed option
Daan De Meyer [Mon, 25 May 2020 15:50:28 +0000 (17:50 +0200)]
Remove systemd-firstboot --force entry from TODO
Daan De Meyer [Sat, 23 May 2020 19:35:21 +0000 (21:35 +0200)]
firstboot: Add --delete-root-password option
Daan De Meyer [Fri, 22 May 2020 18:31:16 +0000 (20:31 +0200)]
firstboot: Add --force option
Daan De Meyer [Tue, 26 May 2020 17:49:26 +0000 (19:49 +0200)]
fileio: Rename rename_and_apply_smack to rename_and_apply_smack_floor_label.
Daan De Meyer [Tue, 26 May 2020 18:00:45 +0000 (20:00 +0200)]
fileio: Refactor sync_rights to take fds as arguments
Daan De Meyer [Fri, 22 May 2020 18:30:24 +0000 (20:30 +0200)]
sysusers: Move sync_rights and rename_and_apply_smack to basic
Daan De Meyer [Thu, 21 May 2020 18:31:55 +0000 (20:31 +0200)]
firstboot: Don't check twice if /etc/shadow exists
Lennart Poettering [Wed, 27 May 2020 16:47:26 +0000 (18:47 +0200)]
Merge pull request #15669 from andir/systemd-ipv6-pd-subnet-id
networkd: subnet id support for ipv6 prefix delegation
Lennart Poettering [Wed, 27 May 2020 16:41:01 +0000 (18:41 +0200)]
Merge pull request #15226 from benzea/benzea/xdg-autostart-generator
xdg-autostart-generator: a generator for XDG autostart files
Michael Biebl [Wed, 27 May 2020 13:48:02 +0000 (15:48 +0200)]
man: fix conditional in homed.conf.xml
Lennart Poettering [Tue, 26 May 2020 16:58:15 +0000 (18:58 +0200)]
udev: when the BSD lock on a block device is taken, don't complain
if someone implements https://systemd.io/BLOCK_DEVICE_LOCKING/ then we
shouldn't loudly complain about that.
This reverts back to the original behaviour from
3ebdb81ef088afd3b4c72b516beb5610f8c93a0d: when the lock is taken we
silently skip processing the device and sending out the messages for it.
Lennart Poettering [Wed, 27 May 2020 13:16:24 +0000 (15:16 +0200)]
Merge pull request #15934 from keszybz/docs-and-test-fix
A few sundry documentation and code fixes
Lennart Poettering [Wed, 27 May 2020 13:05:41 +0000 (15:05 +0200)]
Merge pull request #15928 from poettering/kill-mode-warnings
warn on KillMode=none, inform about left-over processes on stop and warn about sysv services
Chris Kerr [Wed, 27 May 2020 12:57:56 +0000 (15:57 +0300)]
man: Fix typo in suggested permissions
The user and group name is 'systemd-network' not 'systemd-networkd'
Lennart Poettering [Tue, 26 May 2020 14:22:36 +0000 (16:22 +0200)]
run: when waiting for unit, also check if no job is pending anymore
This is a fix-up for
a7c71d214c37797d82de2f66cfe0a0a79c3a5c92: since we
now don't wait for the job to finish anymore right after enqueuing it,
we should not exit our ptyfwd logic before the unit is back to inactive
*and* no job pending anymore.
Lennart Poettering [Wed, 27 May 2020 12:51:50 +0000 (14:51 +0200)]
Merge pull request #15853 from poettering/tmp-argument
support the Debian-style tmp= argument in crypttab
Frantisek Sumsal [Tue, 26 May 2020 21:47:49 +0000 (23:47 +0200)]
meson: support building fuzzers with meson <0.48.0
Chris Down [Tue, 26 May 2020 13:35:18 +0000 (14:35 +0100)]
service: Display updated WatchdogUSec from sd_notify
Suppose a service has WatchdogSec set to 2 seconds in its unit file. I
then start the service and WatchdogUSec is set correctly:
% systemctl --user show psi-notify -p WatchdogUSec
WatchdogUSec=2s
Now I call `sd_notify(0, "WATCHDOG_USEC=
10000000")`. The new timer seems
to have taken effect, since I only send `WATCHDOG=1` every 4 seconds,
and systemd isn't triggering the watchdog handler. However, `systemctl
show` still shows WatchdogUSec as 2s:
% systemctl --user show psi-notify -p WatchdogUSec
WatchdogUSec=2s
This seems surprising, since this "original" watchdog timer isn't the
one taking effect any more. This patch makes it so that we instead
display the new watchdog timer after sd_notify(WATCHDOG_USEC):
% systemctl --user show psi-notify -p WatchdogUSec
WatchdogUSec=10s
Fixes #15726.
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 19:08:10 +0000 (21:08 +0200)]
shared/efi-loader: remove check that uses absolute tick value
sd-boot uses rdtsc to set those timestamps. There is no guarantee that the tsc
has any particular absolute value.
On my VM:
$ head /sys/firmware/efi/efivars/LoaderTime*
==> /sys/firmware/efi/efivars/LoaderTimeExecUSec-
4a67b082-0a4c-41cf-b6c7-
440b29bb8c4f <==
4397904074
==> /sys/firmware/efi/efivars/LoaderTimeInitUSec-
4a67b082-0a4c-41cf-b6c7-
440b29bb8c4f <==
4396386839
==> /sys/firmware/efi/efivars/LoaderTimeMenuUSec-
4a67b082-0a4c-41cf-b6c7-
440b29bb8c4f <==
4396392521
$ build/test-boot-timestamps
...
LoaderTimeExecUSec=
4396386839 too large, refusing.
Failed to read EFI loader data: Input/output error
Assertion 'q >= 0' failed at src/test/test-boot-timestamps.c:84, function main(). Aborting.
(with patch)
$ build/test-boot-timestamps
...
EFI Loader: start=1h 13min 16.386s exit=1h 13min 17.904s duration=1.517s
Firmware began 1h 13min 17.904074s before kernel.
Loader began 1.517235s before kernel.
Firmware began Tue 2020-05-26 11:04:13 CEST.
Loader began Tue 2020-05-26 12:17:30 CEST.
Kernel began Tue 2020-05-26 12:17:31 CEST.
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 17:28:53 +0000 (19:28 +0200)]
core: minor simplification
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 16:55:23 +0000 (18:55 +0200)]
userwork: remove trailing comma in message
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 14:07:30 +0000 (16:07 +0200)]
core: add forgotten return in error path
If we get an error here, this is most likely oom, and we should not continue.
Benjamin Berg [Tue, 31 Mar 2020 14:16:27 +0000 (16:16 +0200)]
fuzz: Add an XDG desktop file fuzzer
To test the XDG parser used by the xdg-autostart-generator.
Co-authored-by: Evgeny Vereshchagin <evvers@ya.ru>
Benjamin Berg [Mon, 30 Mar 2020 16:14:56 +0000 (18:14 +0200)]
test: Add test for XDG desktop file parsing and interpretation
Benjamin Berg [Fri, 22 May 2020 17:20:13 +0000 (19:20 +0200)]
man: Add systemd-xdg-autostart-generator man page
Benjamin Berg [Wed, 25 Mar 2020 15:59:40 +0000 (16:59 +0100)]
xdg-autostart-generator: Add a generator for XDG autostart files
This generator can be used by desktop environments to launch autostart
applications and services. The feature is an opt-in, triggered by
xdg-desktop-autostart.target being activated.
Also included is the new binary xdg-autostart-condition. This binary is
used as an ExecCondition to test the OnlyShowIn and NotShowIn XDG
desktop file keys. These need to be evaluated against the
XDG_CURRENT_DESKTOP environment variable which may not be known at
generation time.
Co-authored-by: Henri Chain <henri.chain@enioka.com>
Zbigniew Jędrzejewski-Szmek [Tue, 26 May 2020 13:06:53 +0000 (15:06 +0200)]
core: update comment about sysv compat
We don't want people to consider that part deprecated.
Follow-up for
6589a56972.
Benjamin Berg [Fri, 22 May 2020 15:52:21 +0000 (17:52 +0200)]
sysv-generator: Downgrade directory listing fails to warning
This is not a fatal error and should therefore be a warning instead.
Frantisek Sumsal [Mon, 25 May 2020 20:48:01 +0000 (22:48 +0200)]
test: create public images by default
Let's create new images public by default and then symlink/copy them
into the respective private directories afterwards, not the other way
around. This should fix a nasty race condition in parallel runs where
one tests attempts to copy the backing public image at the same moment
another test is already modifying it.
Evgeny Vereshchagin [Tue, 26 May 2020 12:23:08 +0000 (14:23 +0200)]
fuzzit: switch to -fundefined
Now that https://github.com/systemd/systemd/issues/15907 is gone,
we can simply use "undefined" instead of listing all the possible checks
explicitly.
Frantisek Sumsal [Tue, 26 May 2020 10:57:29 +0000 (12:57 +0200)]
test: make the systemd-run calls synchronous
Otherwise we might be checking results of such calls before they even
finish, causing nasty races like:
```
[ 15.656530] testsuite-43.sh[303]: + su testuser -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID exec "$@"' -- sh systemd-run --user --unit=test-unprotected-home -P touch /home/testuser/works.txt
...
[ 15.757744] testsuite-43.sh[324]: Running as unit: test-unprotected-home.service
[ 15.775611] systemd[296]: Started /usr/bin/touch /home/testuser/works.txt.
[ 15.783597] testsuite-43.sh[303]: + test -e /home/testuser/works.txt
[ 15.787542] systemd[296]: test-unprotected-home.service: Succeeded.
...
[ 15.787684] systemd[1]: Received SIGCHLD from PID 303 (bash).
[ 15.787790] systemd[1]: Child 303 (bash) died (code=exited, status=1/FAILURE)
[ 15.787881] systemd[1]: testsuite-43.service: Child 303 belongs to testsuite-43.service.
[ 15.788040] systemd[1]: testsuite-43.service: Main process exited, code=exited, status=1/FAILURE
[ 15.788224] systemd[1]: testsuite-43.service: Failed with result 'exit-code'.
[ 15.788333] systemd[1]: testsuite-43.service: Service will not restart (restart setting)
[ 15.788421] systemd[1]: testsuite-43.service: Changed start -> failed
[ 15.788790] systemd[1]: testsuite-43.service: Job 160 testsuite-43.service/start finished, result=failed
[ 15.788995] systemd[1]: Failed to start testsuite-43.service.
```
Lennart Poettering [Mon, 25 May 2020 15:13:57 +0000 (17:13 +0200)]
efivars: log whenever an EFI variable read access is slow
This should allow us to detect slowdowns caused by EFI variable read
access a bit.
Lennart Poettering [Tue, 26 May 2020 12:46:35 +0000 (14:46 +0200)]
update TODO
Lennart Poettering [Tue, 26 May 2020 12:47:30 +0000 (14:47 +0200)]
sysv: generate warning for every SysV service lacking a native systemd unit
It's 2020, let's tighten the screws a bit and start warning about
left-over SysV services that still have no native systemd unit file.
Lennart Poettering [Tue, 26 May 2020 12:47:05 +0000 (14:47 +0200)]
sysv: use structured initialization
Lennart Poettering [Tue, 26 May 2020 12:32:03 +0000 (14:32 +0200)]
core: voidify one function return
Lennart Poettering [Tue, 26 May 2020 12:31:34 +0000 (14:31 +0200)]
core: some more structured initialization
Lennart Poettering [Tue, 26 May 2020 12:29:46 +0000 (14:29 +0200)]
core: also log about left-over processes during unit stop
Only log at LOG_INFO level, i.e. make this informational. During start
let's leave it at LOG_WARNING though.
Of course, it's ugly leaving processes around like that either in start
or in stop, but at start its more dangerous than on stop, so be tougher
there.
Lennart Poettering [Tue, 26 May 2020 12:12:56 +0000 (14:12 +0200)]
units: remove KillMode=process in our regular gettys
In our regular gettys the actual shell commands live the the session
scope anyway (as long as logind is used). Hence, let's avoid
KillMode=process, it serves no purpose and is simply unsafe since it
disables systemd's own process lifecycle management.
Lennart Poettering [Tue, 26 May 2020 12:08:09 +0000 (14:08 +0200)]
man: document that KillMode=none is a bad idea
Lennart Poettering [Tue, 26 May 2020 11:59:04 +0000 (13:59 +0200)]
core: warn if KillMode=none is used
Lennart Poettering [Tue, 26 May 2020 16:52:15 +0000 (18:52 +0200)]
gpt: include homed GPT partition type in well-known partition table
Lennart Poettering [Tue, 26 May 2020 17:20:33 +0000 (19:20 +0200)]
units: don't set PrivateNetwork= in systemd-homed.service
We want to watch USB sticks being plugged in, and that requires
AF_NETLINK to work correctly and get the host's events. But if we live
in a network namespace AF_NETLINK is disconnected too and we'll not get
the host udev events.
Fixes: #15287
Daan De Meyer [Tue, 26 May 2020 19:59:13 +0000 (21:59 +0200)]
Merge pull request #15910 from poettering/tmpfiles-pstore-tweak
tmpfiles: let's make pstore sysfs failure silent
Lennart Poettering [Tue, 26 May 2020 10:52:57 +0000 (12:52 +0200)]
tmpfiles: deal with kernel errno change if quota is not enabled
Old kernels returned EINVAL if quota was off but we tried to manipulate
it anyway. Since
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
8a36e408d40606e21cd4e2dd9601004a67b14868
this changed: now ENOTCONN is returned. This of course is a kernel API
compat breakage, but let's not make a fuss and just map EINVAL to
ENOTCONN to make it recognizable the same way everywhere.
Fixes: #15896
Lennart Poettering [Tue, 7 Apr 2020 16:46:04 +0000 (18:46 +0200)]
Revert "presets: "disable" all passive targets by default"
This reverts commit
61c3e2c8bfc28cea5b52d8643fac3d85f4c571d2.
The original commit doesn't make sense to me, none of the listed units
have an [Install] section, they hence are not subject to enable/disable
and hence not preset either. This commit hence has no effect whatsoever,
let's undo it to avoid further confusion.
Florian Klink [Sat, 23 Nov 2019 10:45:34 +0000 (11:45 +0100)]
resolved-dns-query: remove dns_query_candidate_is_routable
Resolved can't reliably determine on whether "it makes sense" to query
AAAA records when not explicitly specifying it in the request, so we
shouldn't remove them.
After having done the resolving, applications can use RFC6724 to
determine whether that address is reachable.
We can't know whether an address is reachable before having resolved it
and inspecting the routing table, and not resolving AAAA just because
there's no IPv6 default route on the main interface link them breaks
various setups, including IPv6-providing wireguard tunnels on a
non-dualstacked environment.
Fixes #5782
Fixes #5915
Fixes #8017
Daniel Fullmer [Thu, 23 Apr 2020 18:47:56 +0000 (14:47 -0400)]
sd-boot: fix menu ordering with boot counting
systemd-boot selects the last valid entry by default, not the first.
Fixes: #15256
Lennart Poettering [Tue, 26 May 2020 17:05:54 +0000 (19:05 +0200)]
update TODO
Lennart Poettering [Tue, 26 May 2020 16:29:06 +0000 (18:29 +0200)]
Merge pull request #15920 from keszybz/userwork-proc-title
Avoid log noise when setting proc titles and some doc updates
Lennart Poettering [Tue, 19 May 2020 15:48:50 +0000 (17:48 +0200)]
cryptsetup: support tmp= file system argument
Let's catch up with Debian a bit more.
This also changes the default from ext2 to ext4.
Fixes: #952
Lennart Poettering [Tue, 19 May 2020 15:48:33 +0000 (17:48 +0200)]
fstab-util: prefix return parameters with ret_
Dan Streetman [Mon, 27 Apr 2020 19:47:28 +0000 (15:47 -0400)]
test: add bridge configure-without-carrier test
Verify configure-without-carrier works, and retains configuration
across carrier losses/gains.
Dan Streetman [Mon, 27 Apr 2020 19:35:30 +0000 (15:35 -0400)]
test: expand configure-without-carrier test
The test currently doesn't actually test configure-without-carrier since
it does have carrier for the entire test. It now forces carrier down
before starting the network portion of the test. Also, it tests to verify
the configuration is retained across future carrier losses/gains.