1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00
Commit Graph

55402 Commits

Author SHA1 Message Date
Yu Watanabe
17227e81ab nss-systemd: fix required buffer size calculation
This also fixes the pointer assigned to the gr_mem element of struct group.

Fixes a bug introduced by 47fd7fa6c6.

Fixes #21935.

(cherry picked from commit 1e65eb8f9b)
2022-01-04 16:22:08 +01:00
Yu Watanabe
747b4f1ff8 sysusers: use filename if /proc is not mounted
During system install, /proc may not be mounted yet.

Fixes RHBZ#2036217 (https://bugzilla.redhat.com/show_bug.cgi?id=2036217).

(cherry picked from commit b78d7f2468)
2022-01-04 16:22:02 +01:00
Noel Kuntze
19bb2b8443 network: complete example for xfrm setup
(cherry picked from commit 0d03e672a9)
2022-01-04 16:21:56 +01:00
Luca Boccassi
b59615dc76 systemd-run: ensure error logs suggest to use '--user' when appropriate
Before:

$ systemd-run --service-type=notify --user false
Job for run-rc3fe52ee6ddd4a6eaaf1a20e0a949cdf.service failed because the control process exited with error code.
See "systemctl status run-rc3fe52ee6ddd4a6eaaf1a20e0a949cdf.service" and "journalctl -xeu run-rc3fe52ee6ddd4a6eaaf1a20e0a949cdf.service" for details.

After:

$ systemd-run --service-type=notify --user false
Job for run-r7791e380a7b6400ea01d6a0e5a458b23.service failed because the control process exited with error code.
See "systemctl --user status run-r7791e380a7b6400ea01d6a0e5a458b23.service" and "journalctl --user -xeu run-r7791e380a7b6400ea01d6a0e5a458b23.service" for details.

Fixes https://github.com/systemd/systemd/issues/21933

(cherry picked from commit 466f2351bb)
2022-01-04 16:21:55 +01:00
Luca Boccassi
0c4fe2e3dc dbus-wait-for-jobs: add extra_args to bus_wait_for_jobs_one()
And pass it through to bus_wait_for_jobs()

(cherry picked from commit 86980de64b)
2022-01-04 16:21:54 +01:00
Jan Janssen
c926189767 boot: Introduce helper macros for offset checking
This fixes a subtle sizeof overflow on 32bit machines.

(cherry picked from commit aa1d0f2587)
2022-01-04 16:21:14 +01:00
Jan Janssen
d6d97abd78 boot: Reject unaligned data
The data seems to be properly aligned in real BCD stores, so it
should be fine to just reject bad ones.

Fixes: #21917
(cherry picked from commit 1cadb35fd6)
2022-01-04 16:21:10 +01:00
Yu Watanabe
f85856c00d manager: always close idle pipe when sending ready notification
This fixes a bug introduced by 6d93265955.

The commit makes several functions skipped if the manager is already
in finished state, as
> In manager_check_finished(), more steps are skipped if MANAGER_IS_FINISHED().
> Those steps are idempotent, but no need to waste cycles trying to do them
> more than once.

However, the idle pipe may be re-opened after manager is finished:
manager_dispatch_run_queue() -> manager_watch_idle_pipe().
So, the closing the pipe is not idempotent here.

Fixes #21889.

(cherry picked from commit 9c1b17c3dc)
2022-01-04 16:18:55 +01:00
ksa678491784
202b1448aa stub: Do not assume having DeviceHandle
(cherry picked from commit 5204355861)
2022-01-04 16:18:09 +01:00
Yu Watanabe
1690672140 network: ndisc: ignore route prefix to ::/0
Fixes #21912.

(cherry picked from commit 80bfc3b901)
2022-01-04 16:18:07 +01:00
Yu Watanabe
2a9efd8513 test: add testcases of symlinked drop-in directories
(cherry picked from commit cf6562e456)
2022-01-04 16:17:30 +01:00
Yu Watanabe
f47d962bb1 unti-file: fix symlinked drop-in directory handling
This fixes a bug introduced by 95ef0eaf0d.

Fixes #21920.

(cherry picked from commit 7f304b8561)
2022-01-04 16:17:26 +01:00
Luca Boccassi
8b29809c11 core: do not touch /run/systemd/systemd-units-load from user session instances
Follow-up for: 15b9243c0d
Fixes: https://github.com/systemd/systemd/issues/21911

(cherry picked from commit 4b3ad81bfa)
2022-01-04 16:15:31 +01:00
Jan Janssen
630da18817 boot: Fix name length comparison
(cherry picked from commit 2198a77391)
2022-01-04 16:14:18 +01:00
Jan Janssen
a4e4c3377d boot: Fix off-by-one offset sanity checks
(cherry picked from commit c3c5b93a0c)
2022-01-04 16:14:18 +01:00
Jan Janssen
0c7ef2c166 boot: Fix off-by-one NUL-termination
(cherry picked from commit fab8275646)
2022-01-04 16:14:18 +01:00
Luca Boccassi
93ddabc26a chrattr-util: return EOPNOTSUPP from chrattr_full if no other failure was observed
When chattr_full tries to apply flags one-by-one, and one fails,
record which errno was returned. But record EOPNOTSUPP(&friends)
only if no other error is observed, and return it only in that case
(otherwise keep returning ENOANO), so that callers can respond
appropriately to EOPNOTSUPP vs more relevant errors.
For example, this lets tmpfiles.d log at debug level when a filesystem
flag cannot be applied because the filesystem does not support it,
but at warning level if something else went wrong when applying it.
Restores logging behaviour of tmpfiles.d to pre-250.

Follow-up for: c1631ee124

Fixes: https://github.com/systemd/systemd/issues/21901
(cherry picked from commit 7c3b51c469)
2022-01-04 16:13:27 +01:00
Mike Gilbert
4d889024ef random-util: use ssize_t for getrandom return value
This matches the prototype provided by glibc.

(cherry picked from commit 289b41aae7)
2022-01-04 16:10:10 +01:00
James Hilliard
109c67c46d meson: don't try to guess versioned clang/llvm-strip bins for cross compile
This should simplify overriding the program locations as the binary
names should now not change if cross compiling.

It's likely any attempts at autodetecting these in cross environments will
be brittle at best so lets just disable it.

(cherry picked from commit 4b7b73c714)
2022-01-04 16:09:34 +01:00
Yu Watanabe
9bcf483b11 meson: fix build with -Dcryptolib=openssl -Ddns-over-tls=false
Previously, when -Ddns-over-tls=false, libopenssl was missing in the
dependency of resolved.
Also, this drops libgpg_error when it is not necessary.

Replaces #21878.
2021-12-24 15:23:39 +00:00
Yu Watanabe
34b5684846 man: also add anotations for methods
Fixes #21882.
2021-12-24 10:18:11 +00:00
Yu Watanabe
0764e3a327 missing-syscall: define all MOUNT_ATTR_* if missing
Fixes #21876.
2021-12-24 10:12:25 +00: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