1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00
Commit Graph

57899 Commits

Author SHA1 Message Date
Daan De Meyer
c34511086f core/device: Log when we can't retrieve SYSTEMD_ALIAS property 2022-05-08 13:25:42 +02:00
Daan De Meyer
2f82874558 core/device: Log when we skip device unit creation for symlink 2022-05-08 13:25:42 +02:00
Daan De Meyer
e9222bfcfa core/device: Log if we fail to open a device
We also shorten the logic by getting rid of the validate_node()
function. An extra check is added to verify we're dealing with
a device before calling sd_device_new_from_devname() since that
will return -EINVAL if anything other than a device is passed.
2022-05-08 13:25:42 +02:00
Daan De Meyer
6cc4da5eb5 core/device: Log on every event received from udev
We already debug log on device unit state changes but additionally,
let's debug log for every event received from udev as well.
2022-05-08 13:25:39 +02:00
lucagoc
97d670a429 hwdb: add rammus accelerometer support 2022-05-08 09:09:35 +09:00
Daan De Meyer
20907e5d86 core/device: Add sysfs argument to device_process_new()
Instead of retrieving the new sysfs path in device_process_new(),
let's pass the syspath we retrieved earlier to device_process_new()
similar to how we do for other functions in core/device.c.
2022-05-07 22:16:41 +02:00
Daan De Meyer
b1ba0ce800 core/device: Use DEVICE_NOT_FOUND instead of 0.
Use the enum name instead of the value zero. This is a noop change
as DEVICE_NOT_FOUND == 0.
2022-05-07 20:05:10 +01:00
Jan Janssen
f7ae43795c boot: Fix null pointer dereference 2022-05-07 21:56:06 +09:00
Yu Watanabe
3c60643848 man: fix typo 2022-05-07 15:17:56 +09:00
Yu Watanabe
d1b8e56a62 resolve: fix false maybe-uninitialized warning 2022-05-07 15:14:41 +09:00
Yu Watanabe
388c92ce09 resolve: move the RRSIG after the all corresponding entries
Fixes #22002.
2022-05-07 15:14:41 +09:00
Yu Watanabe
71aee23dba resolve: manage DnsAnswerItem with OrderedSet
Previously, we manage DnsAnswerItem by an array and Set,
The array was used for the order of the items, and the set is used to
dedup items.
Let's use OrderedSet, then we can simplify the logic.

This fixes dns_answer_remove_by_key() and dns_answer_remove_by_rr()
which makes the set in a broken state.
2022-05-07 15:14:41 +09:00
Yu Watanabe
0bb7324c11 ordered-set: introduce ordered_set_reserve() 2022-05-07 15:14:41 +09:00
Yu Watanabe
4ce30e4de0 resolve: first increment the reference counter
When `exist->rr` and `rr` point to the same object, then it may be freed by
the `dns_resource_record_unref()`.
2022-05-07 15:14:41 +09:00
Yu Watanabe
6edf21dba7 resolve: use dns_answer_isempty() at one more place 2022-05-07 15:14:41 +09:00
Yu Watanabe
87d3b4ef3b
Merge pull request #23292 from alexhenrie/dhcpv6
network: clarify relationship between RA flags and DHCPv6 modes
2022-05-07 11:42:45 +09:00
Zbigniew Jędrzejewski-Szmek
680f2fb39d shared/json: disentangle flag mixup
_DEBUG and _RELAX had the same value… I'm not sure what the effect
of this is.
2022-05-07 11:41:57 +09:00
Alex Henrie
6e40d0e458 network: clarify the relationship between DHCP= and WithoutRA=
Just setting DHCP=ipv6 is not enough to get DHCPv6 working without RA.
The WithoutRA option must also be changed from its default of "no".
2022-05-06 14:01:53 -06:00
Alex Henrie
0bcc6557fb network: clarify the relationship between RA flags and DHCPv6 modes
In the documentation, using the term "managed" for both the RA flag and
the DHCPv6 mode is confusing because the mode is referred to as
"solicit" both in the official DHCPv6 documentation (see RFC 8415) and
in the WithoutRA option.

