Commit Graph

61929 Commits

Author SHA1 Message Date
Yu Watanabe
f95fb19922 network: introduce QuickAck= for [DHCPv4] and [IPv6AcceptRA]
Closes #25906.
2023-01-16 14:40:22 +09:00
Daan De Meyer
67b65ac62d ukify: Fix version string
Let's make sure we mimick the version of our other CLI tooling.
2023-01-15 22:17:37 +00:00
Luca Boccassi
f86d037623 docs/man: remove reference to default vsock CID
This was dropped on reviewers' request in the revision that got merged,
but reference in two documents was not updated. Fix it.

Follow-up for: https://github.com/systemd/systemd/pull/25918
2023-01-15 22:17:15 +00:00
Ulrich Ölmann
3d16448758 man: libudev: fix typo 2023-01-15 17:19:10 +00:00
Yu Watanabe
2cbb171d20 busctl: fix introspecting DBus properties
Follow-up for f2f7785d7a.

Fixes #26033.
2023-01-15 15:39:46 +00:00
Frantisek Sumsal
fc2a0bc05e test: support a non-default SysV directory
Since the directory is configurable via -Dsysvinit-path= during build,
it makes the test fail on Fedora/RHEL/CentOS, where it's set to
/etc/rc.d/init.d, instead of the default /etc/init.d. Since we can't get
the value at runtime (in a reasonable manner), let's just support the
two most common paths for now.

Follow up to 7fcf0fab07.
2023-01-14 09:50:43 +09:00
Daan De Meyer
85e2e80699 open-file: Fix user-after-free 2023-01-13 17:14:23 +01:00
Yu Watanabe
d59ce37c28 Merge pull request #26047 from yuwata/udev-node-cleanups
udev: several cleanups
2023-01-13 14:46:58 +09:00
Franck Bui
6d90488acb udev: simplify a bit stack_directory_find_prioritized_devnode()
And make the new format the one we expect as it should replace the old one
pretty quickly.
2023-01-13 12:06:00 +09:00
Franck Bui
e8a54a4e75 udev: return ENODEV if link_directory_read_one() can't find the devnode
That's usually the errno code we return when a device cannot be found because
it's been unplugged.
2023-01-13 11:22:31 +09:00
Franck Bui
72a459adc4 udev: let stack_directory_open() convert a slink into a dirname itself
We likely always want to open the directory via a slink.

There's currently only one caller so it doesn't make any difference in practice
but I think it's still nicer.

No functional change.
2023-01-13 11:16:14 +09:00
Franck Bui
c9032f910c udev: merge link_directory_lock() into link_directory_open()
These 2 operations are inseparable.
2023-01-13 11:16:10 +09:00
Ludwig Nussel
e443cc7c05 bootspec: show efi entry too 2023-01-13 10:50:18 +09:00
Frantisek Sumsal
7fcf0fab07 test: explicitly create the /etc/init.d directory
On RHEL/CentOS/Fedora this directory is provided by the chkconfig or
initscripts package, which might not be installed:

testsuite-26.sh[1225]: + [[ -x /usr/lib/systemd/system-generators/systemd-sysv-generator ]]
testsuite-26.sh[1225]: + cat
testsuite-26.sh[2330]: /usr/lib/systemd/tests/testdata/units/testsuite-26.sh: line 299: /etc/init.d/issue-24990: No such file or directory

Follow-up to 5f882cc3ab.
2023-01-13 10:48:40 +09:00
Michal Koutný
b7a41491ed cgroup: Do not emit compat message without memory limit
Previously mere MemoryLow= directive would lead to emitting the compat
message 'Applying MemoryMax=18446744073709551615 as MemoryLimit=' even
though it carries little information.
2023-01-13 10:48:03 +09:00
Daan De Meyer
5228c58ebe dissect-image: Notify btrfs when we're done using a loop device
Let's explicitly let btrfs know when we're done using a loop device.
Otherwise, btrfs will keep the device UUID cached which will result
in mount() failures if we ever generate a device or filesystem with
the same UUID again.
2023-01-12 16:36:09 +01:00
Daan De Meyer
da2a4f6a2e ci: Fix PR labeling
Make sure we only add labels to open pull request and remove labels
from closed pull requests.
2023-01-12 11:42:16 +01:00
Zbigniew Jędrzejewski-Szmek
2c281e6db5 Merge pull request #25661 from yuwata/systemctl-suppress-warning
systemctl: suppress warning about missing /proc/ when --no-warn
2023-01-12 08:41:05 +01:00
Daan De Meyer
a2640646f1 network: Show network and link file dropins in networkctl status
Fixes #24428
2023-01-12 13:44:52 +09:00
Alvin Šipraga
9c5b8d46e5 network: fix race between RTM_NEWLINK and NL82011_CMD_NEW_INTERFACE
When a new wireless network interface is created by the kernel, it emits
both RTM_NEWLINK and NL80211_CMD_NEW_INTERFACE. These events can arrive
in either order and networkd must behave correctly in both cases.

The typical case is that RTM_NEWLINK is handled first, in which case
networkd creates a Link object and starts tracking it. When the
NL80211_CMD_NEW_INTERFACE message is handled, networkd then populates
the Link object with relevant wireless properties such as wireless
interface type (managed, AP, etc.).

In the event that the order is reversed however, networkd will fail to
populate these wireless properties because at the time of processing the
nl80211 message, the link is considered unknown. In that case, a debug
message is emitted:

  systemd-networkd[467]: nl80211: received new_interface(7) message for link '109' we don't know about, ignoring.

This is problematic because after the subsequent RTM_NEWLINK message,
networkd will have an incomplete view of the link. In particular, if a
.network configuration matches on some of the missing wireless
properties, such as WLANInterfaceType=, then it will never match.

The above race can be reproduced by using the mac80211_hwsim driver.
Suppose that there exists a .network configuration:

  [Match]
  WLANInterfaceType=ap
  ...

Now loop the creation/destruction of such an AP interface:

  while true
  do
    iw dev wlan0 interface add uap0 type __ap
    iw dev uap0 del
  done

The above debug message from networkd will then be observed very
quickly. And in that event, the .network file will fail to match.

To address the above race, have the nl80211 message handler store the
interface index in a set in case a Link object is not found on
NL80211_CMD_NEW_INTERFACE. The handler for RTM_NEWLINK can then query
this set, and explicitly request the wireless properties from nl80211
upon the creation of the Link object.
2023-01-12 13:28:36 +09:00
chris
ea57796854 optionally set socket priority on DHCPv4 raw socket 2023-01-12 13:26:47 +09:00
Yu Watanabe
93b0ec8bc5 shell-completion: systemctl: add --no-warn 2023-01-12 11:51:19 +09:00
Yu Watanabe
91dfb74ef5 systemctl: suppress warning about missing /proc/ when --no-warn
Follow-up for 0f958c8d4f.

systemctl is called many times by dnf or so, and missing /proc/ is not
a user's fault, but package manager's issue.
With this commit, we can suppress the warning by updating rpm macros if
necessary.
2023-01-12 11:50:41 +09:00
Luca Boccassi
c24b0bd1df Merge pull request #26023 from keszybz/man-page-updates
Man page updates
2023-01-11 23:05:27 +00:00
Jan Engelhardt
41fca8686f coredump: re-document raised default dump sizes
Commit v250-767-ge677041e7a updated the built-in configuration, but
missed the accompanying documentation.
2023-01-11 18:14:58 +01:00