summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* docs: swap Name and Partition Type UUID in headerMatthias Lisin2022-02-212-4/+4
|
* tools: adjust re.match to recent gpt.h additionsMatthias Lisin2022-02-211-1/+1
| | | | | with addition of SD_ID128_MAKE_UUID_STR entries to src/shared/gpt.h the tool failed halfway due to falsly matching the new entries
* env-util: replace unsetenv_erase() by new getenv_steal_erase() helperLennart Poettering2022-02-209-84/+90
| | | | | | | | The new helper combines a bunch of steps every invocation of unsetenv_erase() did so far: getenv() + strdup() + unsetenv_erase(). Let's unify this into one helper that is harder to use incorrectly. It's in inspired by TAKE_PTR() in a way: get the env var out and invalidate where it was before.
* NEWS: fix typoYu Watanabe2022-02-201-1/+1
|
* mkosi CI: mask isc-dhcp-server unitsLuca Boccassi2022-02-191-2/+11
| | | | | | | | | | | | | | | | The packages are installed to provide the dhcpd binary, used by test/test-network/systemd-networkd-tests.py, but we don't need the units to run, and in fact in some cases the image fails to boot because of them: Spawning container image on /home/runner/work/systemd/systemd/image.raw. Press ^] three times within 1s to kill container. ● isc-dhcp-server.service loaded failed failed ISC DHCP IPv4 server ● isc-dhcp-server6.service loaded failed failed ISC DHCP IPv6 server Container image failed with error code 1. Error: Process completed with exit code 1. Mask the units with an --extra-tree.
* systemctl: make `--timestamp=` affect the `show` verb as wellFrantisek Sumsal2022-02-191-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the `--timestamp=` option has no effect on timestamps shown by `systemctl show`, let's fix that. Spotted in #22567. Before: ``` $ systemctl show --timestamp=us+utc systemd-journald | grep Timestamp= ExecMainStartTimestamp=Sat 2021-12-11 15:25:57 CET StateChangeTimestamp=Sat 2021-12-11 15:25:57 CET InactiveExitTimestamp=Sat 2021-12-11 15:25:57 CET ActiveEnterTimestamp=Sat 2021-12-11 15:25:57 CET ActiveExitTimestamp=Sat 2021-12-11 15:25:57 CET InactiveEnterTimestamp=Sat 2021-12-11 15:25:57 CET ConditionTimestamp=Sat 2021-12-11 15:25:57 CET AssertTimestamp=Sat 2021-12-11 15:25:57 CET ``` After: ``` $ systemctl show --timestamp=us+utc systemd-journald | grep Timestamp= ExecMainStartTimestamp=Sat 2021-12-11 14:25:57.177848 UTC StateChangeTimestamp=Sat 2021-12-11 14:25:57.196714 UTC InactiveExitTimestamp=Sat 2021-12-11 14:25:57.177871 UTC ActiveEnterTimestamp=Sat 2021-12-11 14:25:57.196714 UTC ActiveExitTimestamp=Sat 2021-12-11 14:25:57.144677 UTC InactiveEnterTimestamp=Sat 2021-12-11 14:25:57.176331 UTC ConditionTimestamp=Sat 2021-12-11 14:25:57.176980 UTC AssertTimestamp=Sat 2021-12-11 14:25:57.176980 UTC ```
* generator: Rename password argJan Janssen2022-02-193-18/+18
| | | | | | | | | | This function does not expect a password, but a key file path. The cryptsetup helper binary even calls it that. No Code changes. Follow up on: 6e41f4dd916293f35d7d35cea7eed1807d7ea771 Fixes: https://github.com/systemd/systemd/security/code-scanning/81
* Merge pull request #22546 from poettering/resolved-bus-error-reply-reworkLuca Boccassi2022-02-181-39/+105
|\ | | | | resolved: rework how we reply to D-Bus messages for resolution requests
| * resolved: rework how we reply to D-Bus messages for resolution requestsLennart Poettering2022-02-181-40/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reworks how we reply to D-Bus messages that come in for resolution requests. Previously, we'd store them in the .bus_request field of the main DnsQuery (but not any auxiliary one), and reply to it whenever we had something to reply. In error paths this could mean we'd accidentally reply twice. This cleans this logic up: whenever we reply to a message we'll now go up the tree of auxiliary queries, to find the primary query, i.e. the one we actually want to reply to. Once we found it, we take out the bus message object, resetting it to NULL. This way we can be sure we'll reply at most once to each message. Fixes: #22477
| * resolve: add reference of the original bus message to the aux queriesYu Watanabe2022-02-181-0/+1
|/ | | | | | Otherwise, the error in aux queries cannot be replied. Fixes #22477.
* Merge pull request #22562 from poettering/logind-bool-fixLennart Poettering2022-02-181-3/+2
|\ | | | | machined: fix confusion around "bool" and sd-bus
| * machined: use one_zero() on one more occasionLennart Poettering2022-02-181-1/+1
| |
| * machined: sd-bus expects 'int', not 'bool' when returning unmarshalled booleansLennart Poettering2022-02-181-2/+1
|/ | | | | Fixes: #22555 Follow-up for: #22160
* Merge pull request #22552 from poettering/nss-by-pass-bus-reworkLennart Poettering2022-02-185-38/+91
|\ | | | | fix nss deadlock between dbus-daemon and PID 1
| * pid1: set SYSTEMD_NSS_DYNAMIC_BYPASS=1 env var for dbus-daemonLennart Poettering2022-02-183-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's currently a deadlock between PID 1 and dbus-daemon: in some cases dbus-daemon will do NSS lookups (which are blocking) at the same time PID 1 synchronously blocks on some call to dbus-daemon. Let's break that by setting SYSTEMD_NSS_DYNAMIC_BYPASS=1 env var for dbus-daemon, which will disable synchronously blocking varlink calls from nss-systemd to PID 1. In the long run we should fix this differently: remove all synchronous calls to dbus-daemon from PID 1. This is not trivial however: so far we had the rule that synchronous calls from PID 1 to the dbus broker are OK as long as they only go to interfaces implemented by the broke itself rather than services reachable through it. Given that the relationship between PID 1 and dbus is kinda special anyway, this was considered acceptable for the sake of simplicity, since we quite often need metadata about bus peers from the broker, and the asynchronous logic would substantially complicate even the simplest method handlers. This mostly reworks the existing code that sets SYSTEMD_NSS_BYPASS_BUS= (which is a similar hack to deal with deadlocks between nss-systemd and dbus-daemon itself) to set SYSTEMD_NSS_DYNAMIC_BYPASS=1 instead. No code was checking SYSTEMD_NSS_BYPASS_BUS= anymore anyway, and it used to solve a similar problem, hence it's an obvious piece of code to rework like this. Issue originally tracked down by Lukas Märdian. This patch is inspired and closely based on his patch: https://github.com/systemd/systemd/pull/22038 Fixes: #15316 Co-authored-by: Lukas Märdian <slyon@ubuntu.com>
| * docs: $SYSTEMD_NSS_BYPASS_BUS is not honoured anymore, don't document itLennart Poettering2022-02-181-4/+0
| | | | | | | | | | | | It was removed back in 1684c56f40f020e685e70b3d1785d596ff16f892 Follow-up for: 1684c56f40f020e685e70b3d1785d596ff16f892
| * pid1: lookup owning PID of BusName= name of services asynchronouslyLennart Poettering2022-02-182-19/+74
| | | | | | | | | | | | | | | | | | | | | | | | A first step of removing blocking calls to the D-Bus broker from PID 1. There's a lot more to got (i.e. grep src/core/ for sd_bus_creds basically), but it's a start. Removing blocking calls to D-Bus broker deals systematicallly with deadlocks caused by dbus-daemon blocking on synchronous IPC calls back to PID1 (e.g. Varlink calls through nss-systemd). Bugs such as #15316. Also-see: https://github.com/systemd/systemd/pull/22038#issuecomment-1042958390
| * pid1: watch bus name always when we have itLennart Poettering2022-02-181-8/+10
|/ | | | | | | | | | Previously we'd only watch configured service bus names if Type=dbus was set. Let's also watch it for other types. This is useful to pick up the main PID of such a service. In fact the code to pick it up was already in place, alas it didn't do anything given the signal was never received for it. Fix that. (It's also useful for debugging)
* udev-util: add parentheses to make coverity silentYu Watanabe2022-02-181-1/+1
| | | | Fixes CID#1474365.
* hwdb: 60-keyboard: Support the buttons on CZC P10T tabletLubomir Rintel2022-02-181-0/+14
| | | | | | | | | | | | | | | | The machine has tree buttons connected to an EC that acts as a regular AT-compatible keyboard controller. It can be either in "Windows 7" or "Android" mode. It boots up with the earlier, but the Android build on the tablet switches it on bootup (Windows presumably leaves it as-is). The "Windows 7" mode, the behavior is very inconvenient: the Home button emits multiple key presses that presumably do something in Windws 7 while the second button toggles the RF Kill Switch in addition to producing a scancode (it's labeled "Back" on Android version of the tablet). The "Android" mode just sends the good ol' scan codes and this patch handles them. On mainline Linux, the "x86-android-tablets" driver makes sure we're in the correct mode.
* mkosi: Add more packages required to run systemd-networkd-tests.pyDaan De Meyer2022-02-174-0/+14
| | | | | | Let's also add the required packages to run systemd-networkd-tests.py for Ubuntu and Debian. The Fedora and Arch lists are also updated to include python which is also required to run the tests.
* Merge pull request #22545 from yuwata/network-match-kindYu Watanabe2022-02-1715-21/+74
|\ | | | | network, udev: introduce Kind= setting in [Match] section
| * network,udev/net: add Kind= settings in [Match] sectionYu Watanabe2022-02-1714-3/+53
| | | | | | | | | | | | | | This may be useful for writing .network or .link files matching with virtual interfaces. Closes #22541.
| * networkctl: show netdev kindYu Watanabe2022-02-171-18/+21
| |
* | packit: drop unnumbered patches as wellFrantisek Sumsal2022-02-171-2/+2
| |
* | test: set `ReadWritePaths=` only for units from TEST-20Frantisek Sumsal2022-02-171-3/+8
| | | | | | | | | | | | as setting it system-wide has some undesirable side-effects. Follow-up to b6fc524.
* | Merge pull request #22540 from yuwata/network-call-ethtool-after-initializedYu Watanabe2022-02-174-42/+107
|\ \ | | | | | | network: call ethtool after link is initialized by udevd
| * | network: call ethtool after link is initialized by udevdYu Watanabe2022-02-171-38/+87
| | | | | | | | | | | | Fixes #22538.
| * | network: use udev_available() where applicableYu Watanabe2022-02-172-4/+3
| | |
| * | udev-util: introduce udev_available() helper functionYu Watanabe2022-02-172-0/+17
| |/
* / resolve: refuse AF_UNSPEC when resolving addressYu Watanabe2022-02-171-1/+1
|/ | | | Fixes #22480.
* Merge pull request #22535 from poettering/dbusctl-range-displayYu Watanabe2022-02-1715-51/+283
|\ | | | | userdbctl: show UID ranges in output too
| * userdbctl: add a dash of color to users of different dispositionsLennart Poettering2022-02-161-4/+37
| |
| * userdbctl: show min/max UID boundaries in userdbctl outputLennart Poettering2022-02-161-12/+198
| |
| * user-util: move homed/nspawn map UID_MIN/UID_MAX define into user-util.hLennart Poettering2022-02-163-10/+11
| | | | | | | | | | Let's have them at a common place, so that we have the ranges altogether at a minimal set of places.
| * glyph-util: add new glyphs for up/down arrowsLennart Poettering2022-02-1611-25/+37
| |
* | sd-dhcp-server: do not offer server addressYu Watanabe2022-02-171-0/+3
| | | | | | | | The server address may be in the pool.
* | Merge pull request #22543 from poettering/logind-fix-bus-bool-propYu Watanabe2022-02-172-6/+6
|\ \ | |/ |/| logind: fix some sd-bus int/bool/unsigned mixups
| * logind: fix bool/int confusion for KillUserProcesses bus propertyLennart Poettering2022-02-161-1/+1
| | | | | | | | | | | | | | 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.
| * logind: fix internal types used for EnableWallMessagesLennart Poettering2022-02-162-5/+5
|/ | | | | | | | 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".
* Merge pull request #22531 from poettering/mempcpy-cocciLennart Poettering2022-02-165-17/+23
|\ | | | | coccinelle: add semantic patch for using more mempcpy() instead of memcpy()
| * tree-wide: some coccinelle fixesLennart Poettering2022-02-162-8/+5
| |
| * coccinelle: automatically switch some uses of memcpy() → mempcpy()Lennart Poettering2022-02-163-9/+18
| | | | | | | | | | Inspired by #22520, let's add a coccinelle script that converts this automatically.
* | Revert "resolved: filter out our own stub resolvers when parsing servers"Lennart Poettering2022-02-165-34/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0ad4efb14beea9148838a0d974821e3b98cafc47. 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.
* | Merge pull request #22498 from yuwata/cgroup-threaded-modeLuca Boccassi2022-02-164-0/+35
|\ \ | | | | | | cgroup: ignore error in attaching process when threaded mode is used
| * | core/execute: warn when threaded mode is detectedYu Watanabe2022-02-162-0/+9
| | | | | | | | | | | | Prompted by #22486.
| * | cgroup-util: introduce cg_is_threaded()Yu Watanabe2022-02-162-0/+26
| | |
* | | virt: Fix Xen Dom0 detection logic to no longer report as VMRichard Neill2022-02-161-19/+21
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes regression introduced in 599be274c13c503806c85073d7beb1a155ac27bd 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
* | timesync: add missing setting in templateYu Watanabe2022-02-161-0/+1
| | | | | | | | Follow-up for e81a44bf5faa80ec6ca2ef835d559a65c7e27c35.
* | Merge pull request #22526 from poettering/homed-container-uid-rangeLennart Poettering2022-02-163-12/+61
|\ \ | | | | | | homed: map container UID range for homed home directories