Furthermore, calling the other RA flag "other information" or "other
address configuration" is confusing because its official name is simply
"other configuration" (see RFC 4861 and RFC 5175) and it isn't used to
assign IP addresses.

Rewrite the documentation for DHCPv6Client and WithoutRA to make it
clear that getting the "managed" RA flag triggers the same kind of DHCP
request as WithoutRA=solicit, whereas getting the "other configuration"
RA flag triggers the same kind of DHCP request as
WithoutRA=information-request.
2022-05-06 14:01:53 -06:00
Yu Watanabe
01af366ef9
Merge pull request #23291 from yuwata/udev-rule-fix-regression
udev: fix parent token handling
2022-05-07 04:58:20 +09:00
Yu Watanabe
0139026b3e
Merge pull request #23290 from keszybz/three-fixes
Three fixes
2022-05-07 04:57:36 +09:00
Yu Watanabe
af2ff171e0
Merge pull request #23272 from keszybz/logind-man-and-rules
Logind man and rules
2022-05-07 04:23:02 +09:00
Yu Watanabe
d94802e988 test: add testcase for #23288 2022-05-07 02:51:31 +09:00
Yu Watanabe
eba782d59b udev: fix parent token handling
This fixes a bug introduced by 03677889f0.

Fixes #23288.
2022-05-07 02:51:21 +09:00
Zbigniew Jędrzejewski-Szmek
b38a9d2d77 basic/strv: fix splitting of strings with escape characters
Plain strv_split() should not care if the strings contains backslashes
or quote characters. But extract_first_word() interprets backslashes
unless EXTRACT_RETAIN_ESCAPE is given.

I wonder how it's possible that nobody noticed this before. I think this
code was introduced in 0645b83a40.
2022-05-06 18:26:30 +02:00
Zbigniew Jędrzejewski-Szmek
34c2d32cf9 shared/terminal-util: don't use $COLORTERM to force colors
Fixup for a5efbf468c: if $COLORTERM was set, we'd
unconditionally turn on colors, which is unexpected and wrong. It even breaks
our own tests when executed in gnome-terminal.
2022-05-06 18:26:26 +02:00
Yu Watanabe
ad11dd94fd README: mention kernel requirement for ambient capabilities
Closes #23231.
2022-05-06 09:33:49 +01:00
Khem Raj
0dd5ec58fa resolve: Use sockaddr pointer type for bind()
bind() expects sockaddr* but SERVER_ADDRESS is sockaddr_in type struct

Fixes errors with clang e.g.

../git/src/resolve/test-resolved-stream.c:112:32: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Werror,-Wincompatible-pointer-types]
        assert_se(bind(bindfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS)) >= 0);
                               ^~~~~~~~~~~~~~~
../git/src/resolve/test-resolved-stream.c:251:39: error: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Werror,-Wincompatible-pointer-types]
                r = connect(clientfd, &SERVER_ADDRESS, sizeof(SERVER_ADDRESS));

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-05-06 17:29:59 +09:00
Thomas Weißschuh
15d4c239f4 userdbctl: initialize parameter n for uid_range_load_userns()
uid_range_load_userns() dereferences the n parameter.

Passing unitialized memory may lead to crashes, for example with version
251rc2-1 on ArchLinux.
2022-05-06 13:48:51 +09:00
Zbigniew Jędrzejewski-Szmek
e447f9ac0b docs/RELEASE: typo in target name 2022-05-05 19:49:26 +02:00
Zbigniew Jędrzejewski-Szmek
e654d4316c
Merge pull request #23277 from keszybz/news-and-hwdb-update
News and hwdb update
2022-05-05 19:02:49 +02:00
Zbigniew Jędrzejewski-Szmek
9aa3d6b41e Revert "shared/install: create relative symlinks for enablement and aliasing"
This reverts commit d6c9411072.

