1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

56353 Commits

Author SHA1 Message Date
Yu Watanabe
0234f0c053 resolve: refuse AF_UNSPEC when resolving address
Fixes #22480.
2022-02-17 13:24:01 +01:00
Yu Watanabe
bfae960e53
Merge pull request #22535 from poettering/dbusctl-range-display
userdbctl: show UID ranges in output too
2022-02-17 16:45:39 +09:00
Yu Watanabe
9e0cb8b61f sd-dhcp-server: do not offer server address
The server address may be in the pool.
2022-02-17 16:45:10 +09:00
Yu Watanabe
30778ead7a
Merge pull request #22543 from poettering/logind-fix-bus-bool-prop
logind: fix some sd-bus int/bool/unsigned mixups
2022-02-17 16:44:51 +09:00
Lennart Poettering
3d643eda0d userdbctl: add a dash of color to users of different dispositions 2022-02-16 23:14:27 +01:00
Lennart Poettering
b9fd7f5cb3 userdbctl: show min/max UID boundaries in userdbctl output 2022-02-16 23:14:27 +01:00
Lennart Poettering
0db7e17cba logind: fix bool/int confusion for KillUserProcesses bus property
sd-bus for compat with old C expects "int" for booleans. Internally we
prefer to use C99 "bool" however. When pointing a pointer to it, we need
to handle the fact that they are typically differently sized, hence use
te right accessors for it.
2022-02-16 22:58:19 +01:00
Lennart Poettering
81bb3ca13c logind: fix internal types used for EnableWallMessages
The value is used as a boolean, but stored in an unsigned. It's exposed
with sd-bus default boolean handling which however expects a (signed)
int. Let's clear this up, and use "bool" for this everywhere in
non-local scope, and make sure that when we pass it to sd-bus we
properly pass an "int".
2022-02-16 22:56:47 +01:00
Lennart Poettering
76ef5d0493 user-util: move homed/nspawn map UID_MIN/UID_MAX define into user-util.h
Let's have them at a common place, so that we have the ranges altogether
at a minimal set of places.
2022-02-16 22:40:06 +01:00
Lennart Poettering
fc03e80c6b glyph-util: add new glyphs for up/down arrows 2022-02-16 22:40:06 +01:00
Lennart Poettering
3414394e0b
Merge pull request #22531 from poettering/mempcpy-cocci
coccinelle: add semantic patch for using more mempcpy() instead of memcpy()
2022-02-16 22:20:33 +01:00
Lennart Poettering
281df579a7 Revert "resolved: filter out our own stub resolvers when parsing servers"
This reverts commit 0ad4efb14b.

See
https://github.com/systemd/systemd/pull/20559#issuecomment-1028011030
for reasoning. Quoting:

> I think it should be OK to advertise extra stub listeners to local
> clients, but you prohibit this now. i.e. there are two different
> concepts here, and we shouldn't mix them up:
>
> 1. tracking configured dns servers and advertise them to local programs
> 2. actually using them ourselves
>
> I am pretty sure that our own stubs are OK for 1 but not OK for 2,
> hence we should filter at the time of use not at the time of parse.
2022-02-16 22:20:10 +01:00
Luca Boccassi
5d11af60ac
Merge pull request #22498 from yuwata/cgroup-threaded-mode
cgroup: ignore error in attaching process when threaded mode is used
2022-02-16 18:59:06 +00:00
Richard Neill
ea583ed5a3 virt: Fix Xen Dom0 detection logic to no longer report as VM
Fixes regression introduced in 599be274c1

Moving the Xen check before the CPUID check, in order to handle the case where
a Xen domain is nested within a hypervisor which can be detected by via the
CPUID check, had an unintended consequence of causing Dom0 to report as a Xen
VM when it is not nested.

This patch stops further checks once it has been determined that Dom0 is not
nested within another hypervisor, meaning that the non-nested case matches its
previous logic (where it does not report as a VM).

Also, tidy the conditionals for the Xen and UML checks by removing handling of
a VIRTUALIZATION_VM_OTHER result, which has no code path.

