Commit Graph
58862 Commits
Author SHA1 Message Date
Rudi Heitbaum 3657d3a01c glibc: Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36 2022-07-24 20:52:35 +09:00
Yu Watanabe 7c35b78a0b unit-file: avoid (null) in debugging logs
The variable `inst` was set to NULL by TAKE_PTR().

This fixes the following log message:
```
systemd[1]: Unit getty@tty2.service has alias (null).
```
2022-07-24 20:51:27 +09:00
Yu Watanabe 978642b633 Merge pull request #24020 from yuwata/network-rfkill
network: fix wlan interface handling when its RF is killed
2022-07-24 13:01:50 +09:00
Yu Watanabe cd331a6d51 Merge pull request #23828 from yuwata/nfnl-cleanups
sd-netlink: several cleanups for netfilter
2022-07-24 13:01:28 +09:00
Yu Watanabe 573bb24df7 sd-netlink: introduce sd_nfnl_{send,call}_batch()
This also introduces sd_nfnl_message_new() which can be also used for
non-nftables subsystems.
2022-07-24 00:16:21 +09:00
Yu Watanabe 04d2003718 sd-netlink: do not compare pointer with 0 2022-07-24 00:05:32 +09:00
Yu Watanabe 665bc9e6e2 firewall-util: introduce nfnl_close_expr_container() helper function
And merge nfnl_add_expr_lookup_set() and nfnl_add_expr_lookup_map().
2022-07-24 00:05:32 +09:00
Yu Watanabe df7371708e sd-netlink: merge sd_nfnl_nft_message_{new,del}_setelems_begin()
And this makes the new merged function `sd_nfnl_nft_message_new_setelems()`
not open container, as containers should be opened and closed in the
same function in general. Otherwise, it is hard to understand which
level we are in the nested attribute tree.
2022-07-24 00:05:09 +09:00
Yu Watanabe 9d884ac36d sd-netlink: drop unused sd_nfnl_nft_message_del_table() 2022-07-23 23:52:42 +09:00
Yu Watanabe 2c08455eed sd-netlink: introduce sd_netlink_message_append_container_data() 2022-07-23 23:52:42 +09:00
Yu Watanabe 64f090a61a sd-netlink: several cleanups for netfilter
- rename family -> nfproto, and other arguments,
- check specified nfproto,
- change type of several function arguments that specify data length,
- add several assertions,
- drop unnecessary headers.
2022-07-23 23:52:42 +09:00
Yu Watanabe 35cca046cf firewall-util: drop unnecessary string attribute
As `sd_netlink_message_open_container_union()` also appends the string
attribute.
2022-07-23 23:52:42 +09:00
Yu Watanabe 295942cb46 firewall-util-nft: various cleanups
- add missing assertions,
- align enum elements,
- use cleanup attribute, and so on.
2022-07-23 23:52:35 +09:00
Yu Watanabe 8547260579 tree-wide: drop unnecessary inclusion of netlink-util.h 2022-07-23 23:31:23 +09:00
Yu Watanabe 13c026ca83 sd-netlink: move rtnl_message_type_is_*() to netlink-message-rtnl.c 2022-07-23 23:31:23 +09:00
Yu Watanabe a9d2d037ee network: do not try to bring up wifi interface if rfkill is active
This fixes the following error:
---
systemd-networkd[465]: wlan0: Could not bring up interface: Operation not possible due to RF-kill
---

Fixes #23649.
2022-07-23 20:55:03 +09:00
Yu Watanabe 8642e04b78 network: also assign rfkill device to Wiphy object
Preparation for later commits.
2022-07-23 20:55:03 +09:00
Yu Watanabe c49d536295 network: assign corresponding sd-device object to Wiphy object
As an analogy for Link object, let's each Wiphy object has the
corresponding sd-device object. The sd-device object will be used in
later commits.
2022-07-23 20:55:02 +09:00
Yu Watanabe fc85b32302 network: set wiphy name in wiphy_new()
Then, we can assume all Wiphy objects managed by Manager has both valid
index and name.
2022-07-23 20:53:06 +09:00
Yu Watanabe 71cdfe16aa network: add TODO about interface renaming 2022-07-23 20:04:28 +09:00
Yu Watanabe 75255a8d43 network: unref sd-device object assigned to Link on remove uevent
Otherwise, outdated device information may be used in a short timespan.
2022-07-23 20:04:28 +09:00
Yu Watanabe 1fd3ac1eef network: introduce a tiny wrapper for manager_udev_process_link()
Preparation for later commits.
2022-07-23 20:04:22 +09:00
Yu Watanabe 8de56fb3e0 network: rename Link.sd_device -> Link.dev 2022-07-23 20:00:44 +09:00
codefiles 5e81e84c86 man: Fix typo 2022-07-23 11:18:23 +09:00
Yu Watanabe 853188db90 network: use device_unref_and_replace() 2022-07-23 08:17:43 +09:00
Yu Watanabe d6985e76f2 sd-device: introduce device_unref_and_replace() 2022-07-23 08:16:38 +09:00
Yu Watanabe 5eb83e9000 sd-device: introduce device_clear_sysattr_cache() 2022-07-23 08:11:36 +09:00
Yu Watanabe 2829fca249 sd-device: introduce device_get_sysattr_bool() 2022-07-23 08:11:36 +09:00
Yu Watanabe b05e52000b network: do not silently stop to process configuration on activation failure
Previously, if activation failed, link did not enter the failed state,
but still Link.activated flag not set. Hence, nothing processed even if
the interface is manually brought up later.