I still think this is something that needs to be done, but we're hitting some
unexplained failures, e.g. https://github.com/systemd/systemd/issues/22920.
So let's revert this for now, so -rc2 can be released, with a plan to return
to this after a release.

Closes #22920.
2022-05-05 19:02:26 +02:00
Jakob Lell
14736ab6ff Amend documentation for LimitNPROC= 2022-05-05 18:04:54 +02:00
Daan De Meyer
5517607ad7 journal: Make journal_default_metrics() static
Only caller resides in the same file as were it's defined so no
need to have it be public.
2022-05-05 16:32:24 +02:00
Zbigniew Jędrzejewski-Szmek
7000a8c3bc
Merge pull request #23273 from keszybz/bootctl-quiet
bootctl --quiet and --graceful
2022-05-05 16:30:53 +02:00
Zbigniew Jędrzejewski-Szmek
da2f26b2cb hwdb: run "update-hwdb" 2022-05-05 16:28:46 +02:00
Zbigniew Jędrzejewski-Szmek
211b564a32 NEWS: update with final changes 2022-05-05 16:28:46 +02:00
Andreas Rammhold
66c38cd053 core: handle lookup paths being symlinks
With a recent change paths leaving the statically known lookup paths would be
treated differently then those that remained within those. That was done
(AFAIK) to consistently handle alias names. Unfortunately that means that on
some distributions, especially those where /etc/ consists mostly of symlinks,
would trigger that new detection for every single unit in /etc/systemd/system.
The reason for that is that the units directory itself is already a symlink.

Rebased-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
2022-05-05 14:46:52 +02:00
Zbigniew Jędrzejewski-Szmek
14e6e444dd bootctl: add --quiet
It's useful for installation scripts and suchlike.
Raised in https://bugzilla.redhat.com/show_bug.cgi?id=2079784#c9.
2022-05-05 12:30:06 +02:00
Zbigniew Jędrzejewski-Szmek
18eb56c3c0 bootctl: support --graceful in is-installed 2022-05-05 12:30:06 +02:00
Zbigniew Jędrzejewski-Szmek
e8a5b13e45 meson: move vconsole rules to rules.d/ 2022-05-05 11:51:44 +02:00
Zbigniew Jędrzejewski-Szmek
155078c835 meson: move udev rules to rules.d/ 2022-05-05 11:51:44 +02:00
Zbigniew Jędrzejewski-Szmek
4a5f779f0e TODO: add entry about boot entries on the bus
Something like this is needed to allow integration with graphical envs and
fully unprivileged operation.
2022-05-05 11:51:44 +02:00
Zbigniew Jędrzejewski-Szmek
e4239a34d7 man: deduplicate dbus versioning ref 2022-05-05 11:48:22 +02:00
Zbigniew Jędrzejewski-Szmek
01942823ae man: beef up o.fd.login1 page a bit and recommend busctl too
gdbus is an external program, so it makes sense to recommend busctl.
2022-05-05 11:48:22 +02:00
Lennart Poettering
a8796773b0 update TODO 2022-05-05 10:55:18 +02:00
Sonali Srivastava
a5efbf468c terminal-util: get_color_mode checks COLORTERM 2022-05-05 09:18:51 +02:00
Evgeny Vereshchagin
51cef2b56f
Merge pull request #23246 from medhefgo/check-compilation
meson: Improve public header tests
2022-05-05 01:53:28 +03:00
Daan De Meyer
746ea80b77 basic: Add some missing headers to compress.h 2022-05-04 22:47:58 +01:00
Matthijs van Duin
b0221bb6a4 Fix placement of TTL TLV in LLDP transmit
The LLDP spec (IEEE 802.1AB) requires the three mandatory TLVs (Chassis
ID, Port ID, and TTL) to be the first three TLVs in the packet, in that
specific order, whereas systemd put the TTL near the end of the packet.

This violation caused the ethernet switch in our office to discard these
packets as malformed, and Wireshark's packet parser also chokes on them.
2022-05-05 01:19:02 +09:00