1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00
Commit Graph

55337 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
b36c5e9587 various: fix three spelling issues found by fossies 2022-01-03 21:16:06 +01:00
Zbigniew Jędrzejewski-Szmek
df1f621bda docs: update branch names
Also use --atomic when pushing multiple items with git;
adjust some external URLs.
2022-01-03 21:15:21 +01:00
Zbigniew Jędrzejewski-Szmek
3c7af1af7d basic: adjust wording and wrapping of comments 2022-01-03 19:18:55 +01:00
Zbigniew Jędrzejewski-Szmek
606309d554 test-bpf-lsm: drop some parens 2022-01-03 19:18:55 +01:00
Zbigniew Jędrzejewski-Szmek
333cf6c6ae test-job-type: modernize code a bit 2022-01-03 19:18:55 +01:00
Zbigniew Jędrzejewski-Szmek
b7cba81553 core/bpf: tighten handling of return values, improve messages
The code was written unidiomatically, using r as a boolean value, and
confusing errno and r in some places. AFAICS, there wasn't any actual
problem: even in the one place where errno was used instead of r, it would
almost certainly be initialized.

It seems that some libbpf functions set errno, while others return the
error, possibly encoded. Since there are almost no docs, the only way to
know is to read the code of the function. To make matters worse, there is
a global libbpf_mode which can be set to change the convention. With
LIBBPF_STRICT_DIRECT_ERRS in libbpf_mode, some functions set errno while others
return a negative error, and the only way to know is to read the code, except
that the split is now different. We currently don't set
LIBBPF_STRICT_DIRECT_ERRS, but even the possibility makes everything harder
to grok.