Fixes #22511
2022-02-16 18:05:28 +01:00
Lennart Poettering
803e12f36b tree-wide: some coccinelle fixes 2022-02-16 17:26:26 +01:00
Lennart Poettering
96ca229517 coccinelle: automatically switch some uses of memcpy() → mempcpy()
Inspired by #22520, let's add a coccinelle script that converts this
automatically.
2022-02-16 17:26:26 +01:00
Yu Watanabe
bde335f21f timesync: add missing setting in template
Follow-up for e81a44bf5f.
2022-02-16 17:16:20 +01:00
Lennart Poettering
01eb1236f8
Merge pull request #22526 from poettering/homed-container-uid-range
homed: map container UID range for homed home directories
2022-02-16 16:36:25 +01:00
Yu Watanabe
cc46d3be68
Merge pull request #22502 from yuwata/udev-net-virtual-wlan-interface
network: add virtual wlan interface support
2022-02-16 23:03:52 +09:00
Yu Watanabe
7f96350d50
Merge pull request #22520 from yuwata/sd-dhcp6-client-cosmetic-follow-ups
sd-dhcp6-client: several cosmetic follow-ups
2022-02-16 23:02:51 +09:00
Yu Watanabe
e43a418f86
Merge pull request #22271 from keszybz/manager-reexec-freeze
Freeze manager if reexec fails
2022-02-16 23:02:21 +09:00
Lennart Poettering
dfdaf9f2aa NEWS: update excerpt on container UID/GID mappings 2022-02-16 13:37:01 +01:00
Lennart Poettering
9df83788c1 docs: document homed's use of the container UID mapping 2022-02-16 13:37:01 +01:00
Lennart Poettering
1af53c0fa8 homed: when using id mapping on the home dirs, also do an identity mapping for the container UID ranges
Apparently people really want to put high UIDs in their homedirs. Let's
add some minimal support for that.

Further discussion: https://github.com/systemd/systemd/pull/22239#issuecomment-1040421552

Inspired by, based on, and replacing #22239 by Christian Brauner.
2022-02-16 13:37:01 +01:00
Lennart Poettering
a57d72ceb4 TODO 2022-02-16 13:30:20 +01:00
Lennart Poettering
251f6e3f82 man: fix virtualization table
The count of VM types got out of sync, let's fix that.

Follow-up for b6eca3731d which forgot to
increase the count by one.
2022-02-16 21:15:14 +09:00
Yu Watanabe
37598ac6eb sd-dhcp6-client: use mempcpy() or mempcpy_safe() 2022-02-16 16:23:58 +09:00
Yu Watanabe
507cd76085 memory-util: introdyce mempcpy_safe() 2022-02-16 16:23:58 +09:00
Yu Watanabe
c9333c236f dhcp-identifier: use offsetof()
Also use appropriate place to store UUID.
2022-02-16 16:23:54 +09:00
Zbigniew Jędrzejewski-Szmek
667030bff6 manager: add {} around cpu sets, use range formatting
We would print "Setting NUMA policy to bind, with nodes .".
This is not very clear, change it to "… with nodes {}.".