Partially fixes #23649.
2022-07-23 08:11:36 +09:00
Yu Watanabe c9fbe0bd10 Merge pull request #24074 from yuwata/network-dhcp6-rapid-commit
network: dhcp6: re-introduce RapidCommit= setting
2022-07-23 08:10:01 +09:00
Zbigniew Jędrzejewski-Szmek df1cbd1adf manager: limit access to private dbus socket
For the system manager, /run/systemd/private is publicly accessible, because
/run/systemd is 0755, and /run/systemd/private is 0777. For the user manager,
/run/user/<uid> is 0700, and /run/user/<uid>/systemd/private is 0777. This
does not directly cause any security issue because we check the sender in
bus_check_peercred (ucred.uid != 0 && ucred.uid != geteuid()).

But it makes sense to limit access to the socket to avoid wasting time in PID1.
Somebody could send messages there that'd we'd reject anyway. It also makes
things more explicit.
2022-07-23 08:08:49 +09:00
Zbigniew Jędrzejewski-Szmek 35a926777e tests: add a simple test that checks what fexecve_or_execve does
This can be easily used to show that the issue described in
ceedbf8185 is still reproduced:

$ strace -e execveat build/test-execve /bin/grep Name /proc/self/status
execveat(3, "", ["/bin/grep", "Name", "/proc/self/status"], NULL, AT_EMPTY_PATH) = 0
Name:	3
2022-07-23 07:13:30 +09:00
Andrey Albershteyn 704116c976 udev: enable BLKID_SUBLKS_FSINFO tags
libblkid gained new tags - FSSIZE, FSLASTBLOCK and FSBLOCKSIZE.
These tags are filesystem related properties probed from superblock.
All of them are enabled by BLKID_SUBLKS_FSINFO flag.

Set the flag to allow these tags to be cached in udev db.
2022-07-22 22:08:47 +02:00
Yu Watanabe 8015e25870 test: wait for user service or slice to be finished
Hopefully fixes #24040.
2022-07-22 19:47:09 +00:00
Luca Boccassi aafcc8601b Merge pull request #24084 from pothos/mask-sysext-docs
man: Sysext docs improvements
2022-07-22 20:02:07 +01:00
Kai Lueke 0ad7b7b809 man: Use correct target type for sysupdate entry
While Type=file works because it seems to be the default, the line gets
ignored as printed on the stderr output.
Use the correct value "regular-file" for the target type.
2022-07-22 20:00:08 +01:00
Lennart Poettering b98445cd7c TODO/NEWS: write down that we intend to remove cgroupsv1 support by EOY 2023
After discussions here:

https://lists.freedesktop.org/archives/systemd-devel/2022-July/thread.html

EOY 2023 is apparently what people can agree with, hence let formalize
this in the TODO list, so we don't forget.
2022-07-22 19:59:36 +01:00
Kai Lueke 519c2f0d6b man: Document mask workaround for sysext images
A read-only /usr may ship a sysext image by default and the user wants
to opt out. Currently it's not clear how to do this.
Document that a /dev/null symlink in /etc/extensions/ works to "mask" a
sysext image in a folder with lower precedence.
2022-07-22 15:09:21 +02:00
Kai Lueke 566e4b3a19 man: Do not recommend to overlay files with sysext even if possible
While overlaying files with a sysext can be useful, it may lead to
unexpected problems depending on when a process got started and which
version of the file it gets.
Call out that overlaying files is possible but don't recommend to make
use of it.
2022-07-22 15:03:12 +02:00
Yu Watanabe 91a7afdeae test-network: add tests for RapidCommit= 2022-07-22 21:28:24 +09:00
Yu Watanabe 50ee1fec3a network: dhcp6: re-introduce RapidCommit= setting
Previous implementation of disabling rapid commit was broken, and
dropped by 308d01f3c4.

Let's re-introduce the option in the correct way, as some servers seem
to return borked message when the solicit message contain the rapid
commit option.

Closes #24065.
2022-07-22 21:28:20 +09:00
Yu Watanabe 4397967f8c sd-dhcp6-client: introduce sd_dhcp6_client_set_rapid_commit() 2022-07-22 21:26:44 +09:00
Ulrich Ölmann aa386add67 man: document udevadm lock's exit code 2022-07-22 20:04:14 +09:00
Frantisek Sumsal b23cf5eae4 Merge pull request #24073 from yuwata/test-network
test-network: do not stop/restart udevd and relevant sockets
2022-07-22 07:31:14 +00:00
Yu Watanabe b1eaae53a2 test-network: drop unnecessary call of systemctl
As the units are not started at that stage.
2022-07-22 10:36:00 +09:00
Yu Watanabe 249b7eccf7 test-network: drop unnecessary default argument 2022-07-22 10:34:33 +09:00
Yu Watanabe 87b308c825 test-network: do not stop/restart udevd and related socket units
That's not necessary. Moreover, if the socket units are stopped in
`setUpModule()`, then there exists a short timespan that we cannot call
`udevadm control`, as the control socket may not be opened yet.

If we run whole tests, then the first test is
NetworkctlTests.test_altname, and it calls `udevadm control` in `setUp()`.
Hence, the test may fail.

Fixes https://github.com/systemd/systemd-centos-ci/pull/512#issuecomment-1191591008.
2022-07-22 10:31:38 +09:00
Luca Boccassi 8d0c34f367 Merge pull request #24014 from poettering/tmpfiles-extra-creds
tmpfiles: accept additional tmpfiles lines via credential
2022-07-21 11:55:43 +01:00
Lennart Poettering 3e9b77dea4 Merge pull request #23986 from poettering/cache-selinux-unit-labels
selinux: make selinux access checks based on unit file contexts read at unit load time
2022-07-21 10:24:51 +02:00
Alexander Wilson 64b634fbc6 coredumpctl: Use BusLocator functions 2022-07-21 09:50:47 +02:00