This is all very error-prone. Let's at least add some asserts to make sure that
the returned values are as expected.
2022-01-03 19:18:55 +01:00
Zbigniew Jędrzejewski-Szmek
92698b0f9e core/bpf: avoid unnecessary initialization of variables, tighten scope
No funtional change.
2022-01-03 19:18:55 +01:00
Zbigniew Jędrzejewski-Szmek
a420d71793 NEWS: finalize release 2021-12-23 21:09:35 +01:00
Yu Watanabe
558ad6bd38
analyze: fix segfault when malloc() fails (#21874)
Fixes #21872.

log_syntax_callback sets 's', a.k.a. '*userdata', to POINTER_MAX to signal allocation failure.
If the error does not cause immediate failure of the program, and log_syntax_callback is called
again, it would try to use 's' as a pointer to a set and fail badly.
2021-12-23 21:03:16 +01:00
Zbigniew Jędrzejewski-Szmek
10c8c32f13
Merge pull request #21869 from yuwata/sd-journal-fix-segfault
sd-journal: fix segfault
2021-12-23 20:07:41 +01:00
Luca Boccassi
a5016a0ace
Merge pull request #21870 from keszybz/cleanup-and-comments
Use _cleanup_ and adjust comments
2021-12-23 17:43:37 +00:00
Zbigniew Jędrzejewski-Szmek
90c8234e0c src/basic: adjust grammar in comments 2021-12-23 13:49:43 +01:00
Zbigniew Jędrzejewski-Szmek
a49a3564b5 shared: re-wrap comment 2021-12-23 13:49:12 +01:00
Zbigniew Jędrzejewski-Szmek
68cdeab343 hostname: use _cleanup_ in one more place 2021-12-23 13:49:12 +01:00
Yu Watanabe
39dfc0de05 sd-journal: fix segfault when match_new() fails
Fixes #21867.
2021-12-23 21:45:32 +09:00
Yu Watanabe
418cce628c sd-journal: free incomplete match on failure 2021-12-23 21:35:29 +09:00
Zbigniew Jędrzejewski-Szmek
8d48a86c1d
Merge pull request #21866 from yuwata/update-hwdb-and-news-v250
Update hwdb and news for v250
2021-12-23 13:30:26 +01:00
Jan Janssen
e628944b11 boot: Use correct handle to find TextInputEx protocol
LibLocateProtocol will return the protocol for the first device that
supports it. But it may not actually come from the ConIn device that
we want to use here.

This should be the root cause of what was previously considered just
broken firmware. If you ask the wrong device to return some key, of
course it will never provide one.

This changes the way we handle input yet again in light of this new
knowledge and because using the correct TextInputEx with fallback to
ConIn can actually create double input in some cases.

Since we are now confident that we get the right TextInputEx, we can
use that exclusively, only falling back to ConIn if the console input
device does not support the better interface (the spec is pretty clear
that it must support it, though).

Because some firmware is broken, we still need to provide a fallback
to the previously used TextInputEx thats overrides ConIn/ConInEx if
it is functional.
2021-12-23 12:39:48 +01:00
Yu Watanabe
6e6dc09544 NEWS: update contributors list and release date 2021-12-23 19:54:07 +09:00
Yu Watanabe
4b6b9d3060 hwdb: update hwdb for v250-final
Generated by `meson compile -C build update-hwdb update-hwdb-autosuspend`.
2021-12-23 19:53:59 +09:00
Ludwig Nussel
a9c97bbbfb machined: set TTYPath for container shell
TTYPath is needed for proper utmp registration of the shell to
receive wall messages.
2021-12-23 11:27:56 +01:00
Yu Watanabe
add469f5a9 man: reindent and rebreak systemd.network
Also fixes the following:
- IPServiceType= is moved to [DHCPv4] section,
- drop an incorrect sentence in RouteMTUBytes= in [DHCPv4] section.
- drop unnecessary word 'unsigned'.
2021-12-23 11:26:18 +01:00
Yu Watanabe
8f7a0fcbec meson: fix typo 2021-12-23 17:01:55 +09:00
Luca Boccassi
741c4c8da9 analyze: do not connect to DBUS with --offline
Co-authored-by: Lucas Werkmeister <mail@lucaswerkmeister.de>
2021-12-23 09:44:42 +09:00
Luca Boccassi
743814d7a2
Merge pull request #21858 from yuwata/fix-test-home
test: workaround for TEST-46-HOMED
2021-12-22 16:14:53 +00:00
Jan Janssen
2ef28d054d boot: Use -fvisibility=hidden instead of -fwhole-program
It's functionally the same for sd-boot, but using visibilty
is generally preferred over whole-program.
2021-12-23 00:26:25 +09:00
Evgeny Vereshchagin
d2c3f14fed meson: make it compatible with AFL and honggfuzz again
afl-clang and hufzz-clang try to instrument the code and the
underlying compilers don't like it. It should probably be
fixed in both afl and honggfuzz eventually but until then
let's just use "raw" clang to build bpf-skeletons.

It's a follow-up to https://github.com/systemd/systemd/pull/21607
2021-12-22 15:03:18 +00:00
Yu Watanabe
de27f4c8b8 test: wait for user inactive
The user may be busy when auto-rebalancing the user's home device.

Workaround for #21589.

---
Dec 01 15:03:15 H systemd-homework[1078]: Provided password unlocks user record.
Dec 01 15:03:15 H systemd-homework[1078]: Image file '/home/test-user.home' already locked, can't use.
Dec 01 15:03:15 H systemd-homed[240]: Worker reported error code EADDRINUSE.
Dec 01 15:03:15 H systemd-homed[240]: Activation failed: Address already in use
---
2021-12-22 17:30:10 +09:00
Yu Watanabe
a75a4148a8 test: remove test-user2
Otherwise, we cannot run the test multiple times.
2021-12-22 17:30:03 +09:00
Yu Watanabe
367649ee66 home: update log message
The ratelimit hits even when the all previous attempts are successfull.
2021-12-22 17:29:30 +09:00
Yu Watanabe
a9cab9f5cf
Merge pull request #21848 from yuwata/errno-name-drop-aliases
errno-name: drop aliases defined for specific arch
2021-12-22 17:27:12 +09:00
Yu Watanabe
5bdeedb342 test: add test for errno-list.[ch] 2021-12-22 15:29:55 +09:00
Yu Watanabe
95d88436ea errno-name: drop aliases defined for specific arch
In kernel's arch/parisc/include/uapi/asm/errno.h, ECANCELLED and
EREFUSED are defined as aliases of ECANCELED and ECONNREFUSED,
respectively. Let's drop them.

Fixes #21844.
2021-12-22 15:29:55 +09:00
Yu Watanabe
c99d5efc2d
Merge pull request #21857 from loongarch64/dev-pr1
LoongArch: dmi, virt detection and testcase
2021-12-22 15:20:20 +09:00
Jan Janssen
a3aff1c47f test,static-destruct: Use retain attribute to prevent linker garbage collection
Fixes: #21847
2021-12-22 12:14:08 +09:00
Xiaotian Wu
646b01121a test: add LoongArch 64bit testcase 2021-12-22 11:07:56 +08:00
Xiaotian Wu
eebbd595f0 virt: add detection for LoongArch 64bit 2021-12-22 11:07:55 +08:00
Xiaotian Wu
ff6d286902 dmi: add LoongArch 64bit support 2021-12-22 11:07:54 +08:00
Frantisek Sumsal
8470a16d6f test: tweak TriggerLimitIntervalSec= if we're running w/o KVM as well
since in that case we might be also slow enough to miss the rate-limit
window. However, let's not set the trigger limit unconditionally to
still have coverage for the unaltered path unit (but without sacrificing
CI stability).

See: https://github.com/systemd/systemd/pull/21808#issuecomment-998927401
2021-12-22 08:56:20 +09:00
Jan Janssen
e67e6691e5 boot: Fix armhf build failure
Fixes: #21842
2021-12-21 16:34:51 +00:00
Yu Watanabe
3112d756a3 meson: fix cross compiling 2021-12-21 14:19:00 +00:00
Daan De Meyer
9519b41e52 shared: Remove remaining usages of GPT_ROOT_NATIVE, GPT_USR_NATIVE from dissect-image.c
Follow-up for 49ae9d91f9

Fixes #21843
2021-12-21 13:47:07 +00:00
Scott Worley
77ec2816c6 timedatectl: Uniform commas in NTPMessage output 2021-12-21 09:46:19 +09:00
Frantisek Sumsal
2cb726adf5 test: tweak the path trigger limit a bit when collecting coverage
Basically the same thing as in e70103e, but for TEST-63. Uses
directives introduced by 47dba9f.

Follow-up to aaae822.
2021-12-20 22:05:14 +00:00
Zbigniew Jędrzejewski-Szmek
28be02e005 NEWS: add missing noun 2021-12-20 19:39:35 +01:00
Yu Watanabe
a2482eb290
Merge pull request #21839 from yuwata/repart-issue-reproducer-21817
test: add test case for #21817
2021-12-21 02:30:53 +09:00
Daan De Meyer
94c5a83c6e journal: Handle partially read HashItem's when punching holes 2021-12-21 02:29:57 +09:00
Zbigniew Jędrzejewski-Szmek
8ef114c692 nss-resolve: expose various source-disablement settings as variables
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2006761:
> systemd-resolved always (reverse)-resolves the host's IP addresses and FQDN.
> This can be harmful when an application (for instance, a DNS zone manager) is
> installed on the same server instance.  That application would expect
> NXDOMAIN to be returned if the current server's IP does not belong in an
> already managed reverse zone.

This allows clients of nss-resolve to use the same config options that are
available through the dbus api and as command-line options to resolvectl.

The man page text is is mostly copied directly from
c6f20515ab.
2021-12-21 02:28:52 +09:00
Yu Watanabe
71bb604807 test: add a test case for issue #21817 2021-12-21 00:28:39 +09:00
Yu Watanabe
92ecc87512 test: install losetup by default
Preparation for the next commit.
2021-12-20 23:34:27 +09:00