Also use range formatting for masks to make output shorter.
2022-02-16 08:07:20 +01:00
Zbigniew Jędrzejewski-Szmek
6b1fa53997 manager: add few ", ignoring" and adjust level in one message 2022-02-16 08:07:20 +01:00
Yu Watanabe
1147ce3a46
Merge pull request #22523 from DaanDeMeyer/systemd-networkd-tests-fixes
mkosi: Support running systemd-networkd-tests.py in QEMU
2022-02-16 16:04:14 +09:00
Yu Watanabe
702cf08fce core/execute: warn when threaded mode is detected
Prompted by #22486.
2022-02-16 15:59:03 +09:00
Yu Watanabe
084e7706c2 cgroup-util: introduce cg_is_threaded() 2022-02-16 15:55:32 +09:00
Evgeny Vereshchagin
bf6ef6b6a9 tests: allow running all the services with SYSTEMD_LOG_LEVEL
It should make it easier to figure out what exactly services do there.
For example, with SYSTEMD_LOG_LEVEL=debug userdbd (v249) prints
```
varlink-5: New incoming message: {"method":"io.systemd.UserDatabase.GetUserRecord","parameters":{}}
```
before it crashes and systemd-resolved prints
```
varlink-21: New incoming message: {"method":"io.systemd.Resolve.ResolveAddress","parameters":{"address":[127,0,0,1],"flags":0,"ifindex":1000000,"family":0}}
```
and those messages are helpful (especially when scripts causing them
aren't clever enough to keep track of random stuff they send to systemd
:-))
2022-02-16 07:50:51 +03:00
Daan De Meyer
1e86c83308 test: Prefix all network/netdev config files used by systemd-networkd-tests.py
Let's make sure these take preference over any generic network config files shipped
by the OS (in this case specifically, mkosi).
2022-02-15 22:53:43 +00:00
Daan De Meyer
e2bf0a72ea test: Skip test_macsec() until kernel panic is fixed 2022-02-15 22:53:40 +00:00
Daan De Meyer
0f1853e230 mkosi: Support running systemd-networkd-tests.py in QEMU
This commit adds the necessary packages for Fedora and Arch.
2022-02-15 22:11:39 +00:00
Max Gautier
f55fe53ffc docs: Correct WantedBy= regarding template units 2022-02-15 16:54:11 +01:00
Yu Watanabe
fc62d1c54f sd-dhcp6-client: add comment about ia_na and ia_pd 2022-02-15 23:36:45 +09:00
Daan De Meyer
0765763e51 test: Stop using TextTestRunner in systemd-networkd-tests.py
If we assign our own test runner, passing arguments stops working
as unittest won't instantiate its own test runner after it parses
the arguments from sys.argv.

Consequence is that the tests will write to stderr now instead of
stdout since it doesn't seem possible to configure the stream that
unittest.main() will instantiate its test runner with so it'll
default to sys.stderr.
2022-02-15 23:32:06 +09:00
Yu Watanabe
dedf2d0054 network: add support to create wlan virtual interface
Closes #18977.
2022-02-15 23:24:55 +09:00
Lennart Poettering
6783f31c9c
Merge pull request #22516 from keszybz/bit-and-pieces
Post-review fixups and other tiny improvements
2022-02-15 15:20:16 +01:00
Ludwig Nussel
4e076fc885 Revert "man: fix description of --force in halt(8) (#7392)"
This reverts commit 5d9adb5b60.
2022-02-15 14:58:03 +01:00
Lennart Poettering
ec00453b1c
Merge pull request #22412 from yuwata/sd-dhcp6-client-cleanups
sd-dhcp6-client: several fixes and cleanups
2022-02-15 14:18:55 +01:00
Zbigniew Jędrzejewski-Szmek
1e3eee8cf0 manager: if we are reexecuting, do not invoke any fallbacks
For https://bugzilla.redhat.com/show_bug.cgi?id=1986176:
if we are trying to reexecute, and this fails for any reason, we shouldn't
try to execute /sbin/init or /bin/sh. It is better to just freeze.
If we freeze it is easier to diagnose what happened, but if we execute
one of the fallbacks, we don't really know what will happen. In particular
the new init might just return, causing the machine to shut down. Or we
may successfully spawn /bin/sh, which could leave the machine open.
2022-02-15 11:13:26 +01:00
Zbigniew Jędrzejewski-Szmek
5409c6fcc5 manager: do not ignore the return value from the main loop
If manager_loop() fails, we would print an error message, but then actually
ignore the error in main(), and potentially execute the shutdown binary.
I'm not sure how likely this is to happen in practice, but it seems sloppy.
So let's do the cleanup, but actually freeze() if manager_loop() returned
an error.

invoke_main_loop() is refactored to return the manager objective. This way
we don't need to pass a separate parameter to specify whether we are
reexecuting. Subsequent patch will make further use of the returned objective.
2022-02-15 11:13:24 +01:00
Zbigniew Jędrzejewski-Szmek
073c0e20ef homework: avoid runtime formatting of a fixed string
Follow-up for fe9bd5ad36.
I checked that the formatted string has the same dashes as
before fe9bd5ad36.
2022-02-15 10:50:43 +01:00
Zbigniew Jędrzejewski-Szmek
2d5c770d5c share/gpt: add stringified defines for GPT partition types 2022-02-15 10:49:41 +01:00
Zbigniew Jędrzejewski-Szmek
8adba77294 NEWS: minor grammar adjustment
Follow-up for e41dcb8221.
2022-02-15 10:30:35 +